Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-03-21 Thread Kay Sievers
On Sat, 2007-03-03 at 17:59 +0100, Kay Sievers wrote:
  The problem lies within /dev/disk/by-id.  Even though the card reader
  has four slots, it only has one serial number, so only one link is
  created in /dev/disk/by-id.  It's called
  usb-Generic_STORAGE_DEVICE_05170 and it points to one of
  /dev/sd[abcd], not always the same one.  I suppose there's a race
  condition somewhere.
 
  The card reader is a Kingston FCR-HS215/1, if that matters.
  Vendor/device ids: 11b0:6108.
 
 Yes, that's a known issue. So far, we've seen that only for very cheap
 devices, not something with a brand name on it. Usually, the different
 ports on a card reader have different names:
   /dev/disk/
   |-- by-id
   |   |-- usb-_CF_TS-RD13_2511 - ../../sdb
   |   |-- usb-_MS_TS-RD13_2511 - ../../sdd
   |   |-- usb-_SD_TS-RD13_2511 - ../../sdc
   |   `-- usb-_XD_TS-RD13_2511 - ../../sde
   ...
   |-- by-path
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:0 - ../../sdb
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:1 - ../../sdc
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:2 - ../../sdd
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:3 - ../../sde
   ...
 
 Hmm, we could add the SCSI-LUN number, like we do in path_id.

Ok, I talked with Hannes, and we decided to change usb_id to append
-$target:$lun to the id of usb-mass storage devices. It looks like
this now:
  /dev/disk/by-id/
  |-- usb-Generic_STORAGE_DEVICE_02773-0:0 - ../../sdb
  |-- usb-Generic_STORAGE_DEVICE_02773-0:1 - ../../sdc
  |-- usb-Generic_STORAGE_DEVICE_02773-0:2 - ../../sdd
  `-- usb-Generic_STORAGE_DEVICE_02773-0:3 - ../../sde

It will be part of udev 107. Hope will work as expected.

Thanks,
Kay



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-03-21 Thread Roland Mas
Kay Sievers, 2007-03-21 17:47:56 +0100 :

 Ok, I talked with Hannes, and we decided to change usb_id to append
 -$target:$lun to the id of usb-mass storage devices. It looks like
 this now:
[...]
 It will be part of udev 107. Hope will work as expected.

Excellent.  Let me know if you want me to test packages before you
upload them.

  Thanks,

Roland.
-- 
Roland Mas

Et c'est tellement plus mignon de se faire traiter de con en chanson...
  -- in En chantant (Michel Sardou)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-03-05 Thread Hannes Reinecke
Kay Sievers wrote:
 The problem lies within /dev/disk/by-id.  Even though the card reader
 has four slots, it only has one serial number, so only one link is
 created in /dev/disk/by-id.  It's called
 usb-Generic_STORAGE_DEVICE_05170 and it points to one of
 /dev/sd[abcd], not always the same one.  I suppose there's a race
 condition somewhere.
 
 The card reader is a Kingston FCR-HS215/1, if that matters.
 Vendor/device ids: 11b0:6108.
 
 Yes, that's a known issue. So far, we've seen that only for very cheap
 devices, not something with a brand name on it. Usually, the different
 ports on a card reader have different names:
   /dev/disk/
   |-- by-id
   |   |-- usb-_CF_TS-RD13_2511 - ../../sdb
   |   |-- usb-_MS_TS-RD13_2511 - ../../sdd
   |   |-- usb-_SD_TS-RD13_2511 - ../../sdc
   |   `-- usb-_XD_TS-RD13_2511 - ../../sde
   ...
   |-- by-path
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:0 - ../../sdb
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:1 - ../../sdc
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:2 - ../../sdd
   |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:3 - ../../sde
   ...
 
 Hmm, we could add the SCSI-LUN number, like we do in path_id.
 
 Hannes, any idea what's the best fix for it?
 
Yes, a quite simple one:

THROW IT IN THE BIN!!! QUICK

No, seriously: These things are the most brain-dead things I've ever
came across. The implement _one_ USB device behind which _four_ (or
rather, one for each socket) SCSI devices are implemented.
And of course they've implemented just the smallest possible subset of
the respective spec to get these things working.

So as the USB id is not reliable in these cases we should use the SCSI
ID. But as these are really cheapo things I doubt the could be bothered
with implementing it.
At the same time I don't see another choice how to handle it.
There might be a weird chance reading the serial number of the media,
but this would a) have to be implemented and b) be more likely to
handled by HAL.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke [EMAIL PROTECTED]
SuSE Linux Products GmbHS390  zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg  http://www.suse.de



Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-03-03 Thread Kay Sievers
 The problem lies within /dev/disk/by-id.  Even though the card reader
 has four slots, it only has one serial number, so only one link is
 created in /dev/disk/by-id.  It's called
 usb-Generic_STORAGE_DEVICE_05170 and it points to one of
 /dev/sd[abcd], not always the same one.  I suppose there's a race
 condition somewhere.

 The card reader is a Kingston FCR-HS215/1, if that matters.
 Vendor/device ids: 11b0:6108.

Yes, that's a known issue. So far, we've seen that only for very cheap
devices, not something with a brand name on it. Usually, the different
ports on a card reader have different names:
  /dev/disk/
  |-- by-id
  |   |-- usb-_CF_TS-RD13_2511 - ../../sdb
  |   |-- usb-_MS_TS-RD13_2511 - ../../sdd
  |   |-- usb-_SD_TS-RD13_2511 - ../../sdc
  |   `-- usb-_XD_TS-RD13_2511 - ../../sde
  ...
  |-- by-path
  |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:0 - ../../sdb
  |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:1 - ../../sdc
  |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:2 - ../../sdd
  |   |-- pci-:00:1d.7-usb-0:3:1.0-scsi-0:0:0:3 - ../../sde
  ...

Hmm, we could add the SCSI-LUN number, like we do in path_id.

Hannes, any idea what's the best fix for it?

Thanks,
Kay



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-02-25 Thread Marco d'Itri
On Feb 22, Roland Mas [EMAIL PROTECTED] wrote:

 The problem lies within /dev/disk/by-id.  Even though the card reader
 has four slots, it only has one serial number, so only one link is
 created in /dev/disk/by-id.  It's called
 usb-Generic_STORAGE_DEVICE_05170 and it points to one of
 /dev/sd[abcd], not always the same one.  I suppose there's a race
 condition somewhere.
Looks like there is a problem with devices with multiple LUNs, but this
needs to be fixed upstream or the names will become inconsistent among
different distributions.

-- 
ciao,
Marco


signature.asc
Description: Digital signature


Bug#411967: udev: Name conflicts in z20_persistent.rules

2007-02-22 Thread Roland Mas
Package: udev
Version: 0.105-1
Severity: normal

I have an USB card reader with four ports (for four different types of
memory cards).  Plugging it in causes the creation of /dev/sda through
/dev/sdd.  Inserting an SD card into the corresponding slot (the third one, 
here)
causes /dev/sdc1 to appear.  Inserting a Memory Stick into the
corresponding (fourth) slot triggers /dev/sdd1.  Removing the cards does
remove the device nodes, no problem (the /dev/sd[abcd] files themselves
stay, though, but that's not a problem).

The problem lies within /dev/disk/by-id.  Even though the card reader
has four slots, it only has one serial number, so only one link is
created in /dev/disk/by-id.  It's called
usb-Generic_STORAGE_DEVICE_05170 and it points to one of
/dev/sd[abcd], not always the same one.  I suppose there's a race
condition somewhere.

When a memory card is inserted, another link,
usb-Generic_STORAGE_DEVICE_05170-part1, is created, pointing to, say,
/dev/sdc1.  Then, if another card is inserted while the first one is still 
there,
the link is overwritten and points to /dev/sdd1.  If the last inserted card is
taken out, that link is removed (although the other card may remain).  If a card
other than the last inserted one is removed, the link stays.

The card reader is a Kingston FCR-HS215/1, if that matters.
Vendor/device ids: 11b0:6108.

-- Package-specific info:
-- /etc/udev/rules.d/:
/etc/udev/rules.d/:
total 12
lrwxr-xr-x 1 root root   20 2005-04-09 22:45 020_permissions.rules - 
../permissions.rules
lrwxrwxrwx 1 root root   13 2006-12-29 09:28 025_gpsd.rules - ../gpsd.rules
lrwxrwxrwx 1 root root   19 2005-11-27 18:56 025_libgphoto2.rules - 
../libgphoto2.rules
lrwxrwxrwx 1 root root   16 2006-12-20 11:17 025_libsane.rules - 
../libsane.rules
lrwxrwxrwx 1 root root   22 2006-12-20 11:16 025_logitechmouse.rules - 
../logitechmouse.rules
lrwxrwxrwx 1 root root   13 2005-12-13 08:55 035_kino.rules - ../kino.rules
-rw-r--r-- 1 root root 1175 2007-02-07 14:54 local.rules
lrwxr-xr-x 1 root root   13 2004-08-25 19:05 udev.rules - ../udev.rules
lrwxrwxrwx 1 root root   25 2006-03-28 20:51 z20_persistent-input.rules - 
../persistent-input.rules
lrwxrwxrwx 1 root root   19 2005-11-27 18:23 z20_persistent.rules - 
../persistent.rules
-rw-r--r-- 1 root root  577 2006-08-28 09:21 z25_persistent-cd.rules
-rw-r--r-- 1 root root  401 2006-08-28 09:21 z25_persistent-net.rules
lrwxrwxrwx 1 root root   33 2006-04-20 19:10 z45_persistent-net-generator.rules 
- ../persistent-net-generator.rules
lrwxrwxrwx 1 root root   12 2005-07-04 09:23 z50_run.rules - ../run.rules
lrwxrwxrwx 1 root root   16 2005-11-27 18:23 z55_hotplug.rules - 
../hotplug.rules
lrwxrwxrwx 1 root root   19 2005-08-04 22:23 z60_alsa-utils.rules - 
../alsa-utils.rules
lrwxrwxrwx 1 root root   15 2005-12-12 16:31 z60_hdparm.rules - ../hdparm.rules
lrwxrwxrwx 1 root root   20 2006-11-21 21:32 z60_xen-backend.rules - 
../xen-backend.rules
lrwxrwxrwx 1 root root   33 2006-05-06 09:09 z60_xserver-xorg-input-wacom.rules 
- ../xserver-xorg-input-wacom.rules
lrwxrwxrwx 1 root root   29 2006-08-18 08:28 z75_cd-aliases-generator.rules - 
../cd-aliases-generator.rules
lrwxrwxrwx 1 root root   12 2007-02-15 20:11 z99_hal.rules - ../hal.rules

-- /sys/:
/sys/block/dm-0/dev
/sys/block/dm-10/dev
/sys/block/dm-11/dev
/sys/block/dm-12/dev
/sys/block/dm-13/dev
/sys/block/dm-14/dev
/sys/block/dm-15/dev
/sys/block/dm-16/dev
/sys/block/dm-17/dev
/sys/block/dm-18/dev
/sys/block/dm-19/dev
/sys/block/dm-1/dev
/sys/block/dm-20/dev
/sys/block/dm-21/dev
/sys/block/dm-22/dev
/sys/block/dm-23/dev
/sys/block/dm-24/dev
/sys/block/dm-25/dev
/sys/block/dm-26/dev
/sys/block/dm-27/dev
/sys/block/dm-28/dev
/sys/block/dm-29/dev
/sys/block/dm-2/dev
/sys/block/dm-30/dev
/sys/block/dm-31/dev
/sys/block/dm-32/dev
/sys/block/dm-33/dev
/sys/block/dm-34/dev
/sys/block/dm-35/dev
/sys/block/dm-36/dev
/sys/block/dm-3/dev
/sys/block/dm-4/dev
/sys/block/dm-5/dev
/sys/block/dm-6/dev
/sys/block/dm-7/dev
/sys/block/dm-8/dev
/sys/block/dm-9/dev
/sys/block/fd0/dev
/sys/block/hda/dev
/sys/block/hda/hda1/dev
/sys/block/hda/hda2/dev
/sys/block/hda/hda3/dev
/sys/block/hda/hda5/dev
/sys/block/hda/hda6/dev
/sys/block/hda/hda7/dev
/sys/block/hdb/dev
/sys/block/hdc/dev
/sys/block/hdc/hdc1/dev
/sys/block/hdc/hdc2/dev
/sys/block/hdc/hdc3/dev
/sys/block/hdc/hdc5/dev
/sys/block/hdc/hdc6/dev
/sys/block/hdc/hdc7/dev
/sys/block/loop0/dev
/sys/block/loop10/dev
/sys/block/loop11/dev
/sys/block/loop12/dev
/sys/block/loop13/dev
/sys/block/loop14/dev
/sys/block/loop15/dev
/sys/block/loop16/dev
/sys/block/loop17/dev
/sys/block/loop18/dev
/sys/block/loop19/dev
/sys/block/loop1/dev
/sys/block/loop20/dev
/sys/block/loop21/dev
/sys/block/loop22/dev
/sys/block/loop23/dev
/sys/block/loop24/dev
/sys/block/loop25/dev
/sys/block/loop26/dev
/sys/block/loop27/dev
/sys/block/loop28/dev
/sys/block/loop29/dev
/sys/block/loop2/dev
/sys/block/loop30/dev
/sys/block/loop31/dev
/sys/block/loop32/dev
/sys/block/loop33/dev