Re: Question regarding usbtest module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 17 Feb 2009, Tomohiro Kusumi wrote:

> Hi, I've got a question regarding misc/usbtest.c
> 
> I'm trying to write a userland test program which issues usbtest
> ioctl operation and utilize some of those 17 operations defined in
> misc/usbtest.c.
> 
> I looked through the misc/usbtest.c, and found out that you can
> specify vendor/product as module params so that the usbtest module
> gets loaded for whatever the device you want even if that device is
> not on the device_id table of misc/usbtest.c.
> 
> But it seems you first have to unload the class driver if the default
> one is already loaded. What if the class driver is not a kernel module,
> and is statically linked to linux kernel ? Since it is not a module,
> I can not rmmod it, and as a result, I am unable to load the usbtest.
> Is there any way I can load it in this situation without re-compiling
> the kernel ? Any comments would be helpful.

You can unbind any driver from any device through sysfs.  Simply write 
the device name (with no terminating newline) to the "unbind" file in 
the driver's directory.

For example, to unbind the USB hub driver from 2-0:1.0, you would do:

	echo -n 2-0:1.0 >/sys/bus/usb/drivers/hub/unbind

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux