Hello All, Time for the next error; now that I'm able to upload firmware to the Cypress EzUsb device I must upload firmware for an FPGA device, this used to be handled using the firmware class and .rbf firmware files. But I want to integrate it in the modules just like for the EzUsb firmware.
The USB device is plugged in; it is recognized as being a device without EzUsb-firmware and then the firmware for the EzUsb device is downloaded, after that it will be reset. Then it is recognized as a device with EzUsb-firmware and the FPGA-firmware can be uploaded. This is what happends: -------------------------------------- Jul 20 16:27:52 virtualinux kernel: uhci_hcd 0000:00:07.2: wakeup_rh (auto-start) Jul 20 16:27:52 virtualinux kernel: hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 Jul 20 16:27:52 virtualinux kernel: uhci_hcd 0000:00:07.2: port 1 portsc 0083,00 Jul 20 16:27:52 virtualinux kernel: hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s Jul 20 16:27:52 virtualinux kernel: hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 Jul 20 16:27:52 virtualinux kernel: usb 1-1: new full speed USB device using uhci_hcd and address 6 Jul 20 16:27:52 virtualinux kernel: usb 1-1: new device strings: Mfr=0, Product=0, SerialNumber=0 Jul 20 16:27:52 virtualinux kernel: usb 1-1: uevent Jul 20 16:27:52 virtualinux kernel: usb 1-1: device is bus-powered Jul 20 16:27:52 virtualinux kernel: usb 1-1: configuration #1 chosen from 1 choice Jul 20 16:27:52 virtualinux kernel: usb 1-1: adding 1-1:1.0 (config #1, interface 0) Jul 20 16:27:52 virtualinux kernel: usb 1-1:1.0: uevent Jul 20 16:27:52 virtualinux kernel: hDriver 1-1:1.0: usb_probe_interface Jul 20 16:27:52 virtualinux kernel: hDriver 1-1:1.0: usb_probe_interface - got id Jul 20 16:27:52 virtualinux kernel: hDriver: DEBUG: hDriver_probe is called Jul 20 16:27:52 virtualinux kernel: hDriver: Found device without EzUsb firmware Jul 20 16:27:52 virtualinux kernel: hDriver: DEBUG: hDriverProgramEzUsb is called Jul 20 16:27:52 virtualinux kernel: hDriver: Uploading EzUsb firmware for ... Jul 20 16:27:52 virtualinux kernel: hDriver: DEBUG: hDriver8051Reset is called Jul 20 16:27:54 virtualinux kernel: hDriver: DEBUG: hDriver8051Reset is called Jul 20 16:27:54 virtualinux kernel: hDriver: m_nFirmwareLevel = 1 Jul 20 16:27:54 virtualinux kernel: drivers/usb/core/inode.c: creating file '006' Jul 20 16:27:54 virtualinux kernel: hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 Jul 20 16:27:54 virtualinux kernel: uhci_hcd 0000:00:07.2: port 1 portsc 008a,00 Jul 20 16:27:54 virtualinux kernel: hub 1-0:1.0: port 1, status 0100, change 0003, 12 Mb/s Jul 20 16:27:54 virtualinux kernel: usb 1-1: USB disconnect, address 6 Jul 20 16:27:54 virtualinux kernel: usb 1-1: usb_disable_device nuking all URBs Jul 20 16:27:54 virtualinux kernel: usb 1-1: unregistering interface 1-1:1.0 Jul 20 16:27:54 virtualinux kernel: hDriver: DEBUG: hDriver_disconnect is called Jul 20 16:27:54 virtualinux kernel: drivers/usb/core/file.c: removing 0 minor Jul 20 16:27:54 virtualinux kernel: usb 1-1:1.0: uevent Jul 20 16:27:54 virtualinux kernel: usb 1-1: unregistering device Jul 20 16:27:54 virtualinux kernel: usb 1-1: uevent Jul 20 16:27:54 virtualinux kernel: hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100 Jul 20 16:27:55 virtualinux kernel: uhci_hcd 0000:00:07.2: suspend_rh (auto-stop) Jul 20 16:27:58 virtualinux kernel: uhci_hcd 0000:00:07.2: wakeup_rh (auto-start) Jul 20 16:27:58 virtualinux kernel: hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002 Jul 20 16:27:58 virtualinux kernel: uhci_hcd 0000:00:07.2: port 1 portsc 0083,00 Jul 20 16:27:58 virtualinux kernel: hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s Jul 20 16:27:58 virtualinux kernel: hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101 Jul 20 16:27:58 virtualinux kernel: usb 1-1: new full speed USB device using uhci_hcd and address 7 Jul 20 16:27:58 virtualinux kernel: usb 1-1: default language 0x0409 Jul 20 16:27:58 virtualinux kernel: usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0 Jul 20 16:27:58 virtualinux kernel: usb 1-1: uevent Jul 20 16:27:58 virtualinux kernel: usb 1-1: device is bus-powered Jul 20 16:27:58 virtualinux kernel: usb 1-1: configuration #1 chosen from 1 choice Jul 20 16:27:58 virtualinux kernel: usb 1-1: adding 1-1:1.0 (config #1, interface 0) Jul 20 16:27:58 virtualinux kernel: usb 1-1:1.0: uevent Jul 20 16:27:58 virtualinux kernel: hDriver 1-1:1.0: usb_probe_interface Jul 20 16:27:58 virtualinux kernel: hDriver 1-1:1.0: usb_probe_interface - got id Jul 20 16:27:58 virtualinux kernel: hDriver: DEBUG: hDriver_probe is called Jul 20 16:27:58 virtualinux kernel: hDriver: Found device (EzUsb firmware loaded) Jul 20 16:27:58 virtualinux kernel: hDriver: DEBUG: hDriver_upload_FPGA_fw is called Jul 20 16:27:58 virtualinux kernel: hDriver: Check 1 Jul 20 16:27:58 virtualinux kernel: hDriver: Check 2 Jul 20 16:28:02 virtualinux udevd-event[4950]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.0/bus' failedJul 20 16:28:04 virtualinux kernel: hDriver: Check 3 Jul 20 16:28:04 virtualinux kernel: hDriver: Check 4 Jul 20 16:28:04 virtualinux kernel: hDriver: Check 5 Jul 20 16:28:04 virtualinux kernel: uhci_hcd 0000:00:07.2: uhci_result_control: failed with status 440000 Jul 20 16:28:04 virtualinux kernel: [cee59180] link (0ee59142) element (0bb60030) Jul 20 16:28:04 virtualinux kernel: 0: [cbb60030] link (0bb600c0) e0 Stalled CRC/Timeo Length=7ff MaxLen=7 DT0 EndPt=0 Dev=7, PID=2d(SETUP) (buf=0d279f40) Jul 20 16:28:04 virtualinux kernel: 1: [cbb600c0] link (0bb600f0) e3 SPD Active Length=0 MaxLen=1 DT1 EndPt=0 Dev=7, PID=69(IN) (buf=0ea1d9e2) Jul 20 16:28:04 virtualinux kernel: 2: [cbb600f0] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 Dev=7, PID=e1(OUT) (buf=00000000) Jul 20 16:28:04 virtualinux kernel: Jul 20 16:28:04 virtualinux kernel: uhci_hcd 0000:00:07.2: uhci_result_control: failed with status 440000 Jul 20 16:28:04 virtualinux kernel: [cee591a0] link (0ee59142) element (0bb60060) Jul 20 16:28:04 virtualinux kernel: 0: [cbb60060] link (0bb60090) e0 Stalled CRC/Timeo Length=7ff MaxLen=7 DT0 EndPt=0 Dev=7, PID=2d(SETUP) (buf=0d279f40) Jul 20 16:28:04 virtualinux kernel: 1: [cbb60090] link (0bb60120) e3 SPD Active Length=0 MaxLen=3f DT1 EndPt=0 Dev=7, PID=69(IN) (buf=0080405c) Jul 20 16:28:04 virtualinux kernel: 2: [cbb60120] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 Dev=7, PID=e1(OUT) (buf=00000000) Jul 20 16:28:04 virtualinux kernel: Jul 20 16:28:04 virtualinux kernel: hDriver: probe of 1-1:1.0 failed with error -71 Jul 20 16:28:04 virtualinux kernel: drivers/usb/core/inode.c: creating file '007 -------------------------------------------- I build in some printk()'s to check what happens, and as you can see everything goes well, until the 'hDriver_upload_FPGA_fw' is called. This function sends 1024 byte blocks to the device with 'usb_bulk_msg', it does not throw a single error. The error code -71 is generated in probe, where the driver tries to access the device and fails. The 'usb_bulk_msg' call is between 'Check 2' and 'Check 3', and in the background (not by the driver itself) an error is being generated by udevd so it seems. After that uhci_hcd comes up with the uhci_result_control errors. This error log was grabbed from a Suse 10.1 system with kernel-2.6.16.13-4-default but I also tested it on kernel-2.6.8 (Debian) and kernel-2.6.17.6 (Debian, Gentoo). The tests were carried out on virtual machines (VMWare), a test with an USB-mass storage device showed that VMWare supports USB 2.0. The driver name is 'hDriver' and the device is called 'extDevice', I have option 'debug = 2' for uhci_hcd and build in extra debugging information on. I found some posts on the internet with similar errors and solutions pointing to the fact that a full speed device is plugged in, but not handled by EHCI... http://marc2.theaimsgroup.com/?l=linux-kernel&m=110184866423132&w=2 I did some tests with this and it turned out that with uhci_hcd unloaded (only ehci_hcd loaded) nothing happens, and only uhci_hcd seems to be able to handle the device... Also I tried to build in delays to give the device some time to 'wake up' but that didn't help. The firmware is represented by an array, that is buffered and passed through to usb_bulk_msg in blocks of 1024 bytes. Any ideas? Thanks in advance! -Kris ------------------------------------------------------------------------- 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-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users