From: Michael Hamilton <michael@actrix.gen.nz>
To: linux-hotplug@vger.kernel.org
Subject: Re: usb-mount (hotplug + desktop hooks)
Date: Wed, 06 Nov 2002 09:21:14 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-103657474611600@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-103558971618973@msgid-missing>
On Wed, 06 Nov 2002 17:23, Ajay wrote:
> AFAIK MSD Devices all need a serial number. Is that
> right?
> ...
> ...
> Again, AFAIK the serial can be changed only if the
> Device firmware is flashed. Assuming a user will flash
> it before plugging it in each time seems to be an
> overkill.
> ...
No, the serial need not be something burned into the device.
The device I have makes up a serial number on the fly.
Each time it is inserted it appends its position on the bus onto
the end of the vendor and product id - so the serial is
vendor-product-bus-location. The next time I plug it
in the bus-location may differ, so the serial will differ.
This sums it up and adds a scary note on uniqeness:
On Tue, 08 Oct 2002 08:24, Matthew Dharm wrote:
| From: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
| Cc: linux-usb-users@lists.sourceforge.net
| Subject: Re: [Linux-usb-users] Auto mount/unmount: need explanation of serial numbers?
| On Mon, Oct 07, 2002 at 11:26:35AM -0700, Randy.Dunlap wrote:
| > On Mon, 7 Oct 2002, Matthew Dharm wrote:
| >
| > | On Tue, Oct 08, 2002 at 01:11:01AM +1300, Michael Hamilton wrote:
| > | > 1. What part of the serial remains constant for the same device,
| > | > if any?
| > |
| > | The whole thing should. The compliance test that the USB-IF (including
| > | myself) are working on requires a constant serial number.
| >
| > Matt, do you read that as part of any spec (requirement)?
|
| Not exactly. But the entire Mass Storage DWG was pretty supprised when I
| pointed out devices that had this broken behavior.
|
| The spec requires a 'unique' serial number, but does not specify what the
| domain for that uniqueness is. The intent was to be unique over all
| devices with that VID:PID. A few (a _very_ few) manufacturers chose to
| interpret this as unique for a given USB bus.
|
| The changing serial number is because the bus address is incorporated into
| the serial number.
|
| Of course, that means that it's possible to have two units on two different
| USB busses with the same bus address, and thus the same serial number.
|
| Matt
|
| --
| Matthew Dharm Home: mdharm-usb@one-eyed-alien.net
| Maintainer, Linux USB Mass Storage Driver
Note, that although Matt states that only a few manufacturers have
done this, their chipsets may be turning up in many products.
There are several products that identify themselves as the same as
mine, but they're different kinds of devices: fixed usb-drives, card
readers, etc, all sold under different brands.
On Wed, 06 Nov 2002 17:23, Ajay wrote:
> ...
> > The only way I found
> > to clear this
> > up is to unload the usb-storage module.
>
> Also, the fact is that /dev/sda, etc. are only
> 'relative labels' - i.e. if you had plugged in a
> device before the one you're using, _that_ would have
> been /dev/sda and your device /dev/sdb, even if the
> serial hasn't changed (this after unloading - loading
> the usb-storage module).
> ...
Yes, I understand this. The point I was trying to make was
that after I unplug the device, the /dev/sdX remains allocated
forever. This is because the serial keeps changing.
And, because the serial keeps changing, I keep using more and more
/dev/sdX entries. And, as stated, the only way to clear them
is to either reboot, or get to a point where usb-storage
can be unloaded - that is, unplug all storage devices and
then depmod -r usb-storage. This is exacty what my current
solutions does - if it sees that there are no devices left
on the bus, it removes the module.
I was rather surprised by all this - it's a nifty device and
a great way to transport stuff to and from client sites, but
looking at how it fits into exiting ideas on mouting and
partitioning was a real education (see
http://users.actrix.co.nz/michael/usbmount.html for details)
Michael
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2002-11-06 9:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 23:46 usb-mount (hotplug + desktop hooks) David Brownell
2002-10-26 9:35 ` Oliver Neukum
2002-10-28 21:52 ` Gary_Lerhaupt
2002-11-02 23:32 ` Michael Hamilton
2002-11-04 16:38 ` Gary_Lerhaupt
2002-11-05 9:46 ` Michael Hamilton
2002-11-06 4:23 ` Ajay
2002-11-06 9:21 ` Michael Hamilton [this message]
2002-11-06 15:53 ` Gary_Lerhaupt
2002-11-07 5:03 ` Michael Hamilton
2002-11-07 16:05 ` Gary_Lerhaupt
2002-11-11 8:11 ` Michael Hamilton
2002-11-11 15:39 ` Gary_Lerhaupt
2002-11-13 8:55 ` Michael Hamilton
2002-11-21 20:30 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-103657474611600@msgid-missing \
--to=michael@actrix.gen.nz \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).