Your message dated Fri, 7 Jan 2011 23:21:19 +0100
with message-id <[email protected]>
and subject line Re: Bug#609262: udev: Race during serving several events 
connected with one physical device
has caused the Debian Bug report #609262,
regarding udev: Race during serving several events connected with one physical 
device
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
609262: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609262
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: udev
Version: 164-3
Severity: normal

Connecting a GSM modem to USB socket creates three ttyUSB<n>, ttyUSB<n+1> and 
ttyUSB<n+2> device files.
The file ttyUSB<n> denotes the first serial interface on modem.

The following rule

SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ACTION=="add", \
        ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1001", \
        ATTRS{bNumInterfaces}==" 3", \
        PROGRAM+="/etc/udev/ttyusb plus %n", \
        SYMLINK+="ttyUSBplus%c"

and the simple script (/etc/udev/ttyusb)

#!/bin/bash

# $1 plus|play
# $2 %n

[ ! -h "/dev/ttyUSB${1}0" ] &&
    { echo "0"; exit 0
    }
[ ! -h "/dev/ttyUSB${1}1" ] &&
    { echo "1"; exit 0
    }
[ ! -h "/dev/ttyUSB${1}2" ] &&
    { echo "2"; exit 0
    }

exit 0

on Lenny makes a symlink ttyUSB<name><number> always to ttyUSB<n>. This means 
works as should.
Upgrade to Squeeze has broke this. The symlink often points to other than 
ttyUSB<n> file.
Simple debugging shows that the order of execution of three calls of the script 
is undetermined. So symlink often points to wrong modem's interface.

The problem hasn't appeared on mixed system, Lenny's udev and Squeeze's kernel.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (650, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=pl_PL.ISO-8859-2 (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash

Versions of packages udev depends on:
ii  debconf [debconf-2.0]        1.5.36      Debian configuration management sy
ii  libc6                        2.11.2-7    Embedded GNU C Library: Shared lib
ii  libselinux1                  2.0.96-1    SELinux runtime shared libraries
ii  libudev0                     164-3       libudev shared library
ii  libusb-0.1-4                 2:0.1.12-16 userspace USB programming library
ii  lsb-base                     3.2-23.1    Linux Standard Base 3.2 init scrip
ii  util-linux                   2.17.2-5    Miscellaneous system utilities

Versions of packages udev recommends:
pn  pciutils                      <none>     (no description available)
ii  usbutils                      0.87-5     Linux USB utilities

udev suggests no packages.




--- End Message ---
--- Begin Message ---
On Jan 07, Krzysztof Mazurczyk <[email protected]> wrote:

> on Lenny makes a symlink ttyUSB<name><number> always to ttyUSB<n>. This means 
> works as should.
> Upgrade to Squeeze has broke this.
Tough luck, your script indeed only worked by chance.
No promise was ever made that it should work, you need either a more
specific udev rule or more intelligence in the script.

Have a look at how the usb-modeswitch program solved this problem (be
sure to check a very recent release, older ones are hideous).

-- 
ciao,
Marco

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to