Re: Getting device 0fe6:9700 Kontron to work with NM

On 12/02/2011 12:51 PM, Dan Williams wrote:
On Fri, 2011-12-02 at 13:27 +0200, Perazim wrote:
Update: Turns out that this device was repacked by manufacturer without
documenting NIC chip change. The correct driver is qf9700 which is not
in the standard kernel and I found the source for on the internet and
built against my kernel. Once done and installed in modules, I can
modprobe this and device is brought up and NM recognizes it.

Now I need to figure out how to get this to happen automatically when
the device is plugged.

It's a kernel problem.  If it's the same USB ID as the old device with
the old chip, then you'll need to talk to various kernel mailing lists
(linux-usb probably, or netdev) to see how to figure this out.  The
problem is that drivers mostly use USB IDs for autoloading, and if this
device has the same USB IDs then it'll conflict with the old driver.
You can't just add the same USB ID to two different drivers, there's
more coordination that needs to happen.  Unfortunately I don't know what
the coordination is off the top of my head :(

The general fix for this kind of thing is to find some value in the device configuration registers that is different for the two devices, and return driver load failure when the wrong one is found. An example is found for PCI ID 0x10ec:0x8192, which occurs for both RTL8192SE and RTL8192E devices. In this case, drivers rtl8192se and r8192e read the PCI revision. If the value is 1, then rtl8192xe returns the invalid device code, while r8192e returns the invalid code when the revision is 0x10.

For your device, you would need to find some value in the USB configuration that differs, and do the same kind of logic. Both drivers will be loaded, but only the "right" one will be active.


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