How To Look Up For PCI Devices And Corresponding Modules in SL5
===============================================================

Weblinks
--------

- Intel Driver Download Center: http://downloadcenter.intel.com/ 

- Intel Support Site: http://support.intel.com/support/index.htm

- Intel Network Connectivity: http://support.intel.com/support/network/sb/cs-008441.htm


Procedure Description
---------------------

List your PCI devices, look up for the vendor and hardware ID numbers
and search the corresponding entry in the table which maps hardware
IDs to module names.


This might be helpful if one has a new hardware device such as a new
network card, which is not recognized by the system because of a
missing entry in the file
`/lib/modules/<kernelversion>/modules.pcimap`, which maps devices to
modules.  Assumption: the required driver (module) is present.


Step by Step Procedure: Example For a Working Network Card
----------------------------------------------------------

List your PCI devices using `lscpi`::

    # lspci
    ...
    00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
    ...

Listing with `lspci -n` will show identification numbers instead of names::

    # lspci -n
    ...
    00:19.0 0200: 8086:10bd (rev 02)
    ...

- a)

  `19.0    PCI device number`

- b)

  `0200    Hardware Type       "Ethernet controller"`

- c)

  `8086    Vendor ID           "Intel Corporation"`

- d)

  `10bd    Hardware ID         "82566DM-2 Gigabit Network Connection"`


For a very verbose output use `lspci -vv`::

    # lspci -vv | grep 00:19 -A 15
    00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
        Subsystem: Fujitsu Siemens Computer GmbH Unknown device 10fd
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0
        Interrupt: pin A routed to IRQ 74
        Region 0: Memory at f2200000 (32-bit, non-prefetchable) [size=128K]
        Region 1: Memory at f2225000 (32-bit, non-prefetchable) [size=4K]
        Region 2: I/O ports at 1820 [size=32]
        Capabilities: [c8] Power Management version 2
            Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
            Status: D0 PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable+
            Address: 00000000fee00000  Data: 404a
        Capabilities: [e0] #13 [0306]


Hovewer, take the device ID `10bd` and look for it in the `modules.pcimap`::

    # grep 10bd /lib/modules/2.6.18-92.1.13.el5/modules.pcimap
    e1000e      0x00008086 0x000010bd 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0

In this output one can see that the kernel module e1000e is selected
for this network device.  You can see this by "lsmod" if your network
is up::

    # lsmod | grep e1000e
    e1000e         92801  0


Step by Step Procedure: Example For a Not Working Network Card
--------------------------------------------------------------

Basically the steps from the previous section are repeated to get the
required hardware infos.

Eventually the missing entry is added to `modules.pcimap`. Here we
assume that the "e1000e" module works as well for the new network
card::

    # lscpi
    00:19.0 Ethernet controller: Intel Corporation Unknown device 10de (rev 02)

The device ID is `10de`::

    # grep 10de /lib/modules/2.6.18-53.1.4.el5/modules.pcimap
    ...

Only vendor IDs match the number `10de`. The following line will be
added to `modules.pcimap`::

    # vi /lib/modules/2.6.18-53.1.4.el5/modules.pcimap
    ... adding the line 
    e1000e           0x00008086 0x000010de 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0

`ethtool`
---------

Use `ethtool` to get network device specific information, e.g.  query
the specified ethernet device for associated driver information::

    [root@pc7377 ~]# ethtool -i eth0
    driver: e1000e
    version: 0.4.1.7-NAPI
    firmware-version: 1.3-0
    bus-info: 0000:00:19.0
