On Wed, Feb 07, 2001 at 12:53:36PM -0800, Andre Hedrick wrote: > On Wed, 7 Feb 2001, Alan Cox wrote: > > > > Iff CONFIG_BLK_DEV_IDECS is set then yes, doing schedule is better. > > > But I do not see any benefit in doing > > > > > > unsigned long timeout = jiffies + ((HZ + 19)/20) + 1; > > > while (0 < (signed long)(timeout - jiffies)); > > > > On that bit we agree. > > What do you want fixed? > Send a patch and lets try it.... How about this? -- Vojtech Pavlik SuSE Labs
--- pdc202xx.c.old Fri Jul 28 21:08:30 2000 +++ pdc202xx.c Fri Feb 9 09:08:55 2001 @@ -747,14 +747,11 @@ { unsigned long high_16 = pci_resource_start(HWIF(drive)->pci_dev, 4); byte udma_speed_flag = inb(high_16 + 0x001f); - int i = 0; OUT_BYTE(udma_speed_flag | 0x10, high_16 + 0x001f); - ide_delay_50ms(); - ide_delay_50ms(); + mdelay(100) OUT_BYTE(udma_speed_flag & ~0x10, high_16 + 0x001f); - for (i = 0; i < 40; i++) - ide_delay_50ms(); + mdelay(2000); /* 2 seconds ?! */ } unsigned int __init pci_init_pdc202xx (struct pci_dev *dev, const char *name) @@ -767,7 +764,6 @@ if ((dev->device == PCI_DEVICE_ID_PROMISE_20262) || (dev->device == PCI_DEVICE_ID_PROMISE_20265) || (dev->device == PCI_DEVICE_ID_PROMISE_20267)) { - int i = 0; /* * software reset - this is required because the bios * will set UDMA timing on if the hdd supports it. The @@ -779,11 +775,9 @@ */ OUT_BYTE(udma_speed_flag | 0x10, high_16 + 0x001f); - ide_delay_50ms(); - ide_delay_50ms(); + mdelay(100); OUT_BYTE(udma_speed_flag & ~0x10, high_16 + 0x001f); - for (i=0; i<40; i++) - ide_delay_50ms(); + mdelay(2000); /* 2 seconds ?! */ } if (dev->resource[PCI_ROM_RESOURCE].start) {