ti_usb_3410_5052 driver doesn't load some devices

Bug #231276 reported by sglow on 2008-05-17
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Stefan Bader
Hardy
Medium
Stefan Bader
Intrepid
Medium
Stefan Bader

Bug Description

SRU justification:

Impact: The driver just looks for the wrong files.

Fix: Simply change the string of the files to load. This has been buried for so long (and nobody tested it in the bug) that it has been fixed upstream[1] (with a bigger change).

Testcase: Driver load asks for .bin files instead of .fw.

[1] commit 05a3d9050ad7bb791b9ba306165ea98e6d9e9da2
      Author: Chris Adams <email address hidden>
      Date: Sun Jan 11 19:48:53 2009 +0000

      ti_usb_3410_5052: support alternate firmware

Binary package hint: linux-source-2.6.24

The ti_usb_3410_5052 driver fails to recognize a very popular JTAG emulator made by TI (MSP FET430).

This appears to be a new bug in Hardy, it worked fine in Gutsy.

I downloaded the 2.6.24 vanilla source from kernel.org and compiled just this driver. The vanilla driver does work with this device.

I downloaded the linux-source-2.6.24 package and pulled the driver out of this. I confirmed that this ubuntu specific version of the driver fails to load the device in question.

There are only a couple lines different between the vanilla driver and the ubuntu version. The problem lines seem to be:

267,268c267,268
< .num_interrupt_in = 1,
< .num_bulk_in = 1,
---
> .num_interrupt_in = NUM_DONT_CARE,
> .num_bulk_in = NUM_DONT_CARE,

I'm not sure what the reasoning was behind changing the standard driver, but this is one case in which it broke a popular device which had previously worked.

Thanks,
Steve

dlotton (yellow56) wrote :

I'm posting to corroborate Steve's findings and to advocate for a fix in Ubuntu.

I've experienced the same issues with the ti_usb_3410_5052 driver under Hardy(kernel 2.6.24-16 through -19, thus far). Texas Instruments' MSP-FET430UIF and EZ430 programmer/emulators are broken with the current Hardy ti_usb_3410_5052 driver. Applying a driver (made available by Steve) from the vanilla kernel I was able to get my programmers working again. It breaks every time I upgrade my kernel package and I must re-apply the driver fix.

This is going to cause a lot of heartache and frustration for MSP430 developers. Getting a development system up and going for MSP430 is already a tough exercise. This problem had my development shut down until I ran across a news list post by Steve explaining his findings and a fix.

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Hi Leann;

I tried the device against the Alpha 4 live CD image and it did not work
correctly. I'll try to collect more information on this, but wanted to
give you that initial bit of information.

Rgds,
Steve

Leann Ogasawara wrote:
> The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the
> upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would
> appreciate it if you could please test this newer 2.6.27 Ubuntu kernel.
> There are one of two ways you should be able to test:
>
> 1) If you are comfortable installing packages on your own, the linux-
> image-2.6.27-* package is currently available for you to install and
> test.
>
> --or--
>
> 2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer
> 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4.
> Please watch http://www.ubuntu.com/testing for Alpha5 to be announced.
> You should then be able to test via a LiveCD.
>
> Please let us know immediately if this newer 2.6.27 kernel resolves the
> bug reported here or if the issue remains. More importantly, please
> open a new bug report for each new bug/regression introduced by the
> 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please
> specifically note if the issue does or does not appear in the 2.6.26
> kernel. Thanks again, we really appreicate your help and feedback.
>
> ** Tags added: cft-2.6.27
>
>

dlotton (yellow56) wrote :

Hi Leann,

I'll try to give it a shot this week. Where can I get just the 2.6.27 kernel packages? I poked around a little and couldn't find them.

Thanks,

Dave L.

Hi Guys,

dlotton - you'll need to enable the Intrepid repository in order to get the 2.6.27 kernel.

However, Alpha5 was released last week so you could test with a LiveCD as well - http://www.ubuntu.com/testing/intrepid/alpha5 . Please let us know your results if you are able to test. Thanks.

Changed in linux:
status: New → Incomplete
sglow (sag-ollies) wrote :

Hi Leann;

I downloaded the Alpha-5 live CD and tried this out. It's still not
working, but the failure mode is definitely different that that of 8.04.

On the 8.04 release of Ubuntu, the problem seems to be that the device
isn't being recognized as a device that can be handled by this driver at
all. The reason was the two lines that were changed from the stock
kernel which I flagged in my initial bug report.

In Alpha-5 of 8.10 the problem is different. In this release the device
is triggering the correct driver, but the driver is failing with a
'firmware file not found' error.

I took a quick look at the differences between the stock kernel from
kernel.org and the one in the git database for Ubuntu 8.10 and noticed
that the two header files which contain the device firmware used by this
driver have been removed from the Ubuntu version. Normally the driver
has this firmware compiled directly into it, but for some reason the
Ubuntu flavor of the kernel has had these files removed. This seems to
be the cause of the latest failure of this device.

Is the firmware used by this family of devices included somewhere in a
separate file? If it is, then the driver doesn't seem to be able to
locate it. If not, perhaps it should be. Better yet, why deviate from
the stock kernel method of compiling the firmware right into the
driver. It's certainly more foolproof.

Note that the firmware in question is not something that's specific to
this emulator that I'm testing with. I believe that it's used by most,
if not all, devices that utilize this driver. I have to assume that
removing it will make a whole class of serial port adapters that use
this driver difficult to use under Ubuntu 8.10.

Best regards,
Steve

Leann Ogasawara wrote:
> Hi Guys,
>
> dlotton - you'll need to enable the Intrepid repository in order to get
> the 2.6.27 kernel.
>
> However, Alpha5 was released last week so you could test with a LiveCD
> as well - http://www.ubuntu.com/testing/intrepid/alpha5 . Please let us
> know your results if you are able to test. Thanks.
>
> ** Changed in: linux (Ubuntu)
> Status: New => Incomplete
>
>

Hi sglow,

I'm so sorry for the delayed response here. Can you try installing the "linux-firmware" package to see if that helps. Thanks.

sglow (sag-ollies) wrote :

Hi Leann;

I just downloaded the latest live CD image and booted from it. The
linux-firmware package was installed by default, but I still received a
'firmware not found' error when I plugged in the device.

Is there any other package that may contain this firmware? Normally the
firmware is compiled right into the driver, at least it is for the stock
kernel. Not sure why it was stripped out of the Ubuntu kernel.

Thanks,
Steve

Leann Ogasawara wrote:
> Hi sglow,
>
> I'm so sorry for the delayed response here. Can you try installing the
> "linux-firmware" package to see if that helps. Thanks.
>
>

Hi sglow,

Can you attach your dmesg output after you insert the device?

sglow (sag-ollies) wrote :

Hi Leann;

Here's the dmesg output when I plug in the device:

---------------------------
[ 1183.216107] usb 1-2: new full speed USB device using ohci_hcd and
address 2
[ 1183.477076] usb 1-2: configuration #1 chosen from 1 choice
[ 1186.732273] usbcore: registered new interface driver usbserial
[ 1186.735045] usbserial: USB Serial support registered for generic
[ 1186.737834] usbcore: registered new interface driver usbserial_generic
[ 1186.737848] usbserial: USB Serial Driver core
[ 1186.756886] usbserial: USB Serial support registered for TI USB 3410
1 port adapter
[ 1186.759756] usbserial: USB Serial support registered for TI USB 5052
2 port adapter
[ 1186.762880] ti_usb_3410_5052 1-2:1.0: TI USB 3410 1 port adapter
converter detected
[ 1186.762900] firmware: requesting ti_usb-3410.bin
[ 1186.795645] usb 1-2: ti_download_firmware - firmware not found
[ 1186.799032] ti_usb_3410_5052: probe of 1-2:1.0 failed with error -5
[ 1186.802140] usbcore: registered new interface driver ti_usb_3410_5052
[ 1186.802149] ti_usb_3410_5052: TI USB 3410/5052 Serial Driver v0.9
------------------------------

I've confirmed that the package 'linux-firmware' is installed, but can't
locate the file ti_usb-3410.bin anywhere on my hard drive. I also
googled for that file, but can't find any link to it. If I do find it,
where should it be placed in the file system?

Thanks,
Steve

Leann Ogasawara wrote:
> Hi sglow,
>
> Can you attach your dmesg output after you insert the device?
>
>

xorduna (xavier-orduna) wrote :

Hi Steve and Leann,

If you rename /lib/firmware/2.6.27-7-generic/ti_3410.fw to ti_usb-3410.bin and you use the module from kernel source you have no complain from dmesg, anyway, any /dev/ttyUSB* is created.

here is my dmesg output:

 [14651.056025] usb 4-2: new full speed USB device using uhci_hcd and address 12
 [14651.253712] usb 4-2: configuration #1 chosen from 1 choice
 [14651.258397] ti_usb_3410_5052 4-2:1.0: TI USB 3410 1 port adapter converter detected
 [14651.258411] firmware: requesting ti_usb-3410.bin
 [14651.868027] usb 4-2: reset full speed USB device using uhci_hcd and address 12
 [14652.015101] usb 4-2: device firmware changed
 [14652.016291] usb 4-2: USB disconnect, address 12
 [14652.017234] ti_usb_3410_5052 4-2:1.0: device disconnected
 [14652.132034] usb 4-2: new full speed USB device using uhci_hcd and address 13
 [14652.355779] usb 4-2: configuration #1 chosen from 2 choices
 [14652.362795] ti_usb_3410_5052 4-2:1.0: TI USB 3410 1 port adapter converter detected

if you use ubuntu module, you got the "old" ti_usb_3410_5052: probe of 4-2:1.0 failed with error -5.

 [15220.249202] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
 [15220.250547] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
 [15220.251879] ti_usb_3410_5052 4-2:1.0: TI USB 3410 1 port adapter converter detected
 [15220.251891] firmware: requesting ti_usb-3410.bin
 [15220.856034] usb 4-2: reset full speed USB device using uhci_hcd and address 14
 [15220.999105] usb 4-2: device firmware changed
 [15220.999140] usb 4-2: USB disconnect, address 14
 [15220.999165] ti_usb_3410_5052: probe of 4-2:1.0 failed with error -5
 [15221.112037] usb 4-2: new full speed USB device using uhci_hcd and address 15
 [15221.338306] usb 4-2: configuration #1 chosen from 2 choices
 [15221.341424] ti_usb_3410_5052 4-2:1.0: TI USB 3410 1 port adapter converter detected
 [15221.341442] ti_usb_3410_5052: probe of 4-2:1.0 failed with error -5
 [15221.341465] usbcore: registered new interface driver ti_usb_3410_5052
 [15221.341469] ti_usb_3410_5052: TI USB 3410/5052 Serial Driver v0.9

Any idea?

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged
Anshuman (eranshuman) wrote :

This might be the solution : ( It works only in the Ubuntu 8.1 kernel version 2.6.27-7-generic )

https://answers.launchpad.net/ubuntu/+question/51120

Thanks and regards

sglow (sag-ollies) wrote :

I can confirm that this solution (which is essentially the same as what xorduna posted above) does work for me. I'm using the 2.6.27-9-generic kernel. All I had to do is copy the firmware file to the location expected by the driver and rename it. The link posted by Anshuman gives slightly incorrect file names which may be the reason this doesn't work on all kernel versions, but it's easy enough to find the firmware image, and the expected file name is given in the dmesg output.

For me, I copied /lib/firmware/2.6.27-9-generic/ti_3410.fw to /lib/firmware/ti_usb-3410.bin

This worked well enough for the /dev/ttyUSB0 file to be created when the emulator was plugged in. I haven't actually tested the proper functioning of the emulator yet (I'm not really working with it these days), but expect it should work.

Incidentally, I don't really think this bug should be closed. This is a useful temporary work around, not a fix. The driver should be modified so that it looks for the correct firmware image name. These devices should just work when plugged in, it shouldn't really be necessary to copy files around like this.

Thanks,
Steve

Stefan Bader (smb) on 2008-12-18
Changed in linux:
assignee: ubuntu-kernel-team → stefan-bader-canonical
status: Triaged → In Progress
Stefan Bader (smb) wrote :

The Hardy kernel should be fixed by the recently uploaded -proposed kernel (-23.46) which contains the following stable update:

commit e31375796499cbf8f04a7728c5019f681c2561e2
Author: Robert Spanton <email address hidden>
Date: Wed Apr 2 23:15:15 2008 +0000

    USB: serial: ti_usb_3410_5052: Correct TUSB3410 endpoint requirements.

    Bug: #301632

    upstream commit: 1bfd6693cd66f1e79abce62d3e8c3647e1f59a55

    The changes introduced in commit
    063a2da8f01806906f7d7b1a1424b9afddebc443 changed the semantics of the
    num_interrupt_in, num_interrupt_out, num_bulk_in and num_bulk_out
    entries of the usb_serial_driver struct to be the number of endpoints
    the device has when probed.

    This patch changes the ti_1port_device usb_serial_driver struct to
    reflect this change. The single port devices only have 1
    bulk_out endpoint in their initial configuration, and so this patch
    changes the number of other types to NUM_DONT_CARE.

    The same change probably needs doing to the ti_2port_device struct,
    but I don't have a two port device at hand.

Stefan Bader (smb) wrote :

For Intrepid, someone try the PPA package from https://launchpad.net/~stefan-bader-canonical/+archive to see whether this is the right fix. This would have to go upstream as well, but I would like to have to sanity check before.

Stefan Bader (smb) on 2009-02-20
description: updated
Stefan Bader (smb) wrote :

Was released for Jaunty in 2.6.28-7.18 (firmware names)

Changed in linux:
status: In Progress → Fix Released
Stefan Bader (smb) wrote :

Was fixed in Hardy by 2.6.24-23.46 (endpoint requirements)

Changed in linux:
assignee: nobody → stefan-bader-canonical
importance: Undecided → Medium
status: New → Fix Released
Stefan Bader (smb) wrote :
Changed in linux:
assignee: nobody → stefan-bader-canonical
importance: Undecided → Medium
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Accepted linux into intrepid-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Steve Beattie (sbeattie) on 2009-05-01
tags: added: hw-specific
Launchpad Janitor (janitor) wrote :
Download full text (27.1 KiB)

This bug was fixed in the package linux - 2.6.27-14.33

---------------
linux (2.6.27-14.33) intrepid-proposed; urgency=low

  [Stefan Bader]

  * Fix FTBS due to a mysteriously missing ABI directory.

linux (2.6.27-14.32) intrepid-proposed; urgency=low

  [Stefan Bader]

  * Rebuild of 2.6.27-14.30 with 2.6.27-11.31 security patches applied

linux (2.6.27-14.30) intrepid-proposed; urgency=low

  [ Alexey Starikovskiy ]

  * SAUCE: ACPI: EC: Limit workaround for ASUS notebooks even more
    - LP: #288385

  [ Huaxu Wan ]

  * SAUCE: report rfkill changes event if interface is down
    - LP: #193970

  [ Scott James Remnant ]

  * SAUCE: floppy: Provide a PnP device table in the module.
    - LP: #255651

  [ Steve Beattie ]

  * fix apparmor memory leak on deleted file ops
    - LP: #329489

  [ Stefan Bader ]

  * Revert "ACPI: Fix compiler warnings introduced by 32 to 64 bit acpi
    conversions"
    - LP: #337019
  * Revert "ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit
    kernels"
    - LP: #337019

  [ Upstream Kernel Changes ]

  * KVM: MMU: Add locking around kvm_mmu_slot_remove_write_access()
    - LP: #335097, #333409
  * ricoh_mmc: Handle newer models of Ricoh controllers
    - LP: #311932

linux (2.6.27-13.29) intrepid-proposed; urgency=low

  [ Colin Ian King ]

  * SAUCE: Bluetooth USB: fix kernel panic during suspend while streaming
    audio to bluetooth headset
    - LP: #331106, #322082

  [ Stefan Bader ]

  * Revert "SAUCE: Work around ACPI corruption upon suspend on some Dell
    machines." (replaced by stable update)
    - LP: #330200
  * Revert "SAUCE: Add back in lost commit for Apple BT Wireless Keyboard"
    (replaced by stable update)
    - LP: #330902

  [ Upstream Kernel Changes ]

  * Revert "vt: fix background color on line feed"
    - LP: #330200
  * ti_usb_3410_5052: support alternate firmware
    - LP: #231276
  * fuse: destroy bdi on umount
    - LP: #324921
  * fuse: fix missing fput on error
    - LP: #324921
  * fuse: fix NULL deref in fuse_file_alloc()
    - LP: #324921
  * inotify: clean up inotify_read and fix locking problems
    - LP: #324921
  * mac80211: decrement ref count to netdev after launching mesh discovery
    - LP: #324921
  * sysfs: fix problems with binary files
    - LP: #324921
  * x86, mm: fix pte_free()
    - LP: #324921
  * alpha: nautilus - fix compile failure with gcc-4.3
    - LP: #324921
  * it821x: Add ultra_mask quirk for Vortex86SX
    - LP: #324921
  * libata: pata_via: support VX855, future chips whose IDE controller use
    0x0571
    - LP: #324921
  * rtl8187: Add termination packet to prevent stall
    - LP: #324921
  * serial_8250: support for Sealevel Systems Model 7803 COMM+8
    - LP: #324921
  * SUNRPC: Fix a memory leak in rpcb_getport_async
    - LP: #324921
  * SUNRPC: Fix autobind on cloned rpc clients
    - LP: #324921
  * USB: fix char-device disconnect handling
    - LP: #324921
  * USB: storage: add unusual devs entry
    - LP: #324921
  * USB: usbmon: Implement compat_ioctl
    - LP: #324921
  * ALSA: hda - add another MacBook Pro 4, 1 subsystem ID
    - LP: #324921
  * ALSA: hda - Add quirk for HP DV6700 laptop
    - LP: #324921
  * ALSA: ...

Changed in linux (Ubuntu Intrepid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers