Bug 375181

Summary: TI USB FET Tool Doesn't work without udev fix
Product: [Fedora] Fedora Reporter: Robert Spanton <rds204>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 8CC: harald, kay.sievers, snecklifter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-20 06:28:14 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Robert Spanton 2007-11-10 18:04:40 EST
Description of problem:
Plug in TI USB FET tool for MSP430s.  It doesn't work (a serial device isn't
created) unless the following udev rule is in place:

SUBSYSTEM=="usb" ACTION=="add" ATTR{product}=="MSP-FET430UIF JTAG Tool" \
  ATTR{bNumConfigurations}=="2" \
  ATTR{bConfigurationValue}=="1" \
  RUN+="/bin/sh -c 'echo 2 > /sys%p/bConfigurationValue'"

Version-Release number of selected component (if applicable):

Expected results:
A USB serial device should be created.
Comment 1 Robert Spanton 2007-11-15 20:54:29 EST
For some reason I now have to take one of the lines in the udev rule out:

SUBSYSTEM=="usb" ACTION=="add" ATTR{product}=="MSP-FET430UIF JTAG Tool" \
  ATTR{bNumConfigurations}=="2" \
  RUN+="/bin/sh -c 'echo 2 > /sys%p/bConfigurationValue'"

Comment 2 Harald Hoyer 2007-11-16 04:53:44 EST
reassigning to component kernel.
Is this something, we can fix in a kernel module?
Comment 3 Christopher Brown 2008-02-07 13:07:31 EST

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.


I am CC'ing myself to this bug and will try and assist you in resolving it if I can.

There hasn't been much activity on this bug for a while. Could you tell me if
you are still having problems with the latest kernel?

If the problem no longer exists then please close this bug or I'll do so in a
few days if there is no additional information lodged.
Comment 4 Robert Spanton 2008-02-07 13:21:26 EST
Yes I still have this problem, it still doesn't work without the udev rule.
Comment 5 Christopher Brown 2008-02-07 14:09:44 EST
Okay, thanks for the update Robert. I'm assigning and copying Kay in who is
listed as a QA contact on the triage page. Hopefully this will get the issue
resolved quicker for you.
Comment 6 Kay Sievers 2008-02-08 06:55:11 EST
This sounds like a sysfs attribute + event timing problem in the usb code in the
kernel. We get some more reports recently that seems to indicate that.

Just to identify what's going wrong, if you put this line:
  SUBSYSTEM=="usb", ACTION=="add", PROGRAM="/bin/sleep 1"
right before your rule, does it make the match work?
If yes, we should try to fix this in the kernel.

  always separate all udev rules keys by ','
  ATTR{bConfigurationValue}="2" should write to a sysfs file
  without the need for a shell
Comment 7 Robert Spanton 2008-02-08 08:10:19 EST
> Just to identify what's going wrong, if you put this line:
>  SUBSYSTEM=="usb", ACTION=="add", PROGRAM="/bin/sleep 1"
> right before your rule, does it make the match work?

I'm not sure what you mean by "make the match work".  I interpret that as "make
the udev rule match the device", which it already does.  The point here is that
one has to add the udev rule to get the device to work in Fedora.

If I do add the sleep 1 in the rules file, then it works just the same as the
old rule, but the serial device appears one second later than before.

Thanks for the info about setting bConfigurationValue in a nicer way.  The rule
that I'm using now is:

SUBSYSTEM=="usb" ACTION=="add" ATTR{product}=="MSP-FET430UIF JTAG Tool" \
  ATTR{bNumConfigurations}=="2" ATTR{bConfigurationValue}="2"
Comment 8 Kay Sievers 2008-02-08 08:25:43 EST
I thought you were complaining about that you have to remove the 3rd line with
"bConfigurationValue", like you mention in comment#1.

That you need to select an alternative configuration for the device, is nothing
udev or userspace could work around. It's just device specific and defined by
the device-vendor.

What kind of help do you expect from me?

Oh, and add a ',' between all keys, like:
  SUBSYSTEM=="usb",  ACTION=="add", ...
Comment 9 Robert Spanton 2008-02-08 11:36:00 EST
This bug is about the fact that with Fedora, plugging in the TI USB FET tool
doesn't work without adding a udev rule.  I think that the udev rule should be
distributed with Fedora (or maybe there's another solution that I'm not aware of).

Comment 10 Harald Hoyer 2008-02-11 05:53:34 EST
any tools/rpm packages related to this device?
Comment 11 Robert Spanton 2008-02-11 07:55:29 EST
The device contains one of those TI USB->serial chips, so it just appears as a
serial device.  One uses msp430-gdbproxy with it, which allows debugging of an
msp430 microcontroller through msp430-gdb (from mspgcc.sf.net).  Fedora doesn't
currently provide mspgcc, but I am hoping to one day change that...
Comment 12 Harald Hoyer 2008-02-11 08:00:31 EST
So what about shipping this rule file with the corresponding tools?
Is the serial device of any use without msp430-gdb?
Comment 13 Robert Spanton 2008-02-11 08:50:13 EST
No, the serial device isn't really of any use without msp430-gdb.  So shipping
it with msp430-gdb sounds like the best option.