Re: drivers/block/ub.c

From: Matthew Dharm
Date: Sun Jun 27 2004 - 16:05:49 EST


On Sun, Jun 27, 2004 at 01:29:45PM -0700, Pete Zaitcev wrote:
> On Sun, 27 Jun 2004 11:23:10 -0400 (EDT)
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>
> > + * -- use serial numbers to hook onto same hosts (same minor) after
> > disconnect
>
> It was a poor wording by me. It refers to the drift of naming due to
> increments in usb_host_id. After a disconnect and reconnect, /dev/uba1
> refers to the device, but /proc/partitions says "ubb".
>
> To correct this, I have to set gendisk->fist_minor before calling
> add_disk(), but in order to do that, a driver has to track devices
> somehow. A serial number looks like an obvious candidate for a key.

Serial numbers are unreliable for this. We've had a long history with this
issue. Many devices do not provide a serial number. Many devices provide
a serial number, but it is not a constant. Many devices provide invalid
serial numbers.

Matt

--
Matthew Dharm Home: mdharm-usb@xxxxxxxxxxxxxxxxxx
Maintainer, Linux USB Mass Storage Driver

IT KEEPS ASKING ME WHERE I WANT TO GO TODAY! I DONT WANT TO GO ANYWHERE!
-- Greg
User Friendly, 11/28/97

Attachment: pgp00000.pgp
Description: PGP signature