Alan Stern wrote:
> On Tue, 13 Feb 2007, Raphael Assenat wrote:
>>I have some pxa270 based single board computers which have an 
>>IT8152G companion chip. This chip has a built-in USB Host controller 
>>which is (according to the datasheet) register compatible with OHCI 
>>specification version 1.0.
>>
>>During boot, I see that the OHCI controller is detected properly. 
>>Devices that were already connected to the USB ports handled by this 
>>chip are also detected at boot time. And they work correcly.
>>
>>But when I connect a new device to a free port, nothing happens.
> 
> 
> Is that true even if there was also a device attached at boot time, or 
> does it happen only when you connect a new device and all the ports are 
> unoccupied?
I had not thought of trying that... I did some tests and found that 
if a device was present at boot time, new devices _are_ detected 
correctly. And as long as the number of connected devices does not 
fall down to 0, all ports work normally.

>> No 
>>messages in dmesg, and the device does not seem to initialize. (eg: 
>>Led under optical mouse does not turn on). I have verified, and 
>>there is power on the USB power pins. If I disconnect a device that 
>>was present at boot time and reconnect it, it is not re-detected.
>>
>>Here is a list of kernel version I was able to test with, and the 
>>results:
>>2.6.20 -> Same problems as described above.
>>2.6.18 -> Same problems as described above.
>>2.6.17.5 -> Same problems as described above.
>>2.6.16.12 -> Everything works fine.
>>
>>Suspecting that this could be a bug in the chip's implementation 
>>exposed by some new features, I started looking at the code in the 
>>hope to find stuff like controller specific work arounds, quirks, 
>>etc to try. but I found nothing that was applicable to my problem...
> 
> 
> It sounds like your chip doesn't obey the RHSC bit in the
> HcInterruptEnable register.  But the problem might be something else.
Well it seems that no interrupts are generated when I 
connect/disconnect a new device... The counter in /proc/interrupt 
stays the same.
before connecting a device:
167:        216      it8152  ohci_hcd:usb2
after connection a device:
167:        216      it8152  ohci_hcd:usb2

> 
> If you want to get useful information from the system log, you have to 
> turn on CONFIG_USB_DEBUG.
> 
Ok, below you'll find some of the output I got when booting with a 
device connected and when connecting/disconnecting devices. In case 
you wonder, usb1 is the pxa270's ohci controller.

I was wondering, can this be a problem?
hub 2-0:1.0: trying to enable port power on non-switchable hub

And apparently, once I get this message, the ports stop working.
ohci_hcd 0000:00:01.4: auto-stop root hub



ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) 
Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
pxa27x-ohci pxa27x-ohci: GetStatus roothub.portstatus [1] = 
0x00010101 CSC PPS CCS
hub 1-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
ohci_hcd 0000:00:01.4: OHCI Host Controller
drivers/usb/core/inode.c: creating file '002'
ohci_hcd 0000:00:01.4: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:01.4: created debug files
ohci_hcd 0000:00:01.4: irq 167, io mem 0x10000000
ohci_hcd 0000:00:01.4: resetting from state 'reset', control = 0x0
ohci_hcd 0000:00:01.4: OHCI controller state
ohci_hcd 0000:00:01.4: OHCI 1.0, NO legacy support registers
ohci_hcd 0000:00:01.4: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:01.4: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:01.4: intrstatus 0x00000044 RHSC SF
ohci_hcd 0000:00:01.4: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:01.4: hcca frame #0003
ohci_hcd 0000:00:01.4: roothub.a 01000202 POTPGT=1 NPS NDP=2(2)
ohci_hcd 0000:00:01.4: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:01.4: roothub.status 00008000 DRWE
ohci_hcd 0000:00:01.4: roothub.portstatus [0] 0x00010101 CSC PPS CCS
ohci_hcd 0000:00:01.4: roothub.portstatus [1] 0x00000100 PPS
usb usb2: default language 0x0409
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.20-8d ohci_hcd
usb usb2: SerialNumber: 0000:00:01.4
usb usb2: uevent
usb usb2: usb_probe_device
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: no power switching (usb 1.0)
hub 2-0:1.0: global over-current protection
hub 2-0:1.0: power on to power good time: 2ms
hub 2-0:1.0: local power source is good
hub 2-0:1.0: no over-current condition exists
hub 2-0:1.0: trying to enable port power on non-switchable hub
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0002
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [0] = 0x00010101 
CSC PPS CCS
hub 2-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 2-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [0] = 0x00100103 
PRSC PPS PES S
usb 2-1: new full speed USB device using ohci_hcd and address 2
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [0] = 0x00100103 
PRSC PPS PES S
usb 2-1: default language 0x0409
usb 2-1: new device strings: Mfr=2, Product=3, SerialNumber=4
usb 2-1: Product: ImageMate 8 in 1
usb 2-1: Manufacturer: SanDisk
usb 2-1: SerialNumber: 0200472688
usb 2-1: uevent
usb 2-1: usb_probe_device
usb 2-1: configuration #1 chosen from 1 choice
usb 2-1: adding 2-1:1.0 (config #1, interface 0)
usb 2-1:1.0: uevent
drivers/usb/core/inode.c: creating file '002'
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0002
...
** now I connect a new device, disconnect the first one, reconnect it...
...
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [1] = 0x00010101 
CSC PPS CCS
hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x101
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [1] = 0x00100103 
PRSC PPS PES S
usb 2-2: new full speed USB device using ohci_hcd and address 6
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [1] = 0x00100103 
PRSC PPS PES S
usb 2-2: ep0 maxpacket = 8
usb 2-2: skipped 4 descriptors after interface
usb 2-2: skipped 2 descriptors after interface
usb 2-2: skipped 1 descriptor after endpoint
usb 2-2: skipped 2 descriptors after interface
usb 2-2: skipped 1 descriptor after endpoint
usb 2-2: default language 0x0409
usb 2-2: new device strings: Mfr=0, Product=2, SerialNumber=0
usb 2-2: Product: Camera
usb 2-2: uevent
usb 2-2: usb_probe_device
usb 2-2: configuration #1 chosen from 1 choice
usb 2-2: adding 2-2:1.0 (config #1, interface 0)
usb 2-2:1.0: uevent
usb 2-2: adding 2-2:1.1 (config #1, interface 1)
usb 2-2:1.1: uevent
usb 2-2: adding 2-2:1.2 (config #1, interface 2)
usb 2-2:1.2: uevent
drivers/usb/core/inode.c: creating file '006'
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [1] = 0x00030100 
PESC CSC PPS
hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
usb 2-2: USB disconnect, address 6
usb 2-2: unregistering device
usb 2-2: usb_disable_device nuking all URBs
usb 2-2: unregistering interface 2-2:1.0
  usbdev2.6_ep81: ep_device_release called for usbdev2.6_ep81
  usbdev2.6_ep82: ep_device_release called for usbdev2.6_ep82
usb 2-2:1.0: uevent
usb 2-2: unregistering interface 2-2:1.1
usb 2-2:1.1: uevent
usb 2-2: unregistering interface 2-2:1.2
usb 2-2:1.2: uevent
  usbdev2.6_ep00: ep_device_release called for usbdev2.6_ep00
usb 2-2: uevent
hub 2-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x100
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0002
ohci_hcd 0000:00:01.4: GetStatus roothub.portstatus [0] = 0x00030100 
PESC CSC PPS
hub 2-0:1.0: port 1, status 0100, change 0003, 12 Mb/s
usb 2-1: USB disconnect, address 5
usb 2-1: unregistering device
usb 2-1: usb_disable_device nuking all URBs
usb 2-1: unregistering interface 2-1:1.0
  usbdev2.5_ep81: ep_device_release called for usbdev2.5_ep81
  usbdev2.5_ep02: ep_device_release called for usbdev2.5_ep02
usb 2-1:1.0: uevent
  usbdev2.5_ep00: ep_device_release called for usbdev2.5_ep00
usb 2-1: uevent
hub 2-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
ohci_hcd 0000:00:01.4: auto-stop root hub

Best regards,

-- 
Raphael Assenat
8D Technologies Inc.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to