From: Kay Sievers Date: Thu, 03 Aug 2006 14:15:36 +0000 Subject: Re: Identical USB devices rules Message-Id: <1154614536.28034.10.camel@pim.off.vrfy.org> List-Id: References: <200608021809.13802.James@Finnall.net> In-Reply-To: <200608021809.13802.James@Finnall.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Thu, 2006-08-03 at 08:56 -0400, James Finnall wrote: > Thank you for the response. From the udevinfo returned from the units t= hey=20 > are identical, even the serial number. Of course, the hard disk is most= apt=20 > to change every time I use the device so that info is not of any value to= me. =20 >=20 > The only thing I found I could use here was to write two rules and then s= elect=20 > them by the USB ID field, ID=3D"3-2" and ID=3D"3-4". At present that se= ems to=20 > work OK on my system. I only have three USB ports and one is used for a= USB=20 > mouse. So I have to use the other two for operations like this. So I th= ink=20 > these rules should be OK. So my rules lare ike below now. >=20 > ID=3D"3-2",SYSFS{idVendor}=3D"0402", SYSFS{idProduct}=3D"5642", NAME=3D"d= isk/drv%n" > ID=3D"3-4",SYSFS{idVendor}=3D"0402", SYSFS{idProduct}=3D"5642", NAME=3D"d= isk1/drv%n" >=20 > Not really a good way to identify, because I think it so system specific = on=20 > the hardware support. Please look at the the persistent disk rules. I'm not talking about USB vendor/product numbers. Serious USB-ata bridges export the disks serial number like the disk on its native interface would do. > To allow identical devices to be distinguished=20 > differently only by the actual port it is connected removes the true hot = plug=20 > and play operation. Ideally, it shouldn't matter which port it is connec= ted=20 > or at least it should be invisible to the user creating the rules. On my= =20 > system each port is both USB level 1 and USB level 2. These are differe= nt=20 > controllers and are on different busses. The "3" in ID=3D"3-2" indicate= s it=20 > is on buss 3 from what I am able to determine. My mouse is only USB lev= el 1=20 > and it is on USB buss "2". The rules have to then be created for every = > device multiple times if they are identical. For my instance, ideally, = the=20 > first drive connected to any port should get the first assignment. Then = the=20 > 2nd drive connected gets the next assignment but within the single rule. Nope, we are not going to implement another form of dumb and unpredictable enumeration. :) =20 > But with the rules above the drive that is connected to that specific por= t=20 > will get the assigned devices, regardless of whether it is first or not. = =20 > Now, that may not always be undesirable either. Like my circumstances=20 > cloning a hard disk, I think I actually prefer the method above. That w= ay I=20 > know which drive is the source drive of the operation. Again, take a look at the persistent rules for disks and input devices and start from there. Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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