Re: [Question]About port ownership

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Tue, 18 Sep 2007, [ks_c_5601-1987] ±è¹ÎÇü wrote:

> Hi everyone,
> 
> I am a beginner in USB driver.
> I have some questions.
> I don't know whether it is proper or not, to ask you in this mailing list.
> But I need help
> 
> My test environment :
> Kernel Version - 2.6.12
> USB controller - Broadcom (EHCI/OHCI)
> Cable Length - about 3.x m
> (Note. The following phenomenon doesn't occur with NEC HC and Kernel 2.6.12)
> 
> Sequence of reproduction & Questions:
> 1. Connect USB device (Transcend 1GB thumb-drive).
> 2. Then, USB EHCI driver detects new device. The device is registered as
> high speed device and SCSI driver probe the device.
> 3. Remove the USB device.
>    EHCI port status register doesn't report the disconnection of the device.
>    Q. Is it Broadcom chip's problem? 

Yes.

>        Or could cable's electric characteristics affect the detection of
> disconnection?

I doubt it.  But you can always try using a different cable.

>    Port reset resulted from USB_STOR_TRANSPORT_ERROR in
> usb_stor_invoke_transport causes EHCI driver to change a port ownership.
>    Q. According to the EHCI specification, port ownership is returned
> immediately to the EHCI controller when device is disconnected during a
> companion HC has ownership. In this situation, device was already
> disconnected. Is changing ownership to companion HC a correct operation
> although device was already disconnected? If it is, then who is responsible
> for returning port ownership to the EHCI controller?

It is not correct.  The EHCI controller should keep port ownership and 
mark the port as disconnected.

> 4. Wait for about 20 ~ 30 seconds
> 5. Connect the USB device again.
> 6. USB OHCI driver detects new device. New device is registered as full
> speed device. 
>   Q. When connecting new device with enabling all debug prints, port
> ownership is return to the EHCI controller and new device is detected by
> EHCI driver. Who does change port ownership? 

The EHCI controller is in charge of the port ownership switch.

> But when debug prints are disabled, companion HC still has port ownership
> and OHCI driver detects new device. How does debug prints affect changing
> port ownership?

They do not affect it directly.  But they can affect the timing of 
various operations, and the timing might affect the controller's 
operation.

> Additional question.
> Q. When USB driver set PORT_RESET bit, it also clear PORT_ENABLE bit.
>    Who does enable the port after reset? Does HC enable the port
> automatically? Or does driver enable the port?

The controller enables the port automatically.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.