Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On my system (OpenSUSE 11.4 - kernel 2.6.37) ifconfig indicates different interrupt number for eth0 than proc aqd sys file system.

ifconfig indicates 17:

linux-3e1w:~ # ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:22:19:F5:0E:2D  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17 

proc fs indicates 43:

linux-3e1w:~ # cat /proc/interrupts
           CPU0       CPU1       
  0:    6340443     635232   IO-APIC-edge      timer
  1:       5100        940   IO-APIC-edge      i8042
  ..........
 17:     185626     257326   IO-APIC-fasteoi   firewire_ohci, b43
 43:          1          2   PCI-MSI-edge      eth0
 ........
NMI:        483       2065   Non-maskable interrupts
LOC:    3140034    5437332   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:        483       2065   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RES:     230706     229157   Rescheduling interrupts
CAL:      10511      11305   Function call interrupts
TLB:      24196      26573   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         72         70   Machine check polls
ERR:          9
MIS:          0

sys fs indicates 43:

linux-3e1w:~ # cat /sys/class/net/eth0/device/irq 
43

Can you explain it?

Update:

Relevant part of lspci -vv output for irq 17 (this belongs to wlan0 and not to eth0):

04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)
        Subsystem: Dell Wireless 1397 WLAN Mini-Card
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 17
        Region 0: Memory at f8000000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=2 PME-
        Capabilities: [58] Vendor Specific Information: Len=78 <?>
        Capabilities: [e8] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [d0] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
   ....................
   ....................

Relevant part of lspci -vv output for irq 43:

 08:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)
        Subsystem: Dell Device 02be
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 43
        Region 0: Memory at fc500000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [48] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
        Capabilities: [40] Vital Product Data
                Product Name: Broadcom NetLink Gigabit Ethernet Controller    
                Read-only fields:
                        [PN] Part number: BCM95784M
                        [EC] Engineering changes: 106679-15
                        [SN] Serial number: 0123456789
                        [MN] Manufacture ID: 31 34 65 34
                        [RV] Reserved: checksum good, 25 byte(s) reserved
                End
        Capabilities: [60] Vendor Specific Information: Len=6c <?>
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0300c  Data: 41c9
        Capabilities: [cc] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 4096 bytes
                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot-
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB
        Capabilities: [100 v1] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr+ BadTLP+ BadDLLP+ Rollover- Timeout- NonFatalErr+
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
        Capabilities: [13c v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=01
                        Status: NegoPending- InProgress-
        Capabilities: [160 v1] Device Serial Number 00-22-19-ff-fe-f5-0e-2d
        Capabilities: [16c v1] Power Budgeting <?>
        Kernel driver in use: tg3
share|improve this question

migrated from stackoverflow.com Sep 22 '11 at 19:59

This question came from our site for professional and enthusiast programmers.

    
lspci -vv output, please. –  bdonlan Sep 22 '11 at 18:11
    
@bdonlan Added lspci output –  dimba Sep 22 '11 at 18:22
    
Why close votes? This is real questions - several utilities output different interrupt number. –  dimba Sep 22 '11 at 18:23
1  
these are migration votes, to move this question to superuser. The question isn't being closed so much as recategorized. –  bdonlan Sep 22 '11 at 18:25
    
And, would it be possible to get full lspci -vv output, to see where that IRQ 17 is really going? –  bdonlan Sep 22 '11 at 18:25

1 Answer 1

up vote 3 down vote accepted

Your card is running in MSI interrupt mode, not legacy PCI mode. ifconfig is showing the legacy interrupt number assigned to your card by PCI configuration, rather than the MSI number assigned by pci_enable_msi.

The precise cause is visible in the tg3 driver. The driver copies the legacy PCI irq into the netdev struct at probe time. This is the number that ifconfig sees. The driver then enables MSI at device open time, changing the IRQ number.

(It's doubtful that the interrupt and io addresses have any relevance to userspace on current hardware. Having this information in ifconfig dates from the ISA period, where we set card interrupts with jumpers. We only really need this information when debugging drivers now.)

share|improve this answer
    
Does MSI need interrupt? If no, than ifconfig output is misleading. –  dimba Sep 22 '11 at 20:21
    
MSIs are interrupts, just a different type. This is really best thought of as a (minor) bug in the tg3 driver –  bdonlan Sep 22 '11 at 23:59
    
Is sys or/and proc reliable sources of #irq number? I mean if it displays incorrect #irq than interrupts won't be handled. –  dimba Sep 23 '11 at 8:11
    
Both '/sys' and '/proc' are correct. ifconfig displays the wrong interrupt number for the tg3 driver when in MSI mode, but it really doesn't matter. The value in /proc is the value that the driver is actually using. –  Adrian Cox Sep 23 '11 at 8:44
    
Can I trust sys fs too? –  dimba Sep 23 '11 at 8:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.