Re: [Libusb-devel] libusb silently ignores permission errors
"Xiaofan Chen" <[email protected]>
| Newsgroups | gmane.linux.usb.devel,gmane.comp.lib.libusb.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On 9/23/07, Alan Stern <[email protected]> wrote: > On Sun, 23 Sep 2007, Xiaofan Chen wrote: > > > Add linux-usb-devel in CC. Hopefully this is ok. > > Problem: USBview can see the device but not libusb/lsusb. > > > Hmm, I built a new kernel 2.6.22.7 from kernel.org and the problem > > remains. So maybe this is still a libusb/lsusb problem. I will dig further. > > > > For lsusb replacement, I think a console version of usbview will do. > > However I can not get the bootloader host application to work > > since libusb does not see the device. > > > > mcuee@mcuee-desktop:~$ uname -a > > Linux mcuee-desktop 2.6.22.7 #1 SMP Sat Sep 22 22:40:02 SGT 2007 i686 GNU/Linux > > Try building a kernel with CONFIG_USB_SUSPEND disabled. > Ah this is the key. Now it is ok, I believe the firmware does not adequately handle USB suspend. I am still investigating how to handle USB suspend correctly by changing the Microchip provided firmware framework. http://forum.microchip.com/tm.aspx?m=275422 Could you explain what happend to lsusb why it failed to find the device in the case that CONFIG_USB_SUSPEND is enabled? Thanks in advance. mcuee@mcuee-desktop:~/Desktop/build/fsusb/fsusb-0.1.11-2$ ./fsusb --read test.hex Locating USB Microchip(tm) PICDEM-FS USB(tm) (vendor 0x04d8/product 0x000b) Found USB PICDEM-FS USB as device '004' on USB bus 002 Communication established. Onboard firmware version is 1.0 Finished reading mcuee@mcuee-desktop:~/Desktop/build/fsusb/fsusb-0.1.11-2$ lsusb Bus 003 Device 001: ID 0000:0000 Bus 002 Device 004: ID 04d8:000b Microchip Technology, Inc. Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000 Related dmesg output after plugging in and running the last two command. mcuee@mcuee-desktop:~/Desktop/build/fsusb/fsusb-0.1.11-2$ dmesg ... <skipped>... [ 604.316000] hub 3-0:1.0: state 7 ports 8 chg 0000 evt 0100 [ 604.316000] ehci_hcd 0000:00:02.2: GetStatus port 8 status 001803 POWER sig=j CSC CONNECT [ 604.316000] hub 3-0:1.0: port 8, status 0501, change 0001, 480 Mb/s [ 604.444000] hub 3-0:1.0: debounce: port 8: total 100ms stable 100ms status 0x501 [ 604.500000] ehci_hcd 0000:00:02.2: port 8 full speed --> companion [ 604.500000] ehci_hcd 0000:00:02.2: GetStatus port 8 status 003001 POWER OWNER sig=se0 CONNECT [ 604.500000] ohci_hcd 0000:00:02.1: auto-wakeup root hub [ 604.500000] hub 3-0:1.0: port 8 not reset yet, waiting 50ms [ 604.556000] ehci_hcd 0000:00:02.2: GetStatus port 8 status 003802 POWER OWNER sig=j CSC [ 604.556000] hub 2-0:1.0: state 7 ports 4 chg 0000 evt 0010 [ 604.556000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [3] = 0x00010101 CSC PPS CCS [ 604.556000] hub 2-0:1.0: port 4, status 0101, change 0001, 12 Mb/s [ 604.684000] hub 2-0:1.0: debounce: port 4: total 100ms stable 100ms status 0x101 [ 604.756000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [3] = 0x00100103 PRSC PPS PES CCS [ 604.812000] usb 2-4: new full speed USB device using ohci_hcd and address 4 [ 604.884000] ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [3] = 0x00100103 PRSC PPS PES CCS [ 604.960000] usb 2-4: ep0 maxpacket = 8 [ 604.976000] usb 2-4: new device strings: Mfr=0, Product=0, SerialNumber=0 [ 604.976000] DEV: registering device: ID = '2-4' [ 604.976000] PM: Adding info for usb:2-4 [ 604.976000] bus usb: add device 2-4 [ 604.976000] usb 2-4: uevent [ 604.976000] usb: Matched Device 2-4 with Driver usb [ 604.976000] usb: Probing driver usb with device 2-4 [ 604.976000] usb 2-4: usb_probe_device [ 604.976000] DEV: registering device: ID = 'usbdev2.4_ep00' [ 604.976000] PM: Adding info for No Bus:usbdev2.4_ep00 [ 604.976000] usb 2-4: configuration #1 chosen from 1 choice [ 604.980000] usb 2-4: adding 2-4:1.0 (config #1, interface 0) [ 604.980000] DEV: registering device: ID = '2-4:1.0' [ 604.980000] PM: Adding info for usb:2-4:1.0 [ 604.980000] bus usb: add device 2-4:1.0 [ 604.980000] usb 2-4:1.0: uevent [ 604.980000] usb 2-4:1.0: uevent [ 604.980000] DEV: registering device: ID = 'usbdev2.4_ep01' [ 604.980000] PM: Adding info for No Bus:usbdev2.4_ep01 [ 604.980000] DEV: registering device: ID = 'usbdev2.4_ep81' [ 604.980000] PM: Adding info for No Bus:usbdev2.4_ep81 [ 604.980000] DEV: registering device: ID = 'usbdev2.4' [ 604.980000] PM: Adding info for No Bus:usbdev2.4 [ 604.980000] drivers/usb/core/inode.c: creating file '004' [ 604.980000] bound device '2-4' to driver 'usb' [ 604.980000] usb: Bound Device 2-4 to Driver usb [ 604.980000] hub 3-0:1.0: state 7 ports 8 chg 0000 evt 0100 [ 604.980000] hub 2-0:1.0: state 7 ports 4 chg 0000 evt 0010 [ 744.436000] DEV: Unregistering device. ID = 'usbdev2.4_ep01' [ 744.436000] PM: Removing info for No Bus:usbdev2.4_ep01 [ 744.436000] usb_endpoint usbdev2.4_ep01: ep_device_release called for usbdev2.4_ep01 [ 744.436000] DEV: Unregistering device. ID = 'usbdev2.4_ep81' [ 744.436000] PM: Removing info for No Bus:usbdev2.4_ep81 [ 744.436000] usb_endpoint usbdev2.4_ep81: ep_device_release called for usbdev2.4_ep81 [ 744.436000] DEV: registering device: ID = 'usbdev2.4_ep01' [ 744.440000] PM: Adding info for No Bus:usbdev2.4_ep01 [ 744.440000] DEV: registering device: ID = 'usbdev2.4_ep81' [ 744.440000] PM: Adding info for No Bus:usbdev2.4_ep81 [ 744.440000] bound device '2-4:1.0' to driver 'usbfs' [ 755.472000] usb 2-4: manual set_interface for iface 0, alt 0 [ 755.472000] DEV: Unregistering device. ID = 'usbdev2.4_ep01' [ 755.472000] PM: Removing info for No Bus:usbdev2.4_ep01 [ 755.472000] usb_endpoint usbdev2.4_ep01: ep_device_release called for usbdev2.4_ep01 [ 755.472000] DEV: Unregistering device. ID = 'usbdev2.4_ep81' [ 755.472000] PM: Removing info for No Bus:usbdev2.4_ep81 [ 755.472000] usb_endpoint usbdev2.4_ep81: ep_device_release called for usbdev2.4_ep81 [ 755.476000] DEV: registering device: ID = 'usbdev2.4_ep01' [ 755.476000] PM: Adding info for No Bus:usbdev2.4_ep01 [ 755.476000] DEV: registering device: ID = 'usbdev2.4_ep81' [ 755.476000] PM: Adding info for No Bus:usbdev2.4_ep81 Regards, Xiaofan ------------------------------------------------------------------------- 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