lkml.org 
[lkml]   [2003]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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.

Janice



diff -Naur linux-2.6.0-test2.orig.pci/drivers/pci/pci-driver.c linux-2.6.0-test2.my.pci/drivers/pci/pci-driver.c
--- linux-2.6.0-test2.orig.pci/drivers/pci/pci-driver.c 2003-08-07 16:14:36.000000000 -0500
+++ linux-2.6.0-test2.my.pci/drivers/pci/pci-driver.c 2003-08-07 21:23:51.000000000 -0500
@@ -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;
}
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.030 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site