aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:29 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:29 -0400
commitcf6e854efb3682322351a21e64058ffc13250914 (patch)
tree7b95b8a10e3f35b25364d7bb5c1fb464247fcef7 /drivers/ide
parente9a0765eac3c8df7094fd49f94ae83d80cbe4128 (diff)
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/setup-pci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index fff567bcedbe..6903100e3c83 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -526,7 +526,6 @@ out:
526void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index) 526void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index)
527{ 527{
528 int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port; 528 int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port;
529 int at_least_one_hwif_enabled = 0;
530 ide_hwif_t *hwif, *mate = NULL; 529 ide_hwif_t *hwif, *mate = NULL;
531 u8 tmp; 530 u8 tmp;
532 531
@@ -535,13 +534,15 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
535 /* 534 /*
536 * Set up the IDE ports 535 * Set up the IDE ports
537 */ 536 */
538 537
539 for (port = 0; port < channels; ++port) { 538 for (port = 0; port < channels; ++port) {
540 ide_pci_enablebit_t *e = &(d->enablebits[port]); 539 ide_pci_enablebit_t *e = &(d->enablebits[port]);
541 540
542 if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || 541 if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) ||
543 (tmp & e->mask) != e->val)) 542 (tmp & e->mask) != e->val)) {
543 printk(KERN_INFO "%s: IDE port disabled\n", d->name);
544 continue; /* port not enabled */ 544 continue; /* port not enabled */
545 }
545 546
546 if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL) 547 if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
547 continue; 548 continue;
@@ -587,10 +588,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
587 d->init_hwif(hwif); 588 d->init_hwif(hwif);
588 589
589 mate = hwif; 590 mate = hwif;
590 at_least_one_hwif_enabled = 1;
591 } 591 }
592 if (!at_least_one_hwif_enabled)
593 printk(KERN_INFO "%s: neither IDE port enabled (BIOS)\n", d->name);
594} 592}
595 593
596EXPORT_SYMBOL_GPL(ide_pci_setup_ports); 594EXPORT_SYMBOL_GPL(ide_pci_setup_ports);