All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.9-rc3-mm1, bk-pci patch, USB hubs
@ 2004-10-03 18:33 Jon Smirl
  2004-10-04 22:11 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Smirl @ 2004-10-03 18:33 UTC (permalink / raw)
  To: lkml

These changes make the USB hub module fail to load. I get a trap in
kmem_cache_alloc called from uhci_alloc_urb_private. Reverting them
fixes it.

diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c       2004-10-03 14:22:49 -04:00
+++ b/drivers/usb/host/ehci-hcd.c       2004-10-03 14:22:49 -04:00
@@ -1092,7 +1092,7 @@
                sizeof (struct ehci_qh), sizeof (struct ehci_qtd),
                sizeof (struct ehci_itd), sizeof (struct ehci_sitd));

-       return pci_module_init (&ehci_pci_driver);
+       return pci_register_driver (&ehci_pci_driver);
 }
 module_init (init);

diff -Nru a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
--- a/drivers/usb/host/ohci-pci.c       2004-10-03 14:22:49 -04:00
+++ b/drivers/usb/host/ohci-pci.c       2004-10-03 14:22:49 -04:00
@@ -279,7 +279,7 @@

        pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name,
                sizeof (struct ed), sizeof (struct td));
-       return pci_module_init (&ohci_pci_driver);
+       return pci_register_driver (&ohci_pci_driver);
 }
 module_init (ohci_hcd_pci_init);

diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c       2004-10-03 14:22:49 -04:00
+++ b/drivers/usb/host/uhci-hcd.c       2004-10-03 14:22:49 -04:00
@@ -2534,7 +2534,7 @@
        if (!uhci_up_cachep)
                goto up_failed;

-       retval = pci_module_init(&uhci_pci_driver);
+       retval = pci_register_driver(&uhci_pci_driver);
        if (retval)
                goto init_failed;


-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.9-rc3-mm1, bk-pci patch, USB hubs
  2004-10-03 18:33 2.6.9-rc3-mm1, bk-pci patch, USB hubs Jon Smirl
@ 2004-10-04 22:11 ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-10-04 22:11 UTC (permalink / raw)
  To: Jon Smirl; +Cc: lkml

On Sun, Oct 03, 2004 at 02:33:48PM -0400, Jon Smirl wrote:
> These changes make the USB hub module fail to load. I get a trap in
> kmem_cache_alloc called from uhci_alloc_urb_private. Reverting them
> fixes it.

Thanks, but I've fixed up pci_register_driver() to not return a fake
"1", which was undocumented, and not a nice thing to do.

That patch is below, and is in my trees, which will cause it to show up
in the next -mm release.

thanks,

greg k-h


===== pci-driver.c 1.46 vs edited =====
--- 1.46/drivers/pci/pci-driver.c	2004-09-29 23:09:23 -07:00
+++ edited/pci-driver.c	2004-10-04 11:11:20 -07:00
@@ -396,13 +396,13 @@
  * @drv: the driver structure to register
  * 
  * Adds the driver structure to the list of registered drivers.
- * Returns a negative value on error. The driver remains registered
- * even if no device was claimed during registration.
+ * Returns a negative value on error, otherwise 0. 
+ * If no error occured, the driver remains registered even if 
+ * no device was claimed during registration.
  */
-int
-pci_register_driver(struct pci_driver *drv)
+int pci_register_driver(struct pci_driver *drv)
 {
-	int count = 0;
+	int error;
 
 	/* initialize common driver fields */
 	drv->driver.name = drv->name;
@@ -414,13 +414,12 @@
 	pci_init_dynids(&drv->dynids);
 
 	/* register with core */
-	count = driver_register(&drv->driver);
+	error = driver_register(&drv->driver);
 
-	if (count >= 0) {
+	if (!error)
 		pci_populate_driver_dir(drv);
-	}
 
-	return count ? count : 1;
+	return error;
 }
 
 /**

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.9-rc3-mm1, bk-pci patch, USB hubs
  2004-10-03 19:02 Hanno Meyer-Thurow
@ 2004-10-03 19:07 ` Jon Smirl
  0 siblings, 0 replies; 4+ messages in thread
From: Jon Smirl @ 2004-10-03 19:07 UTC (permalink / raw)
  To: Hanno Meyer-Thurow; +Cc: linux-kernel

I didn't check them individually, I just reverted the group. UHCI
fails for me, this fixes it. EHCI and OHCI are of unknown status for
me since I don't know if they failed too.

On Sun, 3 Oct 2004 21:02:37 +0200, Hanno Meyer-Thurow <h.mth@web.de> wrote:
> Hi Jon,
> 
> > These changes make the USB hub module fail to load. I get a trap in
> > kmem_cache_alloc called from uhci_alloc_urb_private. Reverting them
> > fixes it.
> 
> I use EHCI and UHCI and i just had to revert only the part for UHCI. EHCI works just fine here!

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 2.6.9-rc3-mm1, bk-pci patch, USB hubs
@ 2004-10-03 19:02 Hanno Meyer-Thurow
  2004-10-03 19:07 ` Jon Smirl
  0 siblings, 1 reply; 4+ messages in thread
From: Hanno Meyer-Thurow @ 2004-10-03 19:02 UTC (permalink / raw)
  To: linux-kernel

Hi Jon,

> These changes make the USB hub module fail to load. I get a trap in
> kmem_cache_alloc called from uhci_alloc_urb_private. Reverting them
> fixes it.

I use EHCI and UHCI and i just had to revert only the part for UHCI. EHCI works just fine here!


This part reverting:

diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c       2004-10-03 14:22:49 -04:00
+++ b/drivers/usb/host/uhci-hcd.c       2004-10-03 14:22:49 -04:00
@@ -2534,7 +2534,7 @@
        if (!uhci_up_cachep)
                goto up_failed;

-       retval = pci_module_init(&uhci_pci_driver);
+       retval = pci_register_driver(&uhci_pci_driver);
        if (retval)
                goto init_failed;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-04 22:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-03 18:33 2.6.9-rc3-mm1, bk-pci patch, USB hubs Jon Smirl
2004-10-04 22:11 ` Greg KH
2004-10-03 19:02 Hanno Meyer-Thurow
2004-10-03 19:07 ` Jon Smirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.