LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   usbhid driver prevents the useful driver from being loaded (https://www.linuxquestions.org/questions/linux-hardware-18/usbhid-driver-prevents-the-useful-driver-from-being-loaded-948756/)

noamraph 06-06-2012 01:54 AM

usbhid driver prevents the useful driver from being loaded
 
Hello,

I'm using a controller which has both an rs-232 port and a USB port. Currently I'm using an external rs-232 to usb converter, but I'd like to use the built-in USB port. From the Windows driver I can deduce that the controller is using a cypress rs-232 to usb converter, but they have changed its vendorId and prodId.

Is it possible for me to tell linux to use the cypress_m8 driver for that device without recompiling the driver? Or if I do need to recompile the driver, can you give me some tips on how to do this, because I'm not very familiar with compiling drivers?

(I'm using ubuntu 11.10, linux 3.0.0)

Thank you very much,
Noam

noamraph 06-07-2012 04:51 PM

Update: I modified cypress_m8.{h,c} to include the vendor and product ids of the device, compiled it and run depmod -a.

Now, if I just plug the device I get the same behavior as previously was. However, if I run "rmmod usbhid" and plug the device, it now works! The problem, as I understand, is that the device is also a USB HID device, and the kernel gives it priority over the cypreess_m8 driver.

Do you have any suggestion on how to make it work without removing the usbhid driver (so I could simply plug it in)?

Thanks,
Noam

noamraph 06-13-2012 02:46 AM

I asked this question on the usb-linux mailing list, and Alan Stern provided the solution: add an entry to the hid_ignore_list array in drivers/hid/hid-core.c

See http://permalink.gmane.org/gmane.lin....general/65613


All times are GMT -5. The time now is 11:52 PM.