Skip to contentSkip to conversation

drivers/ide/pci/pdc202xx_old.c

DISCUSSION Carl-Daniel Hailfinger 1 participant 1 message May 26, 2003

lore
Share & tools
lore
#0 lore raw

Hello IDE gurus,

is the following #if 0 in drivers/ide/pci/pdc202xx_old.c intentional? What makes me worried about the code is that it looks like somebody wanted to clean up the code for splitoff of pdc202xx_new.c and confused the two files.
Either the code is really not needed and can be ripped out or it is needed and was overlooked.

drivers/ide/pci/pdc202xx_old.c:719
/*
* software reset - this is required because the bios
* will set UDMA timing on if the hdd supports it. The
* user may want to turn udma off. A bug in the pdc20262
* is that it cannot handle a downgrade in timing from
* UDMA to DMA. Disk accesses after issuing a set
* feature command will result in errors. A software
* reset leaves the timing registers intact,
* but resets the drives.
*/

#if 0
        if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) ||
            (dev->device == PCI_DEVICE_ID_PROMISE_20265) ||
            (dev->device == PCI_DEVICE_ID_PROMISE_20263) ||
            (dev->device == PCI_DEVICE_ID_PROMISE_20262)) {
                unsigned long high_16   = pci_resource_start(dev, 4);
                byte udma_speed_flag    = inb(high_16 + 0x001f);
                outb(udma_speed_flag | 0x10, high_16 + 0x001f);
                mdelay(100);
                outb(udma_speed_flag & ~0x10, high_16 + 0x001f);
                mdelay(2000);   /* 2 seconds ?! */
        }

#endif

Thoughts? Comments?

Carl-Daniel