mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
ide: call ide_pci_setup_ports() before do_ide_setup_pci_device()
* Call ide_pci_setup_ports() before do_ide_setup_pci_device() in ide_setup_pci_device[s](). While at it: * Remove stale FIXMEs. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
a742d6cf0b
commit
8c2eece50a
1 changed files with 11 additions and 7 deletions
|
@ -534,14 +534,16 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
ide_pci_setup_ports(dev, d, 0, &hw[0], &hws[0]);
|
||||||
|
|
||||||
ret = do_ide_setup_pci_device(dev, d, 1);
|
ret = do_ide_setup_pci_device(dev, d, 1);
|
||||||
|
if (ret < 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (ret >= 0) {
|
/* fixup IRQ */
|
||||||
/* FIXME: silent failure can happen */
|
hw[1].irq = hw[0].irq = ret;
|
||||||
ide_pci_setup_ports(dev, d, ret, &hw[0], &hws[0]);
|
|
||||||
|
|
||||||
ret = ide_host_add(d, hws, NULL);
|
ret = ide_host_add(d, hws, NULL);
|
||||||
}
|
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -559,6 +561,8 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
ide_pci_setup_ports(pdev[i], d, 0, &hw[i*2], &hws[i*2]);
|
||||||
|
|
||||||
ret = do_ide_setup_pci_device(pdev[i], d, !i);
|
ret = do_ide_setup_pci_device(pdev[i], d, !i);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -568,8 +572,8 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* FIXME: silent failure can happen */
|
/* fixup IRQ */
|
||||||
ide_pci_setup_ports(pdev[i], d, ret, &hw[i*2], &hws[i*2]);
|
hw[i*2 + 1].irq = hw[i*2].irq = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ide_host_add(d, hws, NULL);
|
ret = ide_host_add(d, hws, NULL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue