Linux Hotplug development
 help / color / mirror / Atom feed
* Persistent USB to rs232 serial converter device name patch
@ 2008-07-03  7:21 Karl O. Pinc
  2008-07-03 11:15 ` Bryan Kadzban
  0 siblings, 1 reply; 2+ messages in thread
From: Karl O. Pinc @ 2008-07-03  7:21 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I've checked out the udev repo, hacked, and used git to
generate 5 patches, in mbox format.   How
should I submit them for review?  Email?  Attachments?

The patches generate udev rules, in extras/rule_generator/,
like the process that generates persistent nic names,
only for ttyUSB devices.  Device special file names
are keyed to USB vendor id, product id, serial number,
and port number.

This patch allows me to use a USB-to-serial converter
attached to multiple serial consoles without having to
worry that kernel usb enumeration changes or accidentally
unplugging and re-plugging USB devices will alter the
device special file names.  I imagine it would be helpful
for other applications; palm organizer-like devices come
to mind.  I think some of them show up as ttyUSB devices.

It's at the 'works for me' stage, tested with a
Digi Edgeport 4/16.  All other drivers are blacklisted
because I've no clue what drivers report serial numbers, etc.
(See code comments for further detail.)  It would be nice
if somebody who knows what the other drivers, uh, drive
were to delete drivers from the blacklist.

I've not tested the changes to the Makefile that
install the new files, nor the very last patch that
moves a shared function into the rule_generator.functions
library.

The rest of the code was tested with a 2.6.25.4 kernel
on a debian etch system by installing the files manually
and hacking to account for debian-ized file names.

I don't know what sort of "external tool" would be used
to specify device names, but I gave the code that
functionality to mimic the existing cd and net persistent
generator code.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Persistent USB to rs232 serial converter device name patch
  2008-07-03  7:21 Persistent USB to rs232 serial converter device name patch Karl O. Pinc
@ 2008-07-03 11:15 ` Bryan Kadzban
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Kadzban @ 2008-07-03 11:15 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Karl O. Pinc wrote:
> The patches generate udev rules, in extras/rule_generator/, like the
> process that generates persistent nic names, only for ttyUSB devices.

Why not make it act like persistent-storage and persistent-input, and
add symlinks?  The persistent-net stuff can't do that because there is
no such thing as a symlink to a net_device (and even if there was, the
IFNAMSIZ constant in the kernel is too small to handle the longer names
this would generate, and IFNAMSIZ is part of the userspace ABI).  The
persistent-cd stuff can't do that because its symlinks are named e.g.
"cdrom1", and don't have the serial # or path in them, and it needs to
have "cdrom1" always be the same device.

But persistent-storage creates a /dev/disk/by-id/ link that's named with
the disk's SCSI or ATA (or whatever) identifying information, along with
several other /dev/disk/by-*/ links using other info.  I don't see any
reason you couldn't do the same with e.g. /dev/ttyUSB/by-path/ and
/dev/ttyUSB/by-id/ links.  Of course ttyUSB could change; that's just
the first name that came to mind.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIbLS4S5vET1Wea5wRAxdcAJ9utojzdBFUjYi4p7OsiKq1qyY4NwCg1FvS
pD+srRu2KkfYhmeqk8Ka+j4=l1PR
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-03 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03  7:21 Persistent USB to rs232 serial converter device name patch Karl O. Pinc
2008-07-03 11:15 ` Bryan Kadzban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox