Re: NIU driver: Sun x8 Express Quad Gigabit Ethernet Adapter

Jesper Dangaard Brouer
2008-11-05T07:05:47Z

[-- Attachment #1: Type: text/plain, Size: 3820 bytes --]

On Tue, 2008-11-04 at 13:42 -0800, David Miller wrote:
> From: Jesper Dangaard Brouer <jdb@comx.dk>
> Date: Tue, 04 Nov 2008 15:45:09 +0100
>
> > I just bought the Sun x8 Express Quad Gigabit Ethernet Adapter you
> > recommended to me. It seem to work with the NIU driver (I can ping
> > through the box), but I get a kernel warning when spamming it with
> > pktgen...
> >
> > Where do I go from here?
> > And what do you want me to try?
>
> Looks like the transmitter is wedged.

I have attached niu related output from kern.log.
(cat /var/log/kern.log | grep niu | awk -F'kernel:' '{print $2}')

> Using current sources I assume?

Yes, your latest tree. Both with and without your latest change to the
niu driver (niu: Use pci_ioremap_bar().).

Also tried a debian 2.6.26-1-686, that kernel actually crashed (in
net_rx_action, __do_softirq, do_softirq, irq_exit, do_IRQ, mwait_idle).

A strange observation is the IRQ allocations seen via /proc/interrupts:
(e.g. eth2 has assigned no less than 12 IRQs !?!)

dcu-router-ng:~# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
0: 123 1 0 1 IO-APIC-edge timer
1: 1 0 0 1 IO-APIC-edge i8042
3: 2 2 1 2 IO-APIC-edge serial
9: 0 0 0 0 IO-APIC-fasteoi acpi
12: 0 1 2 1 IO-APIC-edge i8042
14: 15 14 13 15 IO-APIC-edge ata_piix
15: 0 0 0 0 IO-APIC-edge ata_piix
16: 404 412 424 367 IO-APIC-fasteoi uhci_hcd:usb1, ehci_hcd:usb6, eth0
17: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb2, eth3
18: 8 9 8 9 IO-APIC-fasteoi uhci_hcd:usb3
19: 0 0 0 0 IO-APIC-fasteoi uhci_hcd:usb4
20: 0 0 0 0 PCI-MSI-edge eth2
21: 963 959 942 997 IO-APIC-fasteoi ipmi_si, eth2
22: 23 23 24 23 IO-APIC-fasteoi uhci_hcd:usb5, eth2
23: 0 0 0 0 PCI-MSI-edge eth2
24: 0 0 0 0 PCI-MSI-edge eth2
25: 0 0 0 0 PCI-MSI-edge eth2
26: 0 0 0 0 PCI-MSI-edge eth2
27: 0 0 0 0 PCI-MSI-edge eth2
28: 0 0 0 0 PCI-MSI-edge eth2
29: 0 0 0 0 PCI-MSI-edge eth2
30: 0 0 0 0 PCI-MSI-edge eth2
31: 0 0 0 0 PCI-MSI-edge eth2
32: 0 0 0 0 PCI-MSI-edge eth2
34: 318 310 319 317 PCI-MSI-edge cciss0
NMI: 0 0 0 0 Non-maskable interrupts
LOC: 89420 334612 485037 172341 Local timer interrupts
RES: 101 270 159 174 Rescheduling interrupts
CAL: 83 132 122 74 Function call interrupts
TLB: 259 226 350 315 TLB shootdowns
TRM: 0 0 0 0 Thermal event interrupts
SPU: 0 0 0 0 Spurious interrupts
ERR: 0
MIS: 0

--
Med venlig hilsen / Best regards
Jesper Brouer
ComX Networks A/S
Linux Network developer
Cand. Scient Datalog / MSc.
Author of http://adsl-optimizer.dk
LinkedIn: http://www.linkedin.com/in/brouer

[-- Attachment #2: niu_kern.log --]
[-- Type: text/x-log, Size: 4992 bytes --]

cat /var/log/kern.log | grep niu | awk -F'kernel:' '{print $2}' > niu_kern.log

niu.c:v0.9 (May 4, 2008)
niu 0000:0b:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
niu: niu_get_parent: platform_type[1] port[0]
niu: niu_new_parent: Creating new parent.
niu 0000:0b:00.0: setting latency timer to 64
niu: niu_get_invariants: VPD offset [00016a00]
niu: VPD_SCAN: start[16a14] end[16b98]
niu: VPD_SCAN: Reading in property [local-mac-address] len[6]
niu: VPD_SCAN: Reading in property [version] len[38]
niu: VPD_SCAN: Reading in property [model] len[14]
niu: VPD_SCAN: Reading in property [board-model] len[12]
niu: VPD_SCAN: Reading in property [num-mac-addresses] len[1]
niu: VPD_SCAN: Reading in property [phy-type] len[4]
niu: VPD_SCAN: FCODE major(3) minor(9)
niu: niu_get_and_validate_port: port[0] num_ports[4]
niu: niu_probe_ports(): port_phy[00000000]
niu0: Found PHY 002060b1 type MII at phy_port 10
niu0: Found PHY 002060b1 type MII at phy_port 11
niu0: Found PHY 002060b1 type MII at phy_port 12
niu0: Found PHY 002060b1 type MII at phy_port 13
niu: niu0: Port 0 [4 RX chans] [6 TX chans]
niu: niu0: Port 1 [4 RX chans] [6 TX chans]
niu: niu0: Port 2 [4 RX chans] [6 TX chans]
niu: niu0: Port 3 [4 RX chans] [6 TX chans]
niu: niu0: Port 0 RDC tbl(0) [ 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 ]
niu: niu0: Port 0 RDC tbl(1) [ 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 3 ]
niu: niu0: Port 1 RDC tbl(2) [ 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 ]
niu: niu0: Port 1 RDC tbl(3) [ 4 5 6 7 4 5 6 7 4 5 6 7 4 5 6 7 ]
niu: niu0: Port 2 RDC tbl(4) [ 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11 ]
niu: niu0: Port 2 RDC tbl(5) [ 8 9 10 11 8 9 10 11 8 9 10 11 8 9 10 11 ]
niu: niu0: Port 3 RDC tbl(6) [ 12 13 14 15 12 13 14 15 12 13 14 15 12 13 14 15 ]
niu: niu0: Port 3 RDC tbl(7) [ 12 13 14 15 12 13 14 15 12 13 14 15 12 13 14 15 ]
niu 0000:0b:00.0: irq 32 for MSI/MSI-X
niu 0000:0b:00.0: irq 31 for MSI/MSI-X
niu 0000:0b:00.0: irq 30 for MSI/MSI-X
niu 0000:0b:00.0: irq 29 for MSI/MSI-X
niu 0000:0b:00.0: irq 28 for MSI/MSI-X
niu 0000:0b:00.0: irq 27 for MSI/MSI-X
niu 0000:0b:00.0: irq 26 for MSI/MSI-X
niu 0000:0b:00.0: irq 25 for MSI/MSI-X
niu 0000:0b:00.0: irq 24 for MSI/MSI-X
niu 0000:0b:00.0: irq 23 for MSI/MSI-X
niu 0000:0b:00.0: irq 22 for MSI/MSI-X
niu 0000:0b:00.0: irq 21 for MSI/MSI-X
niu 0000:0b:00.0: irq 20 for MSI/MSI-X
niu: niu_classifier_swstate_init: num_tcam(256)
niu: fflp_early_init: Initting hw on port 0
niu: fflp_early_init: Success
niu 0000:0b:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
niu: niu_get_parent: platform_type[1] port[1]
niu 0000:0b:00.1: setting latency timer to 64
niu: niu_get_invariants: VPD offset [00016a00]
niu: VPD_SCAN: start[16a14] end[16b98]
niu: VPD_SCAN: Reading in property [local-mac-address] len[6]
niu: VPD_SCAN: Reading in property [version] len[38]
niu: VPD_SCAN: Reading in property [model] len[14]
niu: VPD_SCAN: Reading in property [board-model] len[12]
niu: VPD_SCAN: Reading in property [num-mac-addresses] len[1]
niu: VPD_SCAN: Reading in property [phy-type] len[4]
niu: VPD_SCAN: FCODE major(3) minor(9)
niu: niu_get_and_validate_port: port[1] num_ports[4]
niu: niu_probe_ports(): port_phy[000000aa]
niu: niu_classifier_swstate_init: num_tcam(256)
niu 0000:0b:00.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
niu: niu_get_parent: platform_type[1] port[2]
niu 0000:0b:00.2: setting latency timer to 64
niu: niu_get_invariants: VPD offset [00016a00]
niu: VPD_SCAN: start[16a14] end[16b98]
niu: VPD_SCAN: Reading in property [local-mac-address] len[6]
niu: VPD_SCAN: Reading in property [version] len[38]
niu: VPD_SCAN: Reading in property [model] len[14]
niu: VPD_SCAN: Reading in property [board-model] len[12]
niu: VPD_SCAN: Reading in property [num-mac-addresses] len[1]
niu: VPD_SCAN: Reading in property [phy-type] len[4]
niu: VPD_SCAN: FCODE major(3) minor(9)
niu: niu_get_and_validate_port: port[2] num_ports[4]
niu: niu_probe_ports(): port_phy[000000aa]
niu: niu_classifier_swstate_init: num_tcam(256)
niu 0000:0b:00.3: PCI INT D -> GSI 19 (level, low) -> IRQ 19
niu: niu_get_parent: platform_type[1] port[3]
niu 0000:0b:00.3: setting latency timer to 64
niu: niu_get_invariants: VPD offset [00016a00]
niu: VPD_SCAN: start[16a14] end[16b98]
niu: VPD_SCAN: Reading in property [local-mac-address] len[6]
niu: VPD_SCAN: Reading in property [version] len[38]
niu: VPD_SCAN: Reading in property [model] len[14]
niu: VPD_SCAN: Reading in property [board-model] len[12]
niu: VPD_SCAN: Reading in property [num-mac-addresses] len[1]
niu: VPD_SCAN: Reading in property [phy-type] len[4]
niu: VPD_SCAN: FCODE major(3) minor(9)
niu: niu_get_and_validate_port: port[3] num_ports[4]
niu: niu_probe_ports(): port_phy[000000aa]
niu: niu_classifier_swstate_init: num_tcam(256)
niu: eth2: Link is up at 1Gb/sec, full duplex
niu: eth3: Link is up at 1Gb/sec, full duplex