From: Linus Torvalds Date: Fri, 23 Nov 2007 20:11:13 +0000 (-0500) Subject: Import 2.0.10 X-Git-Tag: 2.0.10 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=bf1f706a82cdac8239b779c8de92c36c7ea7cb9e;p=history.git Import 2.0.10 --- diff --git a/Makefile b/Makefile index e1837ebb1a40..5ed19ecc2b64 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 0 -SUBLEVEL = 9 +SUBLEVEL = 10 ARCH = i386 diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c index ba4d99e51626..94fdd703d312 100644 --- a/arch/alpha/mm/fault.c +++ b/arch/alpha/mm/fault.c @@ -84,7 +84,6 @@ good_area: if (!(vma->vm_flags & VM_WRITE)) goto bad_area; } - tbis(address); handle_mm_fault(vma, address, cause > 0); return; diff --git a/drivers/block/cmd640.c b/drivers/block/cmd640.c index a24f4e0dcd19..1b7aef5a63c7 100644 --- a/drivers/block/cmd640.c +++ b/drivers/block/cmd640.c @@ -1,5 +1,5 @@ /* - * linux/drivers/block/cmd640.c Version 0.12 Jul 22, 1996 + * linux/drivers/block/cmd640.c Version 0.13 Jul 23, 1996 * * Copyright (C) 1995-1996 Linus Torvalds & authors (see below) */ @@ -61,6 +61,7 @@ * irq unmasking disabled for reliability. -lp * try to be even smarter about the second port. -lp * tidy up source code formatting. -ml + * Version 0.13 permit irq unmasking again. -ml */ #undef REALLY_SLOW_IO /* most systems can safely undef this */ @@ -451,7 +452,9 @@ int ide_probe_for_cmd640x(void) */ ide_hwifs[0].chipset = ide_cmd640; ide_hwifs[0].tuneproc = &cmd640_tune_drive; +#if 0 ide_hwifs[0].no_unmask = 1; +#endif if (ide_hwifs[0].drives[0].autotune == 0) ide_hwifs[0].drives[0].autotune = 1; @@ -470,8 +473,9 @@ int ide_probe_for_cmd640x(void) ide_hwifs[1].chipset = ide_cmd640; ide_hwifs[1].tuneproc = &cmd640_tune_drive; +#if 0 ide_hwifs[1].no_unmask = 1; - +#endif if (ide_hwifs[1].drives[0].autotune == 0) ide_hwifs[1].drives[0].autotune = 1; if (ide_hwifs[1].drives[1].autotune == 0) diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index 467cabdcdb53..965fe84f126c 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -326,7 +326,9 @@ check_table: */ for (i = 0; i < 4 ; i++) { struct partition *q = &p[i]; - if (NR_SECTS(q) && q->sector == 1 && q->end_sector == 63) { + if (NR_SECTS(q) + && (q->sector & 63) == 1 + && (q->end_sector & 63) == 63) { unsigned int heads = q->end_head + 1; if (heads == 32 || heads == 64 || heads == 128) { diff --git a/drivers/block/ide.c b/drivers/block/ide.c index e75fd2ebc633..4bce1dbed847 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -1,5 +1,5 @@ /* - * linux/drivers/block/ide.c Version 5.45 Jul 22, 1996 + * linux/drivers/block/ide.c Version 5.46 Jul 23, 1996 * * Copyright (C) 1994-1996 Linus Torvalds & authors (see below) */ @@ -243,6 +243,9 @@ * add a throttle to the unexpected_intr() messages * Version 5.45 fix ugly parameter parsing bugs (thanks Derek) * include Gadi's magic fix for cmd640 unexpected_intr + * include mc68000 patches from Geert Uytterhoeven + * add Gadi's fix for PCMCIA cdroms + * Version 5.46 remove the mc68000 #ifdefs for 2.0.x * * Some additional driver compile-time options are in ide.h * @@ -1625,7 +1628,6 @@ static void unexpected_intr (int irq, ide_hwgroup_t *hwgroup) byte stat; unsigned int unit; ide_hwif_t *hwif = hwgroup->hwif; - static unsigned long last_time = 0; /* * handle the unexpected interrupt @@ -1638,8 +1640,10 @@ static void unexpected_intr (int irq, ide_hwgroup_t *hwgroup) continue; SELECT_DRIVE(hwif,drive); if (!OK_STAT(stat=GET_STAT(), drive->ready_stat, BAD_STAT)) { - if ((last_time + (HZ/2)) < jiffies && !drive->ignore_unexp) { - last_time = jiffies; + /* Try to not flood the console with msgs */ + static unsigned long last_msgtime = 0; + if ((last_msgtime + (HZ/2)) < jiffies) { + last_msgtime = jiffies; (void) ide_dump_status(drive, "unexpected_intr", stat); } } @@ -2210,7 +2214,7 @@ static inline void do_identify (ide_drive_t *drive, byte cmd) if ((id->model[0] == 'N' && id->model[1] == 'E') /* NEC */ || (id->model[0] == 'F' && id->model[1] == 'X') /* Mitsumi */ || (id->model[0] == 'P' && id->model[1] == 'i'))/* Pioneer */ - bswap ^= 1; /* Vertos drives may still be weird */ + bswap = 0; /* Vertos drives may still be weird */ } ide_fixstring (id->model, sizeof(id->model), bswap); ide_fixstring (id->fw_rev, sizeof(id->fw_rev), bswap); @@ -2383,15 +2387,10 @@ static void delay_10ms (void) */ static int try_to_identify (ide_drive_t *drive, byte cmd) { - int irqs, rc; + int hd_status, rc; unsigned long timeout; -#ifdef CONFIG_BLK_DEV_CMD640 - int retry = 0; - int hd_status; + int irqs = 0; -try_again: -#endif /* CONFIG_BLK_DEV_CMD640 */ - irqs = 0; if (!HWIF(drive)->irq) { /* already got an IRQ? */ probe_irq_off(probe_irq_on()); /* clear dangling irqs */ irqs = probe_irq_on(); /* start monitoring irqs */ @@ -2458,19 +2457,9 @@ try_again: #ifdef CONFIG_BLK_DEV_CMD640 if (HWIF(drive)->chipset == ide_cmd640) { extern byte (*get_cmd640_reg)(int); - byte reg9 = get_cmd640_reg(0x09); printk("%s: Hmmm.. probably a driver problem.\n", drive->name); - printk("%s: cmd640 reg 09h == 0x%02x\n", drive->name, reg9); + printk("%s: cmd640 reg 09h == 0x%02x\n", drive->name, get_cmd640_reg(9)); printk("%s: cmd640 reg 51h == 0x%02x\n", drive->name, get_cmd640_reg(0x51)); - if (reg9 == 0x0a) { - printk("%s: perhaps PCI INTA has not been set to IRQ15?\n", drive->name); - if (retry++ == 0) { - extern void (*put_cmd640_reg)(int, int); - printk("%s: switching secondary interface to legacy mode\n", drive->name); - put_cmd640_reg(0x09,0x00); - goto try_again; - } - } } #endif /* CONFIG_BLK_DEV_CMD640 */ } diff --git a/drivers/block/ide.h b/drivers/block/ide.h index 36832d581700..8744f11426bf 100644 --- a/drivers/block/ide.h +++ b/drivers/block/ide.h @@ -296,18 +296,6 @@ typedef union { } b; } special_t; -#ifdef __BIG_ENDIAN_BITFIELD -typedef union { - unsigned all : 8; /* all of the bits together */ - struct { - unsigned bit7 : 1; /* always 1 */ - unsigned lba : 1; /* using LBA instead of CHS */ - unsigned bit5 : 1; /* always 1 */ - unsigned unit : 1; /* drive select number, 0 or 1 */ - unsigned head : 4; /* always zeros here */ - } b; - } select_t; -#else /* __BIG_ENDIAN_BITFIELD */ typedef union { unsigned all : 8; /* all of the bits together */ struct { @@ -318,7 +306,6 @@ typedef union { unsigned bit7 : 1; /* always 1 */ } b; } select_t; -#endif /* __BIG_ENDIAN_BITFIELD */ typedef struct ide_drive_s { special_t special; /* special action flags */ @@ -332,7 +319,6 @@ typedef struct ide_drive_s { unsigned unmask : 1; /* flag: okay to unmask other irqs */ unsigned nobios : 1; /* flag: do not probe bios for drive */ unsigned autotune : 2; /* 1=autotune, 2=noautotune, 0=default */ - unsigned ignore_unexp : 1; /* flag: ignore unexpected_intr's */ #if FAKE_FDISK_FOR_EZDRIVE unsigned remap_0_to_1 : 1; /* flag: partitioned with ezdrive */ #endif /* FAKE_FDISK_FOR_EZDRIVE */ diff --git a/drivers/block/triton.c b/drivers/block/triton.c index a9cd04a24cad..42c9a61a7716 100644 --- a/drivers/block/triton.c +++ b/drivers/block/triton.c @@ -7,7 +7,7 @@ /* * This module provides support for the Bus Master IDE DMA function - * of the Intel PCI Triton chipset (82371FB). + * of the Intel PCI Triton I/II chipsets (i82371FB or i82371SB). * * DMA is currently supported only for hard disk drives (not cdroms). * @@ -15,11 +15,11 @@ * after broader experience has been obtained with hard disks. * * Up to four drives may be enabled for DMA, and the Triton chipset will - * (hopefully) arbitrate the PCI bus among them. Note that the 82371FB chip + * (hopefully) arbitrate the PCI bus among them. Note that the i82371 chip * provides a single "line buffer" for the BM IDE function, so performance of * multiple (two) drives doing DMA simultaneously will suffer somewhat, * as they contest for that resource bottleneck. This is handled transparently - * inside the 82371FB chip. + * inside the i82371 chip. * * By default, DMA support is prepared for use, but is currently enabled only * for drives which support multi-word DMA mode2 (mword2), or which are @@ -322,7 +322,7 @@ static int triton_dmaproc (ide_dma_action_t func, ide_drive_t *drive) /* * print_triton_drive_flags() displays the currently programmed options - * in the 82371 (Triton) for a given drive. + * in the i82371 (Triton) for a given drive. * * If fastDMA is "no", then slow ISA timings are used for DMA data xfers. * If fastPIO is "no", then slow ISA timings are used for PIO data xfers. @@ -382,7 +382,7 @@ void ide_init_triton (byte bus, byte fn) unsigned short pcicmd; unsigned int bmiba, timings; - printk("ide: 82371 PIIX (Triton) on PCI bus %d function %d\n", bus, fn); + printk("ide: i82371 PIIX (Triton) on PCI bus %d function %d\n", bus, fn); /* * See if IDE and BM-DMA features are enabled: */ diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 59cc720c4cc5..70c205cdc6d9 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -189,7 +189,7 @@ static unsigned int isofs_get_last_session(kdev_t dev) printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba); } #endif 0 - if (i==0) vol_desc_start=ms_info.addr.lba; + if ((i==0)&&(ms_info.xa_flag)) vol_desc_start=ms_info.addr.lba; } return vol_desc_start; } diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index be5c45c3e816..cc343dd58aec 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -56,6 +56,11 @@ * Christian Daudt : igmp_heard_report now only calls * igmp_timer_expire if tm->running is * true (960216). + * Malcolm Beattie : ttl comparison wrong in igmp_rcv made + * igmp_heard_query never trigger. Expiry + * miscalculation fixed in igmp_heard_query + * and random() made to return unsigned to + * prevent negative expiry times. */ @@ -207,7 +212,7 @@ static void igmp_stop_timer(struct ip_mc_list *im) } } -extern __inline__ int random(void) +extern __inline__ unsigned int random(void) { static unsigned long seed=152L; seed=seed*69069L+1; @@ -326,7 +331,7 @@ static void igmp_heard_query(struct device *dev,unsigned char max_resp_time) { if(im->tm_running) { - if(im->timer.expires>max_resp_time*HZ/IGMP_TIMER_SCALE) + if(im->timer.expires>jiffies+max_resp_time*HZ/IGMP_TIMER_SCALE) { igmp_stop_timer(im); igmp_start_timer(im,max_resp_time); @@ -447,7 +452,7 @@ int igmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, } ih=(struct igmphdr *)skb->h.raw; - if(skb->len ip_hdr->ttl>1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr))) + if(skb->len ip_hdr->ttl<1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr))) { kfree_skb(skb, FREE_READ); return 0; diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index a751fc9e2222..8a616ae15a19 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -726,12 +726,7 @@ static int tcp_select(struct sock *sk, int sel_type, select_table *wait) return 0; if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) break; - /* - * This is now right thanks to a small fix - * by Matt Dillon. - */ - - if (sock_wspace(sk) < sk->mtu+128+sk->prot->max_header) + if (sk->wmem_alloc*2 > sk->sndbuf) break; return 1;