VERSION = 2
PATCHLEVEL = 0
-SUBLEVEL = 9
+SUBLEVEL = 10
ARCH = i386
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
}
- tbis(address);
handle_mm_fault(vma, address, cause > 0);
return;
/*
- * 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)
*/
* 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 */
*/
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;
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)
*/
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) {
/*
- * 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)
*/
* 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
*
byte stat;
unsigned int unit;
ide_hwif_t *hwif = hwgroup->hwif;
- static unsigned long last_time = 0;
/*
* handle the unexpected interrupt
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);
}
}
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);
*/
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 */
#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 */
}
} 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 {
unsigned bit7 : 1; /* always 1 */
} b;
} select_t;
-#endif /* __BIG_ENDIAN_BITFIELD */
typedef struct ide_drive_s {
special_t special; /* special action flags */
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 */
/*
* 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).
*
* 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
/*
* 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.
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:
*/
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;
}
* 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.
*/
}
}
-extern __inline__ int random(void)
+extern __inline__ unsigned int random(void)
{
static unsigned long seed=152L;
seed=seed*69069L+1;
{
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);
}
ih=(struct igmphdr *)skb->h.raw;
- if(skb->len <sizeof(struct igmphdr) || skb->ip_hdr->ttl>1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr)))
+ if(skb->len <sizeof(struct igmphdr) || skb->ip_hdr->ttl<1 || ip_compute_csum((void *)skb->h.raw,sizeof(struct igmphdr)))
{
kfree_skb(skb, FREE_READ);
return 0;
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;