mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Leroy <colin@colino.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kernel development list <linux-kernel@vger.kernel.org>,
	USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Re: [linux-usb-devel] Re: [OOPS] reproducible oops with 2.6.5-rc2-bk3
Date: Thu, 25 Mar 2004 21:01:54 +0100	[thread overview]
Message-ID: <20040325210154.20b87112@jack.colino.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0403251341550.1083-100000@ida.rowland.org>

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

On 25 Mar 2004 at 13h03, Alan Stern wrote:

Hi, 

> In this case, your patch could be improved by calling device_initialize()  
> during the first loop and device_add() during the second. 

Here you are :)
-- 
Colin

[-- Attachment #2: cdc-acm.oops.patch --]
[-- Type: application/octet-stream, Size: 963 bytes --]

--- drivers/usb/core/message.c.orig	2004-03-25 18:34:04.000000000 +0100
+++ drivers/usb/core/message.c	2004-03-25 20:53:06.000000000 +0100
@@ -1179,10 +1179,24 @@
 				 configuration,
 				 alt->desc.bInterfaceNumber);
 			dev_dbg (&dev->dev,
+				"initializing %s (config #%d, interface %d)\n",
+				intf->dev.bus_id, configuration,
+				intf->cur_altsetting->desc.bInterfaceNumber);
+			device_initialize (&intf->dev);			
+		}
+		
+		/* all interfaces are initialized, we can now 
+		 * register them
+		 */
+		for (i = 0; i < cp->desc.bNumInterfaces; ++i) {
+			struct usb_interface *intf = cp->interface[i];
+			dev_dbg (&dev->dev,
 				"registering %s (config #%d, interface %d)\n",
 				intf->dev.bus_id, configuration,
-				alt->desc.bInterfaceNumber);
-			device_register (&intf->dev);
+				intf->cur_altsetting->desc.bInterfaceNumber);
+			if ((ret = device_add (&intf->dev)) < 0)
+				goto out;
+				
 			usb_create_driverfs_intf_files (intf);
 		}
 	}

      parent reply	other threads:[~2004-03-25 20:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <136101c4126d$c0bc5600$3cc8a8c0@epro.dom>
2004-03-25 14:44 ` Alan Stern
2004-03-25 15:20   ` Colin Leroy
2004-03-25 16:40   ` Colin Leroy
2004-03-25 16:56     ` Alan Stern
2004-03-25 17:26       ` Colin Leroy
2004-03-25 17:46       ` [PATCH] " Colin Leroy
2004-03-25 18:46         ` Alan Stern
2004-03-25 19:11           ` Colin Leroy
2004-03-25 20:22             ` Alan Stern
2004-03-25 20:01           ` Colin Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040325210154.20b87112@jack.colino.net \
    --to=colin@colino.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®