Re: [linux-usb-devel] Re: [OOPS, usbcore, releaseintf] 2.6.0-test10-mm1

From: David Brownell
Date: Fri Dec 12 2003 - 14:39:10 EST


Alan Stern wrote:
On Fri, 12 Dec 2003, David Brownell wrote:
I'd split step 4 into "4a" (device descriptors) and "4b"
(config descriptors) ... and then re-factor so 1..4a is
the same code as normal khubd enumeration. ...

Sure. Although depending how you do it, step 3 might be different (reuse the old address vs. assign a new address). Also the failure paths will be different. But that could all be handled with proper refactoring.

That logic has always been a bit strange -- picking out the
address _before_ it starts the reset/set_address/get_descriptor
code. Here's where that strangeness actually helps ... :)


That would also reduce the length of time the address0_sem
is held,


It would? How so?

It would be dropped after the address is assigned (the bus
no longer has an "address zero") ... rather than waiting
until after the device was configured and all its interfaces
were probed. I think that's the issue Oliver alluded to in
his followup to your comment.

- Dave


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/