USB firmware download: Problem on FX2 chip

From: Bernhard Holzmayer (holzmayer.bernhard_at_deadspam.com)
Date: 10/08/04


Date: Fri, 08 Oct 2004 07:23:00 +0200

Hi fellows,

since I'm not sure what happens, I'll post this issue here.
Please help me (at least to find the correct group or addressee...).

I have a selfmade USB board based on a Cypress EZ-USB FX2 chip.
Firmware is approved to work correctly when downloaded under Win2k.

Now I try to download that firmware using fxload.
Obviously the loading into on-chip memory works, but the final
reset_CPU command seems to fail, at least fxload comments with:

sh-2.05b# fxload -v -t fx2 -D /proc/bus/usb/001/005 -I loader.hex
microcontroller type: fx2
single stage: load on-chip memory
open RAM hexfile image /mnt/x/temp/selke/loader.hex
stop CPU
write on-chip, addr 0x09ea len 10 (0x000a)
...
write on-chip, addr 0x09d9 len 17 (0x0011)
... WROTE: 2491 bytes, 38 segments, avg 65
reset CPU
can't modify CPUCS: Invalid or incomplete multibyte or wide
character

After that, the device disappears from the list (lsusb).
Syslog shows the following entries:
====> before fxload <====
Oct 7 10:57:02 holzmayer-te9416 kernel: hub.c: USB new device
connect on bus1/1, assigned device number 5
Oct 7 10:57:02 holzmayer-te9416 kernel: usb.c: USB device 5
(vend/prod 0x4b4/0x8613) is not claimed by any active driver.
====> after fxload <====
Oct 7 10:57:46 holzmayer-te9416 kernel: usbdevfs: USBDEVFS_CONTROL
failed dev 5 rqt 64 rq 160 len 1 ret -84
Oct 7 10:57:47 holzmayer-te9416 kernel: usb.c: USB disconnect on
device 5
Oct 7 10:57:48 holzmayer-te9416 kernel: hub.c: USB new device
connect on bus1/1, assigned device number 6
Oct 7 10:57:48 holzmayer-te9416 kernel: usb.c: config descriptor
too short (expected 13570, got 5378)
Oct 7 10:57:48 holzmayer-te9416 kernel: usb.c: unable to get device
6 configuration (error=-22)
Oct 7 10:57:49 holzmayer-te9416 kernel: hub.c: USB new device
connect on bus1/1, assigned device number 7
Oct 7 10:57:49 holzmayer-te9416 kernel: usb.c: config descriptor
too short (expected 13570, got 5378)
Oct 7 10:57:49 holzmayer-te9416 kernel: usb.c: unable to get device
7 configuration (error=-22)

These entries are obviously kernel related, that's why I ask you in
this group:

What does this "config descriptor too short" mean?
And do the values sound reasonable?
Do we have to expect such a long config descriptor?

Since I know that Win2k is able to download the file and it works
(providing a modified ProductID, and some endpoints for bulk
transfers which can be used), this must be an issue either of the
download program fxload, or of the kernel side (maybe it's usbcore
or anywhere around), which fails when renumerating a USB2.0
product.

Hint: With an appropriate program downloaded into a AN2131 chip,
fxload reports the same CPUCS error, but after that, the device is
correctly renumerated and works fine. No entries in the syslog
occurs.

That's why I guess that it's a kernel (or USB modules') issue.
The protocols have been taken on a 2.4.16 system (SUSE),
but other systems (2.4.24) show similar behavior.

Is it possible that my system is too old, even to get a USB2.0
device renumerated properly after firmware download?

Any help and/or ideas appreciated, since it's our first approach to
get Linux in our development process, and it would be fatal if I
couldn't overcome this (obviously tiny) problem.

Bernhard



Relevant Pages

  • problem using usb keyboard and mouse when install philips usb driver
    ... I am a novice on Linux.When I try to install philips usb driver on ... If you are using Red Hat 9.0, the kernel which comes with it will probably ... download the right kernel version. ...
    (RedHat)
  • Re: how to install Lenny with hard drive
    ... For this unusual installing I need to download: ... downloaded the installation medium to the root directory. ... The easiest way to get the images is to download the USB stick image, ... the kernel, an initrd.gz and an iso to put on the hard ...
    (Debian-User)
  • PROBLEM: Oops when using emi62 with 2.6.28
    ... With kernel 2.6.28 (and I don't really know which version of the kernel ... emi62 soundcard usb firmware oops ... 2000-2fff: PCI Bus 0000:02 ... # Infrared-port device drivers ...
    (Linux-Kernel)
  • problem with linux-2.6.28
    ... ACPI: Local APIC address 0xfee00000 ... Allocating PCI resources starting at cc000000 ... 3243604k/3276480k available (3222k kernel code, 31608k reserved, 1142k data, 312k init, 23 ... USB 2.0 'Enhanced' Host Controller Driver ...
    (Linux-Kernel)
  • Ive just installed SuSE 8.2 and its not recognising my Alcatel
    ... SpeedTouch USB Modem. ... Do I need to patch the kernel or pppd? ...
    (alt.os.linux.suse)