Messages in this thread Patch in this message | | | Subject | Re: [PATCH] PCI fixes for 2.6.0-test3 | From | Greg KH <> | Date | Thu, 21 Aug 2003 10:31:08 -0700 |
| |
ChangeSet 1.1123.21.2, 2003/08/13 17:42:56-07:00, janiceg@us.ibm.com
[PATCH] PCI: testing for probe errors in pci-driver.c
Currently if __pci_device_probe locates the correct device driver, but receives an error from the static drv->probe function, this error is not reported.
The attached patch reports the above error condition to the caller. Only when a match for the device in the static tables is not found, is the dynamic driver table searched.
drivers/pci/pci-driver.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c --- a/drivers/pci/pci-driver.c Thu Aug 21 10:22:52 2003 +++ b/drivers/pci/pci-driver.c Thu Aug 21 10:22:52 2003 @@ -122,10 +122,8 @@ if (!pci_dev->driver && drv->probe) { error = pci_device_probe_static(drv, pci_dev); - if (error >= 0) - return error; - - error = pci_device_probe_dynamic(drv, pci_dev); + if (error == -ENODEV) + error = pci_device_probe_dynamic(drv, pci_dev); } return error; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |