Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104990
b: refs/heads/master
c: 51d87ed
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent d152c0f commit 75d60c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 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: b36ba53218e164e49623e36fa3a2fec9f08cf70a
refs/heads/master: 51d87ed0aab98999bebaf891b99730e15502a592
20 changes: 13 additions & 7 deletions trunk/drivers/ide/setup-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports);
*/
static int do_ide_setup_pci_device(struct pci_dev *dev,
const struct ide_port_info *d,
u8 *idx, u8 noisy)
u8 noisy)
{
int tried_config = 0;
int pciirq, ret;
Expand Down Expand Up @@ -529,9 +529,7 @@ static int do_ide_setup_pci_device(struct pci_dev *dev,
d->name, pciirq);
}

/* FIXME: silent failure can happen */

ide_pci_setup_ports(dev, d, pciirq, idx);
ret = pciirq;
out:
return ret;
}
Expand All @@ -541,10 +539,14 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
int ret;

ret = do_ide_setup_pci_device(dev, d, &idx[0], 1);
ret = do_ide_setup_pci_device(dev, d, 1);

if (ret >= 0) {
/* FIXME: silent failure can happen */
ide_pci_setup_ports(dev, d, ret, &idx[0]);

if (ret >= 0)
ide_device_add(idx, d);
}

return ret;
}
Expand All @@ -558,13 +560,17 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };

for (i = 0; i < 2; i++) {
ret = do_ide_setup_pci_device(pdev[i], d, &idx[i*2], !i);
ret = do_ide_setup_pci_device(pdev[i], d, !i);

/*
* FIXME: Mom, mom, they stole me the helper function to undo
* do_ide_setup_pci_device() on the first device!
*/
if (ret < 0)
goto out;

/* FIXME: silent failure can happen */
ide_pci_setup_ports(pdev[i], d, ret, &idx[i*2]);
}

ide_device_add(idx, d);
Expand Down

0 comments on commit 75d60c4

Please sign in to comment.