1

I want to know where is the file which lists all modules in Linux kernel package for specific device ID ? and where is that file (path)?

pci.ids and usb.ids contain the device ID and name of device but not the module of that. For example in pci.ids there is a line " 10ec 8169 RTL8169/8110 Family PCI Gigabit Ethernet NIC " but it does not module name of that which is "r8169".

In esxi there was a file simple.map for this which had this line "10ec:8169 0000:0000 network r8169" for above example. But i cant find it in linux? (my linux is opensuse 12.2)

thanx and best regards

2 Answers2

1

How about lspci -v or lspci -k?

06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
    Subsystem: Intel Corporation Device 1050
    Flags: bus master, fast devsel, latency 0, IRQ 44
    Memory at da000000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: <access denied>
    Kernel driver in use: iwl3945
    Kernel modules: iwl3945

You can also determine by following steps:

$ lspci | grep -i wireless
06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)

$ lspci -n | grep 06:00.0
06:00.0 0280: 8086:4222 (rev 02)

$ grep 4222 /lib/modules/2.6.38-gentoo/modules.pcimap 
iwl3945              0x00008086 0x00004222 0xffffffff 0x00001005 0x00000000 0x00000000 0x0
iwl3945              0x00008086 0x00004222 0xffffffff 0x00001034 0x00000000 0x00000000 0x0
iwl3945              0x00008086 0x00004222 0xffffffff 0x00001044 0x00000000 0x00000000 0x0
iwl3945              0x00008086 0x00004222 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0

$ modinfo iwl3945
filename:       /lib/modules/2.6.38-gentoo/kernel/drivers/net/wireless/iwlwifi/iwl3945.ko
firmware:       iwlwifi-3945-2.ucode
license:        GPL
author:         Copyright(c) 2003-2010 Intel Corporation <ilw@linux.intel.com>
version:        in-tree:ds
description:    Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux
srcversion:     65739B23FCE2B5359078B5A
alias:          pci:v00008086d00004227sv*sd*bc*sc*i*
alias:          pci:v00008086d00004222sv*sd*bc*sc*i*
alias:          pci:v00008086d00004227sv*sd00001014bc*sc*i*
alias:          pci:v00008086d00004222sv*sd00001044bc*sc*i*
alias:          pci:v00008086d00004222sv*sd00001034bc*sc*i*
alias:          pci:v00008086d00004222sv*sd00001005bc*sc*i*
depends:        
vermagic:       2.6.38-gentoo SMP mod_unload PENTIUM4 
parm:           antenna:select antenna (1=Main, 2=Aux, default 0 [both]) (int)
parm:           swcrypto:using software crypto (default 1 [software])
 (int)
parm:           debug:debug output mask (uint)
parm:           disable_hw_scan:disable hardware scanning (default 0) (deprecated) (int)
parm:           fw_restart3945:restart firmware in case of error (int)
quanta
  • 50,327
  • 19
  • 152
  • 213
0

You can find symbolic links from devices to modules in the /sys file system:

$ ll /sys/class/net/wlan0/device/driver
  lrwxrwxrwx. 1 root root 0 sep 22 11:46 /sys/class/net/wlan0/device/driver -> ../../../../bus/pci/drivers/ath9k

You can find all symbolic links to driver in /sys by using

$ find /sys -type l -name 'driver' -ls
wzzrd
  • 10,269
  • 2
  • 32
  • 47