Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | MSP430 | ez430 Linux Driver Fix!

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

ez430 Linux Driver Fix! - "H...@CK_D_GIBSON" - Jun 24 14:07:46 2007


Hello,

After two days of searching the net, I finally found the fix we've been
waiting for.
First, I made fetched ti_usb_3410_5052 v1.1 driver, hoping that would fix
it (v0.9 is in the latest kernel for some reason.) After an hour of fixing
it to compile with my ubuntu kernel, I was back to square one with this
error (v1.1 just adds some product ids, doesn't seem to add any other
functionality.)

[462913.996000] drivers/usb/serial/usb-serial.c: USB Serial support
registered for TI USB 3410 1 port adapter
[462914.000000] drivers/usb/serial/usb-serial.c: USB Serial support
registered for TI USB 5052 2 port adapter
[462914.000000] ti_usb_3410_5052 3-4:1.0: TI USB 3410 1 port adapter
converter detected
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c:
ti_startup - product 0xF430, num configurations 1, configuration value 1
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c:
ti_startup - device type is 3410
[462914.000000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c:
ti_download_firmware - downloading firmware
[462914.532000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c:
ti_download_firmware - download successful
[462914.812000] usb 3-4: reset full speed USB device using ohci_hcd and
address 58
[462915.020000] usb 3-4: device firmware changed
[462915.020000] usb 3-4: USB disconnect, address 58
[462915.020000] ti_usb_3410_5052: probe of 3-4:1.0 failed with error -5
That was the original error. Essentially, it is a bug in driver. After
looking at 5+ patches, I ran across one by Oleg V.

It is also right here.

Quoting Oleg Verych <[EMAIL PROTECTED]>:

> pp-by: Oleg Verych
> ---
> i.e. no more uGLYdev with sysfs
>
> Alan, i'm looking forward to deal with this crutch :-E
>
> drivers/usb/serial/ti_usb_3410_5052.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c
> ===================================================================
> --- linux-2.6.21-rc1.orig/drivers/usb/serial/ti_usb_3410_5052.c
> 2007-02-23
> 05:03:57.691537658 +0100
> +++ linux-2.6.21-rc1/drivers/usb/serial/ti_usb_3410_5052.c 2007-02-23
> 05:22:22.766512292 +0100
> @@ -389,13 +389,13 @@
> usb_reset_device(dev);
> }
>
> - status = -ENODEV;
> + status = 0x01E; /* positive status -- device to be
> reconfigured
> */
> goto free_tdev;
> }
>
> - /* the second configuration must be set (in sysfs by hotplug script)
> */
> if (dev->actconfig->desc.bConfigurationValue == TI_BOOT_CONFIG) {
> - status = -ENODEV;
> + (void) usb_driver_set_configuration(dev, TI_ACTIVE_CONFIG);
> + status = 0xA1B;
> goto free_tdev;
> }
> --

http://www.mail-archive.com/l...@lists.sourceforge.net/msg51855.html
So all you have to do, is download your kernel sources, and apply this
patch. Now if yoti_usb_3410_5052ur kernel version is < 2.6.16 or so, you
will also have to add in the PRODUCT_ids for the Ez430 device. I suggest
you upgrade your kernel, since the product id fix is in kernels >~ 2.6.16 or
so.

I applied the patch by hand, to the
/usr/src/linux-source---/drivers/usb/serial/ti_usb_3410_5052.c file.

recompile.... And viola, it works! if I modprobe it before or after the
device is inserted, no hotplug script needed!
Here is the working dmesg dump

[464233.560000] drivers/usb/serial/usb-serial.c: USB Serial support
registered for TI USB 3410 1 port adapter
[464233.560000] drivers/usb/serial/usb-serial.c: USB Serial support
registered for TI USB 5052 2 port adapter
[464233.564000] usbcore: registered new interface driver ti_usb_3410_5052
[464233.564000] /home/tom/tars/ti_usb_2.6-1.1/src/ti_usb_3410_5052.c: TI USB
3410/5052 Serial Driver v1.1
[464241.468000] ti_usb_3410_5052 3-4:2.0: TI USB 3410 1 port adapter
converter detected
[464241.468000] usb 3-4: TI USB 3410 1 port adapter converter now attached
to ttyUSB0
So in conclusion, apply patch to a newer kernel, and enjoy. I'm glad I
devoted my time into fixing this stupid problem once and for all.

--Tom Golubev
--
View this message in context: http://www.nabble.com/ez430-Linux-Driver-Fix%21-tf3962739.html#a11246069
Sent from the MSP430 - Discuss mailing list archive at Nabble.com.


(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )