Commit 7d663f71 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Jens Axboe

[PATCH] Re: 2.5.36 IDE fixes

I'm terribly sorry - I've sent you the wrong diff, it was
some intermediate variant. Actually it added extra breakage to
ide_hwif_configure().

Desired behavior was:

if ctl == base == 0, the device is in "true legacy" mode (as per PCI
spec); use values from the base address registers otherwise.
parent ef869838
...@@ -421,20 +421,17 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ...@@ -421,20 +421,17 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
{ {
unsigned long ctl = 0, base = 0; unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif; ide_hwif_t *hwif;
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);
/* Possibly we should fail if these checks report true */ ide_pci_check_iomem(dev, d, 2*port+1);
ide_pci_check_iomem(dev, d, 2*port);
ide_pci_check_iomem(dev, d, 2*port+1); ctl = pci_resource_start(dev, 2*port+1);
base = pci_resource_start(dev, 2*port);
ctl = pci_resource_start(dev, 2*port+1); if ((ctl && !base) || (base && !ctl)) {
base = pci_resource_start(dev, 2*port); printk(KERN_ERR "%s: inconsistent baseregs (BIOS) "
if ((ctl && !base) || (base && !ctl)) { "for port %d, skipping\n", d->name, port);
printk(KERN_ERR "%s: inconsistent baseregs (BIOS) " return NULL;
"for port %d, skipping\n", d->name, port);
return NULL;
}
} }
if (!ctl) if (!ctl)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment