Kernel Module

 

 


modules.alias

 

系統 Modules Alias 檔

/lib/modules/`uname -r`/modules.alias

usb-storage 的 alias

modinfo usb-storage | grep ^alias

alias:          usb:v0AF0pD157d0000dc*dsc*dp*ic*isc*ip*in*
...

device_descriptor

  • v        # vendor id
  • p        # Product id
  • d         # ? device_id
  • dc       # DEV_CLASS
  • dsc     # DEV_SUBCLASS
  • dp      # DeviceProtocol

interface_descriptor

  • ic       # iface_class
  • isc      # iface_subclass
  • ip       # iface_proto
  • in       # iface_num

自定 alias

假設有 USB Device "174c:55aa"

lsusb -v -d 174c:55aa

/etc/modprobe.d/usbdisk.conf

alias usb:v174cp55aad*dc*dsc*dp*ic*isc*ip*in* usb_storage

rmmod usb-storage

modprobe usb-storage