强制驱动程序与设备匹配 [英] Forcing driver to device match
问题描述
我有一块USB硬件,我知道该驱动程序. 但是,供应商ID和产品ID与驱动程序中注册的VID,PID对不匹配. linux中是否有一种方法可以强制驱动程序与已知设备相关联,而该驱动程序不涉及内核模块重新编译以添加PID/VID对?
I have a piece of usb hardware, for which I know the driver. However, the vendor id and product id do not match the VID, PID pair registered in the driver. Is there a way in linux to force a driver to be associated with a known device, that do not involve kernel module recompilation to add a PID / VID pair ?
推荐答案
在sysfs树中查找模块.在这种情况下,
Find the module in the sysfs tree. In this case it was in
/sys/bus/usb-serial/drivers/cp2101
在此目录中,有一个new_id
文件条目,可用于动态添加VID PID对,如下所示:
In this directory, there is a new_id
file entry that can be used to dynamically add VID PID pair like this :
echo VID PID >new_id
这是关于此功能的 LWN条目
这篇关于强制驱动程序与设备匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!