mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
ide: fix disabled ports reporting for PCI controllers
Report all disabled ports in ide_pci_setup_ports() (prevents the bogus warning when ide_hwif_configure()->ide_match_hwif() fails to find free ide_hwifs[] slots). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
e9a0765eac
commit
cf6e854efb
1 changed files with 4 additions and 6 deletions
|
@ -526,7 +526,6 @@ out:
|
||||||
void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index)
|
void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index)
|
||||||
{
|
{
|
||||||
int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
|
int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
|
||||||
int at_least_one_hwif_enabled = 0;
|
|
||||||
ide_hwif_t *hwif, *mate = NULL;
|
ide_hwif_t *hwif, *mate = NULL;
|
||||||
u8 tmp;
|
u8 tmp;
|
||||||
|
|
||||||
|
@ -540,8 +539,10 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
|
||||||
ide_pci_enablebit_t *e = &(d->enablebits[port]);
|
ide_pci_enablebit_t *e = &(d->enablebits[port]);
|
||||||
|
|
||||||
if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
|
if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
|
||||||
(tmp & e->mask) != e->val))
|
(tmp & e->mask) != e->val)) {
|
||||||
|
printk(KERN_INFO "%s: IDE port disabled\n", d->name);
|
||||||
continue; /* port not enabled */
|
continue; /* port not enabled */
|
||||||
|
}
|
||||||
|
|
||||||
if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
|
if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
@ -587,10 +588,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
|
||||||
d->init_hwif(hwif);
|
d->init_hwif(hwif);
|
||||||
|
|
||||||
mate = hwif;
|
mate = hwif;
|
||||||
at_least_one_hwif_enabled = 1;
|
|
||||||
}
|
}
|
||||||
if (!at_least_one_hwif_enabled)
|
|
||||||
printk(KERN_INFO "%s: neither IDE port enabled (BIOS)\n", d->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
|
EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
|
||||||
|
|
Loading…
Reference in a new issue