Queries on USB skeleton Driver

sanchayan maity victorascroft at gmail.com
Fri Dec 7 04:13:43 EST 2012


On Fri, Dec 7, 2012 at 11:41 AM, Sannu K <sannumail4foss at gmail.com> wrote:

> On Fri, Dec 7, 2012 at 9:40 AM, sanchayan maity <victorascroft at gmail.com>
> wrote:
> > Hello,
> >
> > I wanted to use the usb-skeleton driver for transferring data to a pen
> > drive. I am using Ubuntu 12.04 with kernel version 3.2.0. I remove the
> > usb-storage driver with rmmod and then inserted the skeleton module. The
> > module is inserted successfully. On inserting the drive, usb-storage
> module
> > gets automatically loaded.
> >
> > To avoid this, i tried blacklisting the module by including a blacklist
> > entry in blacklist.conf  and rebooting. This didn't work either and
> > usb-storage gets automatically loaded again.
> >
> > Can someone point out how i can use the usb-skeleton driver and also test
> > it.
> >
> > I also have Arch linux set up, but, i have not tried the above on it yet.
> >
> > Thanks & Regards,
> > Sanchayan.
> >
> >
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
> Try rmmoding usb-storage after it gets loaded.
>


*Try rmmoding usb-storage after it gets loaded*. << I had tried that.

Sorry, i didn't explain my problem clearly i guess with this sentence " Can
someone point out how i can use the usb-skeleton driver and also test it."
But, i understand it i think, what i was doing wrong.

I read the USB Drivers chapter once more and i had missed this point
somehow.

"If the USB driver is not associated with another type of subsystem that
handles the user interaction with the device (such as input, tty, video,
etc.), the driver can use the USB major number in order to use the
traditional char driver interface with userspace. To do this, the USB
driver must call the usb_register_dev function in the probe function when
it wants to register a device with the USB core."

I have only worked with char drivers till now and after registering my
driver, i was expecting it to show up in /proc/devices and then do a mknod.
I missed the point of using the USB major number already available and then
do a mknod with the major (already available)/ minor combination(available
from dev_info) and then access it using the /dev interface from a user
space application.

I haven't tried this yet as i am at work, but, gonna do this first thing
after i reach home. Hopefully, it will work.

Thanks & Regards,
Sanchayan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20121207/489f0b3d/attachment.html 


More information about the Kernelnewbies mailing list