Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71740
b: refs/heads/master
c: cf6e854
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 19, 2007
1 parent 1e49328 commit 5eb3fc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9a0765eac3c8df7094fd49f94ae83d80cbe4128
refs/heads/master: cf6e854efb3682322351a21e64058ffc13250914
10 changes: 4 additions & 6 deletions trunk/drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in
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 at_least_one_hwif_enabled = 0;
ide_hwif_t *hwif, *mate = NULL;
u8 tmp;

Expand All @@ -535,13 +534,15 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
/*
* Set up the IDE ports
*/

for (port = 0; port < channels; ++port) {
ide_pci_enablebit_t *e = &(d->enablebits[port]);

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 */
}

if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL)
continue;
Expand Down Expand Up @@ -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);

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);
Expand Down

0 comments on commit 5eb3fc4

Please sign in to comment.