[Question]About port ownership

=?ks_c_5601-1987?B?sei5zsf8?= <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
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? 
       Or could cable's electric characteristics affect the detection of
disconnection?
   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?
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? 
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?

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 followings are the related log message.
============================================================
hub 1-0:1.0: state 5 ports 2 chg 0000 evt 0002
hub 1-0:1.0: port 1, status 0501, change 0001, 480 Mb/s
hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x501
brcm-ehci brcm-ehci.0: port 1 high speed
usb 1-1: new high speed USB device using brcm-ehci and address 4
brcm-ehci brcm-ehci.0: port 1 high speed
usb 1-1: default language 0x0409
usb 1-1: new device strings: Mfr=0, Product=2, SerialNumber=3
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb-storage 1-1:1.0: usb_probe_interface
usb-storage 1-1:1.0: usb_probe_interface - got id
scsi0 : SCSI emulation for USB Mass Storage devices
brcm-ehci brcm-ehci.0: devpath 1 ep1out 3strikes
brcm-ehci brcm-ehci.0: port 1 full speed --> companion
hub 1-0:1.0: port_wait_reset: err = -134
hub 1-0:1.0: port_wait_reset: err = -134
hub 1-0:1.0: port_wait_reset: err = -134
hub 1-0:1.0: port_wait_reset: err = -134
hub 1-0:1.0: logical disconnect on port 1
hub 1-0:1.0: state 5 ports 2 chg 0002 evt 0000
hub 1-0:1.0: port 1, status 0000, change 0001, 12 Mb/s
usb 1-1: USB disconnect, address 4
usb 1-1: usb_disable_device nuking all URBs
usb 1-1: unregistering interface 1-1:1.0
usb 1-1: unregistering device
hub 1-0:1.0: debounce: port 1: total 1500ms stable 0ms status 0x0
hub 1-0:1.0: connect-debounce failed, port 1 disabled

Thanks,
Minhyoung Kim


-------------------------------------------------------------------------
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.