starting from 2.5.35 IDE stopped working on my alphas because of
following problems:
- ide_hwif_configure() ignores BARs for IDE base/control registers
and assumes legacy 0x1f0/0x170 ports, unless controller reports
native PCI mode (ProgIf bits 0 and 2).
This is incorrect, as there are quite a few IDE chips operating
in "semi-legacy" mode, i.e. legacy interrupts, but functional
BAR0-3, like cy82c693 and ali5229. I guess Andre could give a lot
more examples. :-)
This happens to work on i386 simply because BIOS usually assigns
legacy values to BAR0-3, but we can't rely on it.
Just checking respective resource->start for zero should work in
all cases.
- ide_pci_check_iomem(): resource->flags == 0 means "unconfigured" as well.
Thus we avoid false positives.
- Apparently cut'n'paste typo in cy82c693.c - wrong PCI IDs.
}
static struct pci_device_id cy82c693_pci_tbl[] __devinitdata = {
- { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
ulong flags = pci_resource_flags(dev, bar);
/* Unconfigured ? */
- if(pci_resource_len(dev, bar) == 0)
+ if (!flags || pci_resource_len(dev, bar) == 0)
return 0;
/* I/O space */
unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif;
- if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE ||
- ((dev->class & ~(0xfa))) ||
- (dev->class & (port ? 4 : 1)) != 0)
- {
+ if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
+ {
/* Possibly we should fail if these checks report true */
ide_pci_check_iomem(dev, d, 2*port);
ide_pci_check_iomem(dev, d, 2*port+1);