Sure, no problem, Xavier!
Yes. I think you understood what I was trying to say. I modified the storage
probe function so that when peripheral is remounted that was once mounted
previously, it is assigned the same device file name that was assigned
previously, i.e. sda1, etc.

Cheers
Amol

On 9/11/07, xavier.montagne <[EMAIL PROTECTED]> wrote:
>
>  Thanks for the advice Amol !
> If I well understood you modified the probe function to remount an already
> seen peripheral... something like that ? I will have a look at the usb probe
> function and the /proc/scsi interface.
> I will contact you propbably to let you know about my progress ;-)
>
> Cordialement,
> Xavier MONTAGNE
> Pragmatec
> 06.98.06.21.55
>
>
>
> ----- Original Message -----
> *From:* amol sukerkar <[EMAIL PROTECTED]>
> *To:* uClinux development list <uclinux-dev@uclinux.org>
> *Sent:* Tuesday, September 11, 2007 7:18 PM
> *Subject:* Re: [uClinux-dev] USB and /dev/sdx interface
>
> Hi Xavier,
>               I have fixed this problem and it works. I had to be a little
> innovative to handle this. This is how I did it.
> Every USB thumb drive is assigned a unique GUID by the USB driver. And the
> information is stored and updated in the real time in the file
> /proc/scsi/usb-storage-x/x. Here x is the order of the thumb drive. For
> instance, for the first thumb drive you insert, it will be 0, for the next
> it will be 1 and so on. The GUID is listed in the file 'x'.
>
>               All you have to do is match GUID with the device file, i.e.,
> sda1 and so on. So, sometime after USB Mass Storage driver enumerates the
> USB thumb drive in function "probe"(of course, when remounted and not the
> first time. You used the word "reuse"), run through the files
> /proc/scsi/usb-storage-x/x. And match the GUID obtained by the probe
> function to the GUID listed in the files. If GUID from file '0' matches,
> then, you go ahead and assign /dev/sda1 device file name to the USB thumb
> drive and so on.
>
>               I thought this is an efficient method and saves a lot of
> work involved in doing insmod/rmmod.
>
>               Hope this makes sense!
>
> Merci,
> Amol :-)
>
> On 9/11/07, xavier.montagne <[EMAIL PROTECTED]> wrote:
> >
> >  Hi,
> >
> > Everytime I insert a new USB key to my SL811 controler, the kernel
> > detects properly the key and affect a new interface :
> > /dev/sda1
> > /dev/sdb1
> > /dev/sdc1
> >
> > If I reuse the same key Linux succeeds to see it and affect the same
> > previous interface (/dev/sdb for instance).
> > But how to use everytime the same interface /dev/sda, even if I remove
> > the key and insert a different one into the same slot ?
> > Is it a standard Linux behavior to lock a /dev/sdx interface for a
> > dedicated peripheral once detected ?
> >
> > Cordialement,
> > Xavier MONTAGNE
> > Pragmatec
> > 06.98.06.21.55
> >
> >
> > _______________________________________________
> > uClinux-dev mailing list
> > uClinux-dev@uclinux.org
> > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> > This message was resent by uclinux-dev@uclinux.org
> > To unsubscribe see:
> > http://mailman.uclinux.org/mailman/options/uclinux-dev
> >
>
>  ------------------------------
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
> ------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.485 / Virus Database: 269.13.14/999 - Release Date:
> 10/09/2007 17:43
>
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev@uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev@uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to