Fwd: [Linux-usb-users] hotplug problem with a full speed HID device

134 views
Skip to first unread message

Xiaofan Chen

unread,
Dec 7, 2005, 8:32:06 AM12/7/05
to pickit...@googlegroups.com
The following is the reply from one of the Linux USB developer regarding
the hotplug problems I am facing with PICkit 2. I have not tried 2.6.14
kernel yet since I have yet to learn to compile a kernel on Ubuntu.

Regards,
Xiaofan

---------- Forwarded message ----------
From: Alan Stern <st...@rowland.harvard.edu>
Date: Dec 5, 2005 12:31 AM
Subject: Re: [Linux-usb-users] hotplug problem with a full speed HID device
To: Xiaofan Chen <xiao...@gmail.com>
Cc: linux-u...@lists.sourceforge.net


On Sun, 4 Dec 2005, Xiaofan Chen wrote:

> Microchip PICkit 2 MCU programmer is a low cost USB full speed
> programmer for Microchip MCUs.
>
> There is a problem with hotplugging PICkit 2. Often we need to
> plug and unplug it several times in order to get it appeared in lsusb.
>
> Regards,
> Xiaofan Chen
>
>
> mcuee@ubuntu:/etc/hotplug/usb$ uname -a
> Linux ubuntu 2.6.10-5-k7 #1 Tue Apr 5 12:56:05 UTC 2005 i686 GNU/Linux
>
> mcuee@ubuntu:/etc/hotplug/usb$ dmesg
> ...
> hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
> Microcontroller Programmer] on usb-0000:00:02.1-2
> hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
> Microcontroller Programmer] on usb-0000:00:02.1-2
> usb 2-2: USB disconnect, address 3
> ohci_hcd 0000:00:02.1: wakeup
> usb 2-2: new full speed USB device using ohci_hcd and address 4
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: new full speed USB device using ohci_hcd and address 5
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> ohci_hcd 0000:00:02.1: wakeup
> usb 2-2: new full speed USB device using ohci_hcd and address 6
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: new full speed USB device using ohci_hcd and address 7
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> ohci_hcd 0000:00:02.1: wakeup
> usb 2-2: new full speed USB device using ohci_hcd and address 8
> usb 2-2: configuration #1 chosen from 2 choices
> hiddev96: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2
> Microcontroller Programmer] on usb-0000:00:02.1-2
> usb 2-2: usbfs: interface 0 claimed while 'pyk' sets config #1

Try using a more recent kernel, like 2.6.14. In 2.6.10 there is a
timing bug related to USB device detection and initialization.

It's also possible that your problem is caused by a bad cable or a bad
cable connection.

Alan Stern

Steven...@microchip.com

unread,
Dec 7, 2005, 10:13:36 AM12/7/05
to pickit...@googlegroups.com

Hi Xiaofan,

Since Ubuntu is from the Debian distribution, the compiling the kernel is the same.


Steven Bible  [steven...@microchip.com]
Principle Applications Engineer
Microchip Technology Inc.




Xiaofan Chen <xiao...@gmail.com>
Sent by: pickit...@googlegroups.com

12/07/2005 06:32 AM
Please respond to pickit-devel

       
        To:        pickit...@googlegroups.com

        cc:        

        Subject:        Fwd: [Linux-usb-users] hotplug problem with a full speed HID device

Chen Xiao Fan

unread,
Dec 7, 2005, 10:09:35 PM12/7/05
to pickit...@googlegroups.com

>Hi Xiaofan,
>
>Since Ubuntu is from the Debian distribution, the compiling
>the kernel is the same.
>
>Steven Bible [steven...@microchip.com]

I am still using Ubuntu 5.04 with 2.6.10 kernel. Ubuntu 5.10
is using 2.6.12 kernel with Ubuntu specific patches. The
latest testing version of Ubuntu has 2.6.14 or 2.6.15pre
kernels but I am reluctant to update my system now.

Therefore I will learn to build a Ubuntu kernel
without updating the other part of the system. It
seems to me that this is really necessary to test USB
related stuffs under Linux. However I am not so sure
if I need to use Ubuntu specific kernel or the generic
Linux kernels.

Regards,
Xiaofan

Mark Rages

unread,
Dec 7, 2005, 10:28:38 PM12/7/05
to pickit...@googlegroups.com

I see the same problem (I'm using 2.6.10-1.771_FC2).

Xiaofan, I would recommend using the generic kernel from kernel.org.
The instructions in the Readme should get you started.

Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
- fortune cookie

Chen Xiao Fan

unread,
Dec 7, 2005, 10:48:40 PM12/7/05
to pickit...@googlegroups.com

> -----Original Message-----
> From: pickit...@googlegroups.com
>
> I see the same problem (I'm using 2.6.10-1.771_FC2).
>
> Xiaofan, I would recommend using the generic kernel from kernel.org.
> The instructions in the Readme should get you started.
>
> Regards,
> Mark
> markrages@gmail

I will do that. I used to compile my own Linux 2.4 kernels quite
3/4 years back (tried Slackware/Redhat/Mandrake before) using
generic kernels. Back at that time, kernel updates were really
necessary to get the hardware working. The latest Linux versions
are much better. Ubuntu 5.04 and FC4 are almost working right out
of the box on my AMD64 desktop and Dell 600M notebook
respectively. My wife is using the Dell 600M so I seldom
boot up the FC4 though.

It seems to me that 2.6 kernels are more difficult to build.
The Debian/Ubuntu systems also have specific kernel updating
instructions which I have not yet tried (more complicated).
I will try to build the latest vanilla 2.6.14.4 kernel and
reports the progress here.

Regards,
Xiaofan

Xiaofan Chen

unread,
Dec 8, 2005, 8:51:27 AM12/8/05
to Alan Stern, linux-u...@lists.sourceforge.net, pickit...@googlegroups.com
On 12/5/05, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Sun, 4 Dec 2005, Xiaofan Chen wrote:
> >
> > There is still a problem with hotplugging PICkit 2. Often we need to

> > plug and unplug it several times in order to get it appeared in lsusb.
> >
> > Regards,
> > Xiaofan Chen
> > http://groups.google.com/group/pickit-devel/

> >
> >
> > mcuee@ubuntu:/etc/hotplug/usb$ uname -a
> > Linux ubuntu 2.6.10-5-k7 #1 Tue Apr 5 12:56:05 UTC 2005 i686 GNU/Linux
>
> Try using a more recent kernel, like 2.6.14. In 2.6.10 there is a
> timing bug related to USB device detection and initialization.
>
> It's also possible that your problem is caused by a bad cable or a bad
> cable connection.
>
> Alan Stern


On 12/5/05, Alan Stern <st...@rowland.harvard.edu> wrote:
> On Sun, 4 Dec 2005, Xiaofan Chen wrote:

> > There is still a problem with hotplugging PICkit 2. Often we need to


> > plug and unplug it several times in order to get it appeared in lsusb.
> >
> > Regards,
> > Xiaofan Chen

> > http://groups.google.com/group/pickit-devel/


> >
> >
> > mcuee@ubuntu:/etc/hotplug/usb$ uname -a
> > Linux ubuntu 2.6.10-5-k7 #1 Tue Apr 5 12:56:05 UTC 2005 i686 GNU/Linux
>

> Try using a more recent kernel, like 2.6.14. In 2.6.10 there is a
> timing bug related to USB device detection and initialization.
>
> It's also possible that your problem is caused by a bad cable or a bad
> cable connection.
>
> Alan Stern
>

Thanks for the reply. I just tried the latest 2.6.14.3 kernel and the same thing
happens here. Hotplugging still causes problem with PICkit 2 programmer.
Is this has anything to do with the fact it has dual configurations?
What does this "error -110" exactly mean?

Attached please find the error information.

Regards,
Xiaofan

mcuee@ubuntu:~$ uname -a
Linux ubuntu 2.6.14.3 #1 Thu Dec 8 21:02:46 SGT 2005 i686 GNU/Linux
mcuee@ubuntu:~$ dmesg
...
[17179781.816000] usb 1-3: device descriptor read/64, error -110
[17179781.992000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 100103 PRSC PPS PES CCS
[17179782.048000] usb 1-3: new full speed USB device using ohci_hcd
and address 37
[17179782.048000] ohci_hcd 0000:00:02.0: urb d8d32bc0 path 3 ep0out
5ec20000 cc 5 --> status -110
[17179782.252000] ohci_hcd 0000:00:02.0: urb d8d32b40 path 3 ep0out
5ec20000 cc 5 --> status -110
[17179782.456000] usb 1-3: device not accepting address 37, error -110
[17179782.528000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 100103 PRSC PPS PES CCS
[17179782.584000] usb 1-3: new full speed USB device using ohci_hcd
and address 38
[17179782.584000] ohci_hcd 0000:00:02.0: urb d8d32bc0 path 3 ep0out
5ec20000 cc 5 --> status -110
[17179782.788000] ohci_hcd 0000:00:02.0: urb d8d32bc0 path 3 ep0out
5ec20000 cc 5 --> status -110
[17179782.992000] usb 1-3: device not accepting address 38, error -110
[17179782.992000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
[17179783.868000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
[17179783.868000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 010100 CSC PPS
[17179783.868000] hub 1-0:1.0: port 3, status 0100, change 0001, 12 Mb/s
[17179783.996000] hub 1-0:1.0: debounce: port 3: total 100ms stable
100ms status 0x100
[17179787.928000] hub 3-0:1.0: state 5 ports 8 chg 0000 evt 0020
[17179787.928000] ehci_hcd 0000:00:02.2: GetStatus port 5 status
001803 POWER si g=j CSC CONNECT
[17179787.928000] hub 3-0:1.0: port 5, status 0501, change 0001, 480 Mb/s
[17179788.056000] hub 3-0:1.0: debounce: port 5: total 100ms stable
100ms status 0x501
[17179788.112000] ehci_hcd 0000:00:02.2: port 5 full speed --> companion
[17179788.112000] ehci_hcd 0000:00:02.2: GetStatus port 5 status
003001 POWER OW NER sig=se0 CONNECT
[17179788.152000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
[17179788.152000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 010101 CSC PPS CCS
[17179788.152000] hub 1-0:1.0: port 3, status 0101, change 0001, 12 Mb/s
[17179788.280000] hub 1-0:1.0: debounce: port 3: total 100ms stable
100ms status 0x101
[17179788.352000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 100103 PRSC PPS PES CCS
[17179788.408000] usb 1-3: new full speed USB device using ohci_hcd
and address 39
[17179788.480000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
[2] = 0x00 100103 PRSC PPS PES CCS
[17179788.556000] usb 1-3: ep0 maxpacket = 8
[17179788.572000] usb 1-3: skipped 1 descriptor after interface
[17179788.580000] usb 1-3: default language 0x0409
[17179788.588000] usb 1-3: new device strings: Mfr=1, Product=2, SerialNumber=3
[17179788.588000] usb 1-3: Product: PICkit 2 Microcontroller Programmer
[17179788.588000] usb 1-3: Manufacturer: Microchip Technology Inc.
[17179788.588000] usb 1-3: SerialNumber: PIC18F2550
[17179788.588000] usb 1-3: hotplug
[17179788.588000] usb 1-3: configuration #1 chosen from 2 choices
[17179788.596000] usb 1-3: adding 1-3:1.0 (config #1, interface 0)
[17179788.596000] usb 1-3:1.0: hotplug
[17179788.600000] usbhid 1-3:1.0: usb_probe_interface
[17179788.600000] usbhid 1-3:1.0: usb_probe_interface - got id
[17179788.612000] drivers/usb/core/file.c: looking for a minor, starting at 96
[17179788.612000] hiddev96: USB HID v0.01 Device [Microchip Technology
Inc. PICk it 2 Microcontroller Programmer] on usb-0000:00:02.0-3
[17179788.612000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
[17179788.824000] usb 1-3: usbfs: interface 0 claimed by usbhid while
'pyk' sets config #1
[17179788.824000] drivers/usb/core/file.c: removing 96 minor

Chen Xiao Fan

unread,
Dec 8, 2005, 9:00:59 PM12/8/05
to pickit...@googlegroups.com

> -----Original Message-----
> From: pickit...@googlegroups.com
>
> I see the same problem (I'm using 2.6.10-1.771_FC2).
>
> Xiaofan, I would recommend using the generic kernel from
> kernel.org. The instructions in the Readme should get you
> started.
>
> Regards,
> Mark
> markrages@gmail

Yesterday evening I compiled the 2.6.14.3 kernel. I just
followed the README and it is as easy as before. The only
catch is the generation of initrd.img file since I need
to use mkinitramfs instead of mkinitrd. I may want to
learn to compile Ubuntu specific kernel as well later.

I enabled the usb debug info option so that I can submit
the error log to the Linux USB experts more effectively.

The new kernel does not help. I tried to hotplugging
PICkit 2 under the new kernel and it often still has
problems.

Interestingly, after this I reboot to Windows and
Windows does not recognize PICkit 2 as well. I need
to unplug and plug several times so that Windows
recognize PICkit 2 just like the same under Linux.

Therefore I suspect that there is a bug with the
firmware. I guess that there is not enough delay during
power up. But this is just a wild guess.

Regards,
Xiaofan

Xiaofan Chen

unread,
Dec 9, 2005, 6:53:22 AM12/9/05
to Alan Stern, linux-u...@lists.sourceforge.net, pickit...@googlegroups.com
On 12/8/05, Alan Stern <st...@rowland.harvard.edu> wrote:
>
> 110 is ETIMEDOUT; see include/asm-generic/errno.h. In
> Documentation/usb/error-codes.txt it says that -ETIMEDOUT indicates
> either the device failed to respond to a request or a timeout expired
> before a transfer was completed.
>

> > [17179782.992000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
> > [17179783.868000] hub 1-0:1.0: state 5 ports 4 chg 0000 evt 0008
> > [17179783.868000] ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus
> > [2] = 0x00 010100 CSC PPS
> > [17179783.868000] hub 1-0:1.0: port 3, status 0100, change 0001, 12 Mb/s
> > [17179783.996000] hub 1-0:1.0: debounce: port 3: total 100ms stable
> > 100ms status 0x100
>

> It looks like you unplugged the device and then plugged it in again four
> seconds later.
>

Yes I plugged and unplugged several times until it is recognized again.

Attached please find some more information. It seems to me if I unplug and
plug in PICkit 2 back slowly, it would be okay. If I unplug and plug back
a bit faster, then it starts to show problems. Is this normal among HID
device? Could it be that there is a possible firmware bug?

In fact there is a low speed PICkit 1 device (similar to PICkit 2 but it
is a low speed USB 1.1 device) which never show this problem. PICkit 2
is a full speed USB 2.0 device.

Regards,
Xiaofan


The following are the output of dmesg of three times unplug and plug.
1) First plug in : no problem

mcuee@ubuntu:~$ dmesg
...
[17180156.504000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180156.504000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00030100 PESC CSC PPS
[17180156.504000] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[17180156.504000] usb 2-2: USB disconnect, address 2
[17180156.504000] usb 2-2: usb_disable_device nuking all URBs
[17180156.504000] usb 2-2: unregistering interface 2-2:1.0
[17180156.504000] usb 2-2:1.0: hotplug
[17180156.524000] usb 2-2: unregistering device
[17180156.524000] usb 2-2: hotplug
[17180156.652000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x100
[17180156.756000] ohci_hcd 0000:00:02.1: suspend root hub
[17180179.300000] hub 3-0:1.0: state 5 ports 8 chg 0000 evt 0010
[17180179.300000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
001803 POWER sig=j CSC CONNECT
[17180179.300000] hub 3-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
[17180179.428000] hub 3-0:1.0: debounce: port 4: total 100ms stable
100ms status 0x501
[17180179.484000] ehci_hcd 0000:00:02.2: port 4 full speed --> companion
[17180179.484000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
003001 POWER OWNER sig=se0 CONNECT
[17180179.484000] ohci_hcd 0000:00:02.1: wakeup
[17180179.688000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180179.688000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00010101 CSC PPS CCS
[17180179.688000] hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
[17180179.816000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x101
[17180179.888000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180179.944000] usb 2-2: new full speed USB device using ohci_hcd
and address 3
[17180180.016000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180180.092000] usb 2-2: ep0 maxpacket = 8
[17180180.108000] usb 2-2: skipped 1 descriptor after interface
[17180180.116000] usb 2-2: default language 0x0409
[17180180.124000] usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=3
[17180180.124000] usb 2-2: Product: PICkit 2 Microcontroller Programmer
[17180180.124000] usb 2-2: Manufacturer: Microchip Technology Inc.
[17180180.124000] usb 2-2: SerialNumber: PIC18F2550
[17180180.124000] usb 2-2: hotplug
[17180180.124000] usb 2-2: configuration #1 chosen from 2 choices
[17180180.132000] usb 2-2: adding 2-2:1.0 (config #1, interface 0)
[17180180.132000] usb 2-2:1.0: hotplug
[17180180.160000] usbhid 2-2:1.0: usb_probe_interface
[17180180.160000] usbhid 2-2:1.0: usb_probe_interface - got id
[17180180.168000] drivers/usb/core/file.c: looking for a minor, starting at 96
[17180180.168000] hiddev96: USB HID v0.01 Device [Microchip Technology
Inc. PICkit 2 Microcontroller Programmer] on usb-0000:00:02.1-2
[17180180.172000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180180.544000] usb 2-2: usbfs: interface 0 claimed by usbhid while
'pyk' sets config #1
[17180180.544000] drivers/usb/core/file.c: removing 96 minor

2) unplug and wait for sometime and plug in PICkit 2 again : no problem

[17180580.872000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180580.872000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00030100 PESC CSC PPS
[17180580.872000] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[17180580.872000] usb 2-2: USB disconnect, address 3
[17180580.872000] usb 2-2: usb_disable_device nuking all URBs
[17180580.872000] usb 2-2: unregistering interface 2-2:1.0
[17180580.872000] usb 2-2:1.0: hotplug
[17180580.872000] usb 2-2: unregistering device
[17180580.872000] usb 2-2: hotplug
[17180581.052000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x100
[17180581.124000] ohci_hcd 0000:00:02.1: suspend root hub
[17180585.524000] hub 3-0:1.0: state 5 ports 8 chg 0000 evt 0010
[17180585.524000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
001803 POWER sig=j CSC CONNECT
[17180585.524000] hub 3-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
[17180585.652000] hub 3-0:1.0: debounce: port 4: total 100ms stable
100ms status 0x501
[17180585.708000] ehci_hcd 0000:00:02.2: port 4 full speed --> companion
[17180585.708000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
003001 POWER OWNER sig=se0 CONNECT
[17180585.708000] ohci_hcd 0000:00:02.1: wakeup
[17180585.912000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180585.912000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00010101 CSC PPS CCS
[17180585.912000] hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
[17180586.040000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x101
[17180586.112000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180586.168000] usb 2-2: new full speed USB device using ohci_hcd
and address 4
[17180586.240000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180586.316000] usb 2-2: ep0 maxpacket = 8
[17180586.332000] usb 2-2: skipped 1 descriptor after interface
[17180586.340000] usb 2-2: default language 0x0409
[17180586.348000] usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=3
[17180586.348000] usb 2-2: Product: PICkit 2 Microcontroller Programmer
[17180586.348000] usb 2-2: Manufacturer: Microchip Technology Inc.
[17180586.348000] usb 2-2: SerialNumber: PIC18F2550
[17180586.348000] usb 2-2: hotplug
[17180586.348000] usb 2-2: configuration #1 chosen from 2 choices
[17180586.356000] usb 2-2: adding 2-2:1.0 (config #1, interface 0)
[17180586.356000] usb 2-2:1.0: hotplug
[17180586.384000] usbhid 2-2:1.0: usb_probe_interface
[17180586.384000] usbhid 2-2:1.0: usb_probe_interface - got id
[17180586.392000] drivers/usb/core/file.c: looking for a minor, starting at 96
[17180586.392000] hiddev96: USB HID v0.01 Device [Microchip Technology
Inc. PICkit 2 Microcontroller Programmer] on usb-0000:00:02.1-2
[17180586.396000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180586.620000] usb 2-2: usbfs: interface 0 claimed by usbhid while
'pyk' sets config #1
[17180586.620000] drivers/usb/core/file.c: removing 96 minor

3) 3rd time unplug and then plug in faster then 2) : got problem

[17180598.260000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180598.260000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00030100 PESC CSC PPS
[17180598.260000] hub 2-0:1.0: port 2, status 0100, change 0003, 12 Mb/s
[17180598.260000] usb 2-2: USB disconnect, address 4
[17180598.260000] usb 2-2: usb_disable_device nuking all URBs
[17180598.260000] usb 2-2: unregistering interface 2-2:1.0
[17180598.260000] usb 2-2:1.0: hotplug
[17180598.260000] usb 2-2: unregistering device
[17180598.260000] usb 2-2: hotplug
[17180598.400000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x100
[17180598.512000] ohci_hcd 0000:00:02.1: suspend root hub
[17180603.164000] hub 3-0:1.0: state 5 ports 8 chg 0000 evt 0010
[17180603.164000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
001803 POWER sig=j CSC CONNECT
[17180603.164000] hub 3-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
[17180603.292000] hub 3-0:1.0: debounce: port 4: total 100ms stable
100ms status 0x501
[17180603.348000] ehci_hcd 0000:00:02.2: port 4 full speed --> companion
[17180603.348000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
003001 POWER OWNER sig=se0 CONNECT
[17180603.348000] ohci_hcd 0000:00:02.1: wakeup
[17180603.552000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180603.552000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00010101 CSC PPS CCS
[17180603.552000] hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
[17180603.680000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x101
[17180603.752000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180603.808000] usb 2-2: new full speed USB device using ohci_hcd
and address 5
[17180603.808000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180603.812000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180603.812000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180603.884000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180603.940000] usb 2-2: device descriptor read/64, error -110
[17180604.044000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.048000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.048000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.120000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180604.176000] usb 2-2: device descriptor read/64, error -110
[17180604.352000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180604.408000] usb 2-2: new full speed USB device using ohci_hcd
and address 6
[17180604.408000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.412000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.412000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.484000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180604.540000] usb 2-2: device descriptor read/64, error -110
[17180604.644000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.648000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.648000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0in


5ec20000 cc 5 --> status -110

[17180604.720000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180604.776000] usb 2-2: device descriptor read/64, error -110
[17180604.952000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180605.008000] usb 2-2: new full speed USB device using ohci_hcd
and address 7
[17180605.008000] ohci_hcd 0000:00:02.1: urb cde4ab40 path 2 ep0out


5ec20000 cc 5 --> status -110

4) wait for sometime, and the plug in again slowly, no problem again

[17180605.212000] ohci_hcd 0000:00:02.1: urb d0514240 path 2 ep0out


5ec20000 cc 5 --> status -110

[17180605.416000] usb 2-2: device not accepting address 7, error -110
[17180605.488000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180605.544000] usb 2-2: new full speed USB device using ohci_hcd
and address 8
[17180605.544000] ohci_hcd 0000:00:02.1: urb d8d2be40 path 2 ep0out


5ec20000 cc 5 --> status -110

[17180605.748000] ohci_hcd 0000:00:02.1: urb d8d2be40 path 2 ep0out


5ec20000 cc 5 --> status -110

[17180605.952000] usb 2-2: device not accepting address 8, error -110
[17180605.952000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180840.936000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180840.936000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00010100 CSC PPS
[17180840.936000] hub 2-0:1.0: port 2, status 0100, change 0001, 12 Mb/s
[17180841.064000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x100
[17180841.188000] ohci_hcd 0000:00:02.1: suspend root hub
[17180847.352000] hub 3-0:1.0: state 5 ports 8 chg 0000 evt 0010
[17180847.352000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
001803 POWER sig=j CSC CONNECT
[17180847.352000] hub 3-0:1.0: port 4, status 0501, change 0001, 480 Mb/s
[17180847.480000] hub 3-0:1.0: debounce: port 4: total 100ms stable
100ms status 0x501
[17180847.536000] ehci_hcd 0000:00:02.2: port 4 full speed --> companion
[17180847.536000] ehci_hcd 0000:00:02.2: GetStatus port 4 status
003001 POWER OWNER sig=se0 CONNECT
[17180847.536000] ohci_hcd 0000:00:02.1: wakeup
[17180847.740000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180847.740000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00010101 CSC PPS CCS
[17180847.740000] hub 2-0:1.0: port 2, status 0101, change 0001, 12 Mb/s
[17180847.868000] hub 2-0:1.0: debounce: port 2: total 100ms stable
100ms status 0x101
[17180847.940000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180847.996000] usb 2-2: new full speed USB device using ohci_hcd
and address 9
[17180848.068000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus
[1] = 0x00100103 PRSC PPS PES CCS
[17180848.144000] usb 2-2: ep0 maxpacket = 8
[17180848.160000] usb 2-2: skipped 1 descriptor after interface
[17180848.168000] usb 2-2: default language 0x0409
[17180848.176000] usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=3
[17180848.176000] usb 2-2: Product: PICkit 2 Microcontroller Programmer
[17180848.176000] usb 2-2: Manufacturer: Microchip Technology Inc.
[17180848.176000] usb 2-2: SerialNumber: PIC18F2550
[17180848.176000] usb 2-2: hotplug
[17180848.176000] usb 2-2: configuration #1 chosen from 2 choices
[17180848.184000] usb 2-2: adding 2-2:1.0 (config #1, interface 0)
[17180848.184000] usb 2-2:1.0: hotplug
[17180848.184000] usbhid 2-2:1.0: usb_probe_interface
[17180848.184000] usbhid 2-2:1.0: usb_probe_interface - got id
[17180848.196000] drivers/usb/core/file.c: looking for a minor, starting at 96
[17180848.216000] hiddev96: USB HID v0.01 Device [Microchip Technology
Inc. PICkit 2 Microcontroller Programmer] on usb-0000:00:02.1-2
[17180848.216000] hub 2-0:1.0: state 5 ports 4 chg 0000 evt 0004
[17180848.448000] usb 2-2: usbfs: interface 0 claimed by usbhid while
'pyk' sets config #1
[17180848.448000] drivers/usb/core/file.c: removing 96 minor

John DeGood

unread,
Dec 10, 2005, 7:35:19 AM12/10/05
to pickit...@googlegroups.com
On 12/9/05, Xiaofan Chen <xiao...@gmail.com> wrote:
> Attached please find some more information. It seems to me if I unplug and
> plug in PICkit 2 back slowly, it would be okay. If I unplug and plug back
> a bit faster, then it starts to show problems. Is this normal among HID
> device? Could it be that there is a possible firmware bug?

USB connectors are designed such that the power and ground contacts
mate before the signal pins (see USB Complete, 3rd edition, page 521).
If the problem does not occur when you plug in the connector slowly,
that suggests that PICkit 2 may be getting confused if the USB signals
appear before its initialization is complete. That could be due to a
hardware or firmware defect in the PICkit 2.

Plugging in the USB connector slowly is a pretty easy workaround, as
workarounds go. :-)

John

Xiaofan Chen

unread,
Dec 17, 2005, 11:29:02 PM12/17/05
to pickit...@googlegroups.com
I forgot to forward this to this list. I fogot that Alan Stern's post will not
show up here since he is not a member of this list. ;-)

---------- Forwarded message ----------
From: Alan Stern <st...@rowland.harvard.edu>
Date: Dec 10, 2005 12:28 AM
Subject: Re: [Linux-usb-users] hotplug problem with a full speed HID device
To: Xiaofan Chen <xiao...@gmail.com>

Cc: linux-u...@lists.sourceforge.net, pickit...@googlegroups.com


On Fri, 9 Dec 2005, Xiaofan Chen wrote:

> Yes I plugged and unplugged several times until it is recognized again.
>
> Attached please find some more information. It seems to me if I unplug and
> plug in PICkit 2 back slowly, it would be okay. If I unplug and plug back
> a bit faster, then it starts to show problems. Is this normal among HID
> device? Could it be that there is a possible firmware bug?

It is not normal at all. It could be a firmware bug, or a design flaw.
Or it could simply be that the device requires a very long time to
initialize. When you insert the plug slowly, you give the device the
extra time it needs. (USB connectors are designed so that the power
contacts are made before the data contacts.)

Alan Stern

Reply all
Reply to author
Forward
0 new messages