public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] testing for probe errors in pci-driver.c
@ 2003-08-08 18:46 Janice M Girouard
  0 siblings, 0 replies; only message in thread
From: Janice M Girouard @ 2003-08-08 18:46 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 342 bytes --]

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




[-- Attachment #2: pci.patch --]
[-- Type: text/plain, Size: 598 bytes --]

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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-08 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-08 18:46 [PATCH] testing for probe errors in pci-driver.c Janice M Girouard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox