Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If it is the USB mass storage driver stealing it before you get a chance you might want to blacklist the VID/PID for the device with that driver.</p> <p>Since you mentioned it's a USB WiMAX adapter I'm going to have a wild guess though that it's presenting a USB mass storage device that contains a driver for it on Windows. If that's the case you would be better off working with <a href="http://www.draisberghof.de/usb_modeswitch/" rel="nofollow">USB Modeswitch</a>, which already handles this for 3G modems. Typically the devices expect some magic bytes (which often is actually a SCSI eject command) to persuade them to stop being mass storage devices and become the real modem. (That has a different PID normally too). </p> <p>Even if your device can't be persuaded to show the real device instead of the driver with one of the existing USB Modeswitch rules it would be more appropriate to fix the problem with that than a kernel hack.</p> <p>Doing it with USB Modeswitch has a number of advantages over what you proposed:</p> <ol> <li>Keeps everything modular: <ol> <li>Your driver only has to care about WiMAX and one VID/PID for the device</li> <li>The mass storage driver doesn't need to care about crazy devices - it just looks like plugging and unplugging a device. Teaching the mass storage driver about every single one of these sort of devices isn't appropriate, your device doesn't seem to be a special case.</li> <li>The knowledge about the split personalities of the device is only relevant to USB Modeswitch, which only exists to solve this problem.</li> </ol></li> <li>It doesn't break the USB mass storage aspects of the device - users might want to view the Windows driver under Linux for some reason, blacklisting this device would make that impossible. This might be important if you end up using some firmware shipped with the Windows driver under Linux too.</li> <li>It follows the existing setup and keeps your changes local to your module. This might well be important if you want to get your driver in the mainline kernel ever.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload