On Fri, Dec 7, 2012 at 2:43 PM, sanchayan maity <[email protected]>wrote:
> On Fri, Dec 7, 2012 at 11:41 AM, Sannu K <[email protected]> wrote: > >> On Fri, Dec 7, 2012 at 9:40 AM, sanchayan maity <[email protected]> >> 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 >> > [email protected] >> > 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. > > > Hello, I tried writing data by using the write and the fd of the driver and also echo. After looking at the usb storage and usb transport code a bit, i noticed scsi command set is being used. Am i correct in coming to the conclusion that the usb skeleton driver cannot be used to transfer files but to only read or set device configuration?. Thanks & Regards, Sanchayan.
_______________________________________________ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
