All of lore.kernel.org
 help / color / mirror / Atom feed
* the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
@ 2018-01-02 21:32 Mikulas Patocka
  2018-01-02 21:50 ` Bjorn Helgaas
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-02 21:32 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, Meelis Roos, linux-alpha

Hi

The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
networking on Alpha for me. I have an Alpha Avanti server with tulip 
network card.

The patch 0e4c2eeb breaks it so that I get MCE when the network card 
driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
completes, but the network card doesn't receive any interrupts (and soon 
it reports warning about timeout on tx queue). All kernels in the 4.14 
branch have this bug.

Mikulas


# cat /proc/interrupts
           CPU0
  1:          3    XT-PIC      i8042
  2:          0    XT-PIC      cascade
  4:        752    XT-PIC      ttyS0
  8:      58118     dummy    -RTC       timer
 10:       1613    XT-PIC      ide0, ide1
 11:        739    XT-PIC      sym53c8xx
 12:          5    XT-PIC      i8042
 15:          0    XT-PIC      eth0	<--- note that the counter is zero
PMI:          0           Performance Monitoring
ERR:          0

# lspci -vv
00:06.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 01)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 255
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at 8000 [size=256]
        Region 1: Memory at 01300000 (32-bit, non-prefetchable) [size=256]
        Kernel driver in use: sym53c8xx
        Kernel modules: sym53c8xx

00:07.0 ISA bridge: Intel Corporation 82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge (rev 43)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0

00:0b.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
        Subsystem: Digital Equipment Corporation DECchip 21140 [FasterNet]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 255 (5000ns min, 10000ns max), Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 15
        Region 0: I/O ports at 8400 [size=128]
        Region 1: Memory at 01302000 (32-bit, non-prefetchable) [size=128]
        Expansion ROM at 01280000 [disabled] [size=256K]
        Kernel driver in use: tulip
        Kernel modules: tulip

00:0c.0 Display controller: Digital Equipment Corporation DECchip 21030 [TGA] (rev 02)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 255
        Interrupt: pin A routed to IRQ 5
        Region 0: Memory at 02000000 (32-bit, prefetchable) [size=32M]
        Expansion ROM at 012c0000 [disabled] [size=256K]
        Kernel driver in use: tgafb

00:0d.0 RAID bus controller: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)
        Subsystem: Silicon Image, Inc. Winic W-680 (Silicon Image 680 based)
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 240, Cache Line Size: 4 bytes
        Interrupt: pin A routed to IRQ 10
        Region 0: I/O ports at 8490 [size=8]
        Region 1: I/O ports at 84a0 [size=4]
        Region 2: I/O ports at 8498 [size=8]
        Region 3: I/O ports at 84a4 [size=4]
        Region 4: I/O ports at 8480 [size=16]
        Region 5: Memory at 01301000 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at 01200000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 2
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
        Kernel driver in use: SiI_IDE


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
@ 2018-01-02 21:50 ` Bjorn Helgaas
  2018-01-02 21:54 ` Meelis Roos
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 21+ messages in thread
From: Bjorn Helgaas @ 2018-01-02 21:50 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Lorenzo Pieralisi, Richard Henderson, Ivan Kokshaysky,
	Meelis Roos, Matt Turner, linux-alpha, linux-pci

[+cc linux-pci]

Thanks for the report!  Lorenzo has been on vacation and is probably
buried in email, but I'm sure he'll be on this as soon as he digs out.

On Tue, Jan 2, 2018 at 3:32 PM, Mikulas Patocka <mpatocka@redhat.com> wrote:
> Hi
>
> The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace
> pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks
> networking on Alpha for me. I have an Alpha Avanti server with tulip
> network card.
>
> The patch 0e4c2eeb breaks it so that I get MCE when the network card
> driver is loaded. The patch 814eae59 fixes the MCE, the system boot
> completes, but the network card doesn't receive any interrupts (and soon
> it reports warning about timeout on tx queue). All kernels in the 4.14
> branch have this bug.
>
> Mikulas
>
>
> # cat /proc/interrupts
>            CPU0
>   1:          3    XT-PIC      i8042
>   2:          0    XT-PIC      cascade
>   4:        752    XT-PIC      ttyS0
>   8:      58118     dummy    -RTC       timer
>  10:       1613    XT-PIC      ide0, ide1
>  11:        739    XT-PIC      sym53c8xx
>  12:          5    XT-PIC      i8042
>  15:          0    XT-PIC      eth0     <--- note that the counter is zero
> PMI:          0           Performance Monitoring
> ERR:          0
>
> # lspci -vv
> 00:06.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 01)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255
>         Interrupt: pin A routed to IRQ 11
>         Region 0: I/O ports at 8000 [size=256]
>         Region 1: Memory at 01300000 (32-bit, non-prefetchable) [size=256]
>         Kernel driver in use: sym53c8xx
>         Kernel modules: sym53c8xx
>
> 00:07.0 ISA bridge: Intel Corporation 82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge (rev 43)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 0
>
> 00:0b.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
>         Subsystem: Digital Equipment Corporation DECchip 21140 [FasterNet]
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255 (5000ns min, 10000ns max), Cache Line Size: 64 bytes
>         Interrupt: pin A routed to IRQ 15
>         Region 0: I/O ports at 8400 [size=128]
>         Region 1: Memory at 01302000 (32-bit, non-prefetchable) [size=128]
>         Expansion ROM at 01280000 [disabled] [size=256K]
>         Kernel driver in use: tulip
>         Kernel modules: tulip
>
> 00:0c.0 Display controller: Digital Equipment Corporation DECchip 21030 [TGA] (rev 02)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255
>         Interrupt: pin A routed to IRQ 5
>         Region 0: Memory at 02000000 (32-bit, prefetchable) [size=32M]
>         Expansion ROM at 012c0000 [disabled] [size=256K]
>         Kernel driver in use: tgafb
>
> 00:0d.0 RAID bus controller: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)
>         Subsystem: Silicon Image, Inc. Winic W-680 (Silicon Image 680 based)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 240, Cache Line Size: 4 bytes
>         Interrupt: pin A routed to IRQ 10
>         Region 0: I/O ports at 8490 [size=8]
>         Region 1: I/O ports at 84a0 [size=4]
>         Region 2: I/O ports at 8498 [size=8]
>         Region 3: I/O ports at 84a4 [size=4]
>         Region 4: I/O ports at 8480 [size=16]
>         Region 5: Memory at 01301000 (32-bit, non-prefetchable) [size=256]
>         Expansion ROM at 01200000 [disabled] [size=512K]
>         Capabilities: [60] Power Management version 2
>                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
>         Kernel driver in use: SiI_IDE
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
  2018-01-02 21:50 ` Bjorn Helgaas
@ 2018-01-02 21:54 ` Meelis Roos
  2018-01-03 10:38   ` Lorenzo Pieralisi
  2018-01-03 19:05   ` Mikulas Patocka
  2018-01-03 14:55 ` Lorenzo Pieralisi
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 21+ messages in thread
From: Meelis Roos @ 2018-01-02 21:54 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Lorenzo Pieralisi, Bjorn Helgaas, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

> The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> networking on Alpha for me. I have an Alpha Avanti server with tulip 
> network card.

Matbe the map is wrong for Avanti? Is there some way to check that?
> 
> The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> completes, but the network card doesn't receive any interrupts (and soon 
> it reports warning about timeout on tx queue). All kernels in the 4.14 
> branch have this bug.

Does some other IRQ icrease instead?

> Mikulas
> 
> 
> # cat /proc/interrupts
>            CPU0
>   1:          3    XT-PIC      i8042
>   2:          0    XT-PIC      cascade
>   4:        752    XT-PIC      ttyS0
>   8:      58118     dummy    -RTC       timer
>  10:       1613    XT-PIC      ide0, ide1
>  11:        739    XT-PIC      sym53c8xx
>  12:          5    XT-PIC      i8042
>  15:          0    XT-PIC      eth0	<--- note that the counter is zero
> PMI:          0           Performance Monitoring
> ERR:          0
> 
> # lspci -vv
> 00:06.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 01)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255
>         Interrupt: pin A routed to IRQ 11
>         Region 0: I/O ports at 8000 [size=256]
>         Region 1: Memory at 01300000 (32-bit, non-prefetchable) [size=256]
>         Kernel driver in use: sym53c8xx
>         Kernel modules: sym53c8xx
> 
> 00:07.0 ISA bridge: Intel Corporation 82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge (rev 43)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 0
> 
> 00:0b.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
>         Subsystem: Digital Equipment Corporation DECchip 21140 [FasterNet]
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255 (5000ns min, 10000ns max), Cache Line Size: 64 bytes
>         Interrupt: pin A routed to IRQ 15
>         Region 0: I/O ports at 8400 [size=128]
>         Region 1: Memory at 01302000 (32-bit, non-prefetchable) [size=128]
>         Expansion ROM at 01280000 [disabled] [size=256K]
>         Kernel driver in use: tulip
>         Kernel modules: tulip
> 
> 00:0c.0 Display controller: Digital Equipment Corporation DECchip 21030 [TGA] (rev 02)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 255
>         Interrupt: pin A routed to IRQ 5
>         Region 0: Memory at 02000000 (32-bit, prefetchable) [size=32M]
>         Expansion ROM at 012c0000 [disabled] [size=256K]
>         Kernel driver in use: tgafb
> 
> 00:0d.0 RAID bus controller: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)
>         Subsystem: Silicon Image, Inc. Winic W-680 (Silicon Image 680 based)
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 240, Cache Line Size: 4 bytes
>         Interrupt: pin A routed to IRQ 10
>         Region 0: I/O ports at 8490 [size=8]
>         Region 1: I/O ports at 84a0 [size=4]
>         Region 2: I/O ports at 8498 [size=8]
>         Region 3: I/O ports at 84a4 [size=4]
>         Region 4: I/O ports at 8480 [size=16]
>         Region 5: Memory at 01301000 (32-bit, non-prefetchable) [size=256]
>         Expansion ROM at 01200000 [disabled] [size=512K]
>         Capabilities: [60] Power Management version 2
>                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
>                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
>         Kernel driver in use: SiI_IDE
> 

-- 
Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:54 ` Meelis Roos
@ 2018-01-03 10:38   ` Lorenzo Pieralisi
  2018-01-03 19:05     ` Mikulas Patocka
  2018-01-03 19:05   ` Mikulas Patocka
  1 sibling, 1 reply; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-03 10:38 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Mikulas Patocka, Bjorn Helgaas, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

On Tue, Jan 02, 2018 at 11:54:47PM +0200, Meelis Roos wrote:
> > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > network card.
> 
> Matbe the map is wrong for Avanti? Is there some way to check that?

I think the problem is in noname_init_pci(), that, AFAICS, in order to set-up
the IRQ level, it requires IRQ mapping to be carried out. Joy.

See:

sio_fixup_irq_levels()

and in particular

sio_collect_irq_levels()

Does this horrid hack help (to understand where the problem is - how to
fix it that's another story) ? Compile tested only.

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..ca090307ff54 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -120,7 +120,7 @@ sio_collect_irq_levels(void)
 	return level_bits;
 }
 
-static void __init
+static void
 sio_fixup_irq_levels(unsigned int level_bits)
 {
 	unsigned int old_level_bits;
@@ -181,6 +181,14 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
 	int irq = COMMON_TABLE_LOOKUP, tmp;
 	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
+
+	if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
+		    (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA)) {
+
+		if (irq >= 0)
+			sio_fixup_irq_levels(1 << tmp);
+	}
+
 	return irq >= 0 ? tmp : -1;
 }
 

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
  2018-01-02 21:50 ` Bjorn Helgaas
  2018-01-02 21:54 ` Meelis Roos
@ 2018-01-03 14:55 ` Lorenzo Pieralisi
  2018-01-03 19:03   ` Mikulas Patocka
  2018-01-03 19:50   ` Meelis Roos
  2018-01-04 12:17 ` Lorenzo Pieralisi
  2018-01-05 11:23 ` Lorenzo Pieralisi
  4 siblings, 2 replies; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-03 14:55 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> Hi
> 
> The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> networking on Alpha for me. I have an Alpha Avanti server with tulip 
> network card.
> 
> The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> completes, but the network card doesn't receive any interrupts (and soon 
> it reports warning about timeout on tx queue). All kernels in the 4.14 
> branch have this bug.

Can you check if this patch fixes the issue please ?

I suspect we ought to map IRQs early in this platform so that we are
able to detect how platform code should set them up.

Thanks,
Lorenzo

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..407ab603e9b1 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -114,6 +114,8 @@ sio_collect_irq_levels(void)
 		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
 			continue;
 
+		pci_assign_irq(dev);
+
 		if (dev->irq)
 			level_bits |= (1 << dev->irq);
 	}

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 14:55 ` Lorenzo Pieralisi
@ 2018-01-03 19:03   ` Mikulas Patocka
  2018-01-04 10:58     ` Lorenzo Pieralisi
  2018-01-03 19:50   ` Meelis Roos
  1 sibling, 1 reply; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-03 19:03 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha



On Wed, 3 Jan 2018, Lorenzo Pieralisi wrote:

> On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > Hi
> > 
> > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > network card.
> > 
> > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > completes, but the network card doesn't receive any interrupts (and soon 
> > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > branch have this bug.
> 
> Can you check if this patch fixes the issue please ?
> 
> I suspect we ought to map IRQs early in this platform so that we are
> able to detect how platform code should set them up.
> 
> Thanks,
> Lorenzo
> 
> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..407ab603e9b1 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -114,6 +114,8 @@ sio_collect_irq_levels(void)
>  		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
>  			continue;
>  
> +		pci_assign_irq(dev);
> +
>  		if (dev->irq)
>  			level_bits |= (1 << dev->irq);
>  	}

This patch fixes the bug.

Mikulas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 10:38   ` Lorenzo Pieralisi
@ 2018-01-03 19:05     ` Mikulas Patocka
  2018-01-04 10:46       ` Lorenzo Pieralisi
  0 siblings, 1 reply; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-03 19:05 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Meelis Roos, Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, linux-alpha



On Wed, 3 Jan 2018, Lorenzo Pieralisi wrote:

> On Tue, Jan 02, 2018 at 11:54:47PM +0200, Meelis Roos wrote:
> > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > network card.
> > 
> > Matbe the map is wrong for Avanti? Is there some way to check that?
> 
> I think the problem is in noname_init_pci(), that, AFAICS, in order to set-up
> the IRQ level, it requires IRQ mapping to be carried out. Joy.
> 
> See:
> 
> sio_fixup_irq_levels()
> 
> and in particular
> 
> sio_collect_irq_levels()
> 
> Does this horrid hack help (to understand where the problem is - how to
> fix it that's another story) ? Compile tested only.
> 
> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..ca090307ff54 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -120,7 +120,7 @@ sio_collect_irq_levels(void)
>  	return level_bits;
>  }
>  
> -static void __init
> +static void
>  sio_fixup_irq_levels(unsigned int level_bits)
>  {
>  	unsigned int old_level_bits;
> @@ -181,6 +181,14 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
>  	int irq = COMMON_TABLE_LOOKUP, tmp;
>  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> +
> +	if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
> +		    (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA)) {
> +
> +		if (irq >= 0)
> +			sio_fixup_irq_levels(1 << tmp);
> +	}
> +
>  	return irq >= 0 ? tmp : -1;
>  }
>  

This patch breaks it even more - so that the IDE controller doesn't 
receive any interrupts. I can't tell if the netowrk card receives 
interrupts or not, because it doesn't mount the root filesystem.

Mikulas

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:54 ` Meelis Roos
  2018-01-03 10:38   ` Lorenzo Pieralisi
@ 2018-01-03 19:05   ` Mikulas Patocka
  1 sibling, 0 replies; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-03 19:05 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Lorenzo Pieralisi, Bjorn Helgaas, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha



On Tue, 2 Jan 2018, Meelis Roos wrote:

> > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > network card.
> 
> Matbe the map is wrong for Avanti? Is there some way to check that?
> > 
> > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > completes, but the network card doesn't receive any interrupts (and soon 
> > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > branch have this bug.
> 
> Does some other IRQ icrease instead?

I doesn't seem to increase any other counter when I send a network packet.

Mikulas

> > Mikulas
> > 
> > 
> > # cat /proc/interrupts
> >            CPU0
> >   1:          3    XT-PIC      i8042
> >   2:          0    XT-PIC      cascade
> >   4:        752    XT-PIC      ttyS0
> >   8:      58118     dummy    -RTC       timer
> >  10:       1613    XT-PIC      ide0, ide1
> >  11:        739    XT-PIC      sym53c8xx
> >  12:          5    XT-PIC      i8042
> >  15:          0    XT-PIC      eth0	<--- note that the counter is zero
> > PMI:          0           Performance Monitoring
> > ERR:          0
> > 
> > # lspci -vv
> > 00:06.0 SCSI storage controller: LSI Logic / Symbios Logic 53c810 (rev 01)
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
> >         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 255
> >         Interrupt: pin A routed to IRQ 11
> >         Region 0: I/O ports at 8000 [size=256]
> >         Region 1: Memory at 01300000 (32-bit, non-prefetchable) [size=256]
> >         Kernel driver in use: sym53c8xx
> >         Kernel modules: sym53c8xx
> > 
> > 00:07.0 ISA bridge: Intel Corporation 82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge (rev 43)
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
> >         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 0
> > 
> > 00:0b.0 Ethernet controller: Digital Equipment Corporation DECchip 21140 [FasterNet] (rev 22)
> >         Subsystem: Digital Equipment Corporation DECchip 21140 [FasterNet]
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
> >         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 255 (5000ns min, 10000ns max), Cache Line Size: 64 bytes
> >         Interrupt: pin A routed to IRQ 15
> >         Region 0: I/O ports at 8400 [size=128]
> >         Region 1: Memory at 01302000 (32-bit, non-prefetchable) [size=128]
> >         Expansion ROM at 01280000 [disabled] [size=256K]
> >         Kernel driver in use: tulip
> >         Kernel modules: tulip
> > 
> > 00:0c.0 Display controller: Digital Equipment Corporation DECchip 21030 [TGA] (rev 02)
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B- DisINTx-
> >         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 255
> >         Interrupt: pin A routed to IRQ 5
> >         Region 0: Memory at 02000000 (32-bit, prefetchable) [size=32M]
> >         Expansion ROM at 012c0000 [disabled] [size=256K]
> >         Kernel driver in use: tgafb
> > 
> > 00:0d.0 RAID bus controller: Silicon Image, Inc. PCI0680 Ultra ATA-133 Host Controller (rev 02)
> >         Subsystem: Silicon Image, Inc. Winic W-680 (Silicon Image 680 based)
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B- DisINTx-
> >         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         Latency: 240, Cache Line Size: 4 bytes
> >         Interrupt: pin A routed to IRQ 10
> >         Region 0: I/O ports at 8490 [size=8]
> >         Region 1: I/O ports at 84a0 [size=4]
> >         Region 2: I/O ports at 8498 [size=8]
> >         Region 3: I/O ports at 84a4 [size=4]
> >         Region 4: I/O ports at 8480 [size=16]
> >         Region 5: Memory at 01301000 (32-bit, non-prefetchable) [size=256]
> >         Expansion ROM at 01200000 [disabled] [size=512K]
> >         Capabilities: [60] Power Management version 2
> >                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> >                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=2 PME-
> >         Kernel driver in use: SiI_IDE
> > 
> 
> -- 
> Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 14:55 ` Lorenzo Pieralisi
  2018-01-03 19:03   ` Mikulas Patocka
@ 2018-01-03 19:50   ` Meelis Roos
  2018-01-04 11:00     ` Lorenzo Pieralisi
  1 sibling, 1 reply; 21+ messages in thread
From: Meelis Roos @ 2018-01-03 19:50 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Mikulas Patocka, Bjorn Helgaas, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

> I suspect we ought to map IRQs early in this platform so that we are
> able to detect how platform code should set them up.

SIO is used in multiple alpha platforms - should this patch work on all 
of them?

> 
> Thanks,
> Lorenzo
> 
> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..407ab603e9b1 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -114,6 +114,8 @@ sio_collect_irq_levels(void)
>  		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
>  			continue;
>  
> +		pci_assign_irq(dev);
> +
>  		if (dev->irq)
>  			level_bits |= (1 << dev->irq);
>  	}
> 

-- 
Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 19:05     ` Mikulas Patocka
@ 2018-01-04 10:46       ` Lorenzo Pieralisi
  0 siblings, 0 replies; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-04 10:46 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Meelis Roos, Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky,
	Matt Turner, linux-alpha

On Wed, Jan 03, 2018 at 02:05:16PM -0500, Mikulas Patocka wrote:
> 
> 
> On Wed, 3 Jan 2018, Lorenzo Pieralisi wrote:
> 
> > On Tue, Jan 02, 2018 at 11:54:47PM +0200, Meelis Roos wrote:
> > > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > > network card.
> > > 
> > > Matbe the map is wrong for Avanti? Is there some way to check that?
> > 
> > I think the problem is in noname_init_pci(), that, AFAICS, in order to set-up
> > the IRQ level, it requires IRQ mapping to be carried out. Joy.
> > 
> > See:
> > 
> > sio_fixup_irq_levels()
> > 
> > and in particular
> > 
> > sio_collect_irq_levels()
> > 
> > Does this horrid hack help (to understand where the problem is - how to
> > fix it that's another story) ? Compile tested only.
> > 
> > -- >8 --
> > diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> > index 37bd6d9b8eb9..ca090307ff54 100644
> > --- a/arch/alpha/kernel/sys_sio.c
> > +++ b/arch/alpha/kernel/sys_sio.c
> > @@ -120,7 +120,7 @@ sio_collect_irq_levels(void)
> >  	return level_bits;
> >  }
> >  
> > -static void __init
> > +static void
> >  sio_fixup_irq_levels(unsigned int level_bits)
> >  {
> >  	unsigned int old_level_bits;
> > @@ -181,6 +181,14 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
> >  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
> >  	int irq = COMMON_TABLE_LOOKUP, tmp;
> >  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> > +
> > +	if ((dev->class >> 16 != PCI_BASE_CLASS_BRIDGE) ||
> > +		    (dev->class >> 8 == PCI_CLASS_BRIDGE_PCMCIA)) {
> > +
> > +		if (irq >= 0)
> > +			sio_fixup_irq_levels(1 << tmp);
> > +	}
> > +
> >  	return irq >= 0 ? tmp : -1;
> >  }
> >  
> 
> This patch breaks it even more - so that the IDE controller doesn't 
> receive any interrupts. I can't tell if the netowrk card receives 
> interrupts or not, because it doesn't mount the root filesystem.

Yes, I expected that after having a more thorough look, that's why
I posted another patch.

Thanks,
Lorenzo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 19:03   ` Mikulas Patocka
@ 2018-01-04 10:58     ` Lorenzo Pieralisi
  0 siblings, 0 replies; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-04 10:58 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Wed, Jan 03, 2018 at 02:03:11PM -0500, Mikulas Patocka wrote:
> 
> 
> On Wed, 3 Jan 2018, Lorenzo Pieralisi wrote:
> 
> > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > Hi
> > > 
> > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > network card.
> > > 
> > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > completes, but the network card doesn't receive any interrupts (and soon 
> > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > branch have this bug.
> > 
> > Can you check if this patch fixes the issue please ?
> > 
> > I suspect we ought to map IRQs early in this platform so that we are
> > able to detect how platform code should set them up.
> > 
> > Thanks,
> > Lorenzo
> > 
> > -- >8 --
> > diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> > index 37bd6d9b8eb9..407ab603e9b1 100644
> > --- a/arch/alpha/kernel/sys_sio.c
> > +++ b/arch/alpha/kernel/sys_sio.c
> > @@ -114,6 +114,8 @@ sio_collect_irq_levels(void)
> >  		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> >  			continue;
> >  
> > +		pci_assign_irq(dev);
> > +
> >  		if (dev->irq)
> >  			level_bits |= (1 << dev->irq);
> >  	}
> 
> This patch fixes the bug.

Ok, so it looks like my understanding was right. pci_assign_irq() is
not supposed to be used in arch code; I think I can rework

noname_map_irq()

to update the level_bits (ie sio_fixup_irq_levels()) just for the IRQ
that is being mapped but I need help testing it.

Thanks for the prompt testing.

Lorenzo

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-03 19:50   ` Meelis Roos
@ 2018-01-04 11:00     ` Lorenzo Pieralisi
  0 siblings, 0 replies; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-04 11:00 UTC (permalink / raw)
  To: Meelis Roos
  Cc: Mikulas Patocka, Bjorn Helgaas, Richard Henderson,
	Ivan Kokshaysky, Matt Turner, linux-alpha

On Wed, Jan 03, 2018 at 09:50:42PM +0200, Meelis Roos wrote:
> > I suspect we ought to map IRQs early in this platform so that we are
> > able to detect how platform code should set them up.
> 
> SIO is used in multiple alpha platforms - should this patch work on all 
> of them?

This patch does nothing but assigning the IRQ earlier, as I said
in another thread I will modify it to make it simpler and avoid
relying on pci_assign_irq() - it was just to understand if my
assumption was right.

Lorenzo

> > Thanks,
> > Lorenzo
> > 
> > -- >8 --
> > diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> > index 37bd6d9b8eb9..407ab603e9b1 100644
> > --- a/arch/alpha/kernel/sys_sio.c
> > +++ b/arch/alpha/kernel/sys_sio.c
> > @@ -114,6 +114,8 @@ sio_collect_irq_levels(void)
> >  		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> >  			continue;
> >  
> > +		pci_assign_irq(dev);
> > +
> >  		if (dev->irq)
> >  			level_bits |= (1 << dev->irq);
> >  	}
> > 
> 
> -- 
> Meelis Roos (mroos@ut.ee)      http://www.cs.ut.ee/~mroos/

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
                   ` (2 preceding siblings ...)
  2018-01-03 14:55 ` Lorenzo Pieralisi
@ 2018-01-04 12:17 ` Lorenzo Pieralisi
  2018-01-04 18:06   ` Mikulas Patocka
  2018-01-05 11:23 ` Lorenzo Pieralisi
  4 siblings, 1 reply; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-04 12:17 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> Hi
> 
> The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> networking on Alpha for me. I have an Alpha Avanti server with tulip 
> network card.
> 
> The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> completes, but the network card doesn't receive any interrupts (and soon 
> it reports warning about timeout on tx queue). All kernels in the 4.14 
> branch have this bug.

I have reworked the sio code so that now the IRQ level is set upon IRQ
mapping; patch below - it needs thorough testing since I can't test on
alpha and I do not have in-depth knowledge of alpha platform code.

Please let me know if it fixes the issues.

Thanks !

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..e91518b6010d 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -102,44 +102,48 @@ sio_pci_route(void)
 				   alpha_mv.sys.sio.route_tab);
 }
 
-static unsigned int __init
-sio_collect_irq_levels(void)
+static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
 {
-	unsigned int level_bits = 0;
-	struct pci_dev *dev = NULL;
+	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
+	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		return false;
 
-	/* Iterate through the devices, collecting IRQ levels.  */
-	for_each_pci_dev(dev) {
-		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
-		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
-			continue;
+	return true;
+}
 
-		if (dev->irq)
-			level_bits |= (1 << dev->irq);
-	}
-	return level_bits;
+static void sio_fixup_irq_level(unsigned int irq)
+{
+	unsigned int level_bits;
+
+	/*
+	 * Now, make PCI interrupt level sensitive.
+	 * Notice: these registers must be accessed byte-wise. inw()/outw()
+	 * don't work.
+	 */
+	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
+
+	level_bits |= (1 << irq);
+
+	outb((level_bits >> 0) & 0xff, 0x4d0);
+	outb((level_bits >> 8) & 0xff, 0x4d1);
 }
 
-static void __init
-sio_fixup_irq_levels(unsigned int level_bits)
+static void __init sio_reset_irq_levels(void)
 {
-	unsigned int old_level_bits;
+	unsigned int level_bits;
 
 	/*
-	 * Now, make all PCI interrupts level sensitive.  Notice:
-	 * these registers must be accessed byte-wise.  inw()/outw()
+	 * Notice: these registers must be accessed byte-wise. inw()/outw()
 	 * don't work.
 	 *
-	 * Make sure to turn off any level bits set for IRQs 9,10,11,15,
-	 *  so that the only bits getting set are for devices actually found.
+	 * Make sure to turn off any level bits set for IRQs 9,10,11,15.
 	 * Note that we do preserve the remainder of the bits, which we hope
-	 *  will be set correctly by ARC/SRM.
+	 * will be set correctly by ARC/SRM.
 	 *
-	 * Note: we at least preserve any level-set bits on AlphaBook1
 	 */
-	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
+	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
 
-	level_bits |= (old_level_bits & 0x71ff);
+	level_bits &= 0x71ff;
 
 	outb((level_bits >> 0) & 0xff, 0x4d0);
 	outb((level_bits >> 8) & 0xff, 0x4d1);
@@ -181,6 +185,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
 	int irq = COMMON_TABLE_LOOKUP, tmp;
 	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
+
+	/* Fixup IRQ level if an actual IRQ mapping is detected */
+	if (sio_pci_dev_irq_needs_level(dev) && irq > 0)
+		sio_fixup_irq_level(irq);
+
 	return irq >= 0 ? tmp : -1;
 }
 
@@ -208,7 +217,7 @@ noname_init_pci(void)
 {
 	common_init_pci();
 	sio_pci_route();
-	sio_fixup_irq_levels(sio_collect_irq_levels());
+	sio_reset_irq_levels();
 
 	if (pc873xx_probe() == -1) {
 		printk(KERN_ERR "Probing for PC873xx Super IO chip failed.\n");
@@ -271,8 +280,8 @@ alphabook1_init_pci(void)
                 }
 	}
 
-	/* Do not set *ANY* level triggers for AlphaBook1. */
-	sio_fixup_irq_levels(0);
+	/* Reset level triggers for AlphaBook1. */
+	sio_reset_irq_levels();
 
 	/* Make sure that register PR1 indicates 1Mb mem */
 	outb(0x0f, 0x3ce); orig = inb(0x3cf);   /* read PR5  */

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-04 12:17 ` Lorenzo Pieralisi
@ 2018-01-04 18:06   ` Mikulas Patocka
  2018-01-04 18:49     ` Lorenzo Pieralisi
  0 siblings, 1 reply; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-04 18:06 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha



On Thu, 4 Jan 2018, Lorenzo Pieralisi wrote:

> On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > Hi
> > 
> > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > network card.
> > 
> > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > completes, but the network card doesn't receive any interrupts (and soon 
> > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > branch have this bug.
> 
> I have reworked the sio code so that now the IRQ level is set upon IRQ
> mapping; patch below - it needs thorough testing since I can't test on
> alpha and I do not have in-depth knowledge of alpha platform code.
> 
> Please let me know if it fixes the issues.
> 
> Thanks !

The IDE controller doesn't receive any interrupts with this patch.

Mikulas

> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..e91518b6010d 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -102,44 +102,48 @@ sio_pci_route(void)
>  				   alpha_mv.sys.sio.route_tab);
>  }
>  
> -static unsigned int __init
> -sio_collect_irq_levels(void)
> +static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
>  {
> -	unsigned int level_bits = 0;
> -	struct pci_dev *dev = NULL;
> +	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> +	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		return false;
>  
> -	/* Iterate through the devices, collecting IRQ levels.  */
> -	for_each_pci_dev(dev) {
> -		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> -		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> -			continue;
> +	return true;
> +}
>  
> -		if (dev->irq)
> -			level_bits |= (1 << dev->irq);
> -	}
> -	return level_bits;
> +static void sio_fixup_irq_level(unsigned int irq)
> +{
> +	unsigned int level_bits;
> +
> +	/*
> +	 * Now, make PCI interrupt level sensitive.
> +	 * Notice: these registers must be accessed byte-wise. inw()/outw()
> +	 * don't work.
> +	 */
> +	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
> +
> +	level_bits |= (1 << irq);
> +
> +	outb((level_bits >> 0) & 0xff, 0x4d0);
> +	outb((level_bits >> 8) & 0xff, 0x4d1);
>  }
>  
> -static void __init
> -sio_fixup_irq_levels(unsigned int level_bits)
> +static void __init sio_reset_irq_levels(void)
>  {
> -	unsigned int old_level_bits;
> +	unsigned int level_bits;
>  
>  	/*
> -	 * Now, make all PCI interrupts level sensitive.  Notice:
> -	 * these registers must be accessed byte-wise.  inw()/outw()
> +	 * Notice: these registers must be accessed byte-wise. inw()/outw()
>  	 * don't work.
>  	 *
> -	 * Make sure to turn off any level bits set for IRQs 9,10,11,15,
> -	 *  so that the only bits getting set are for devices actually found.
> +	 * Make sure to turn off any level bits set for IRQs 9,10,11,15.
>  	 * Note that we do preserve the remainder of the bits, which we hope
> -	 *  will be set correctly by ARC/SRM.
> +	 * will be set correctly by ARC/SRM.
>  	 *
> -	 * Note: we at least preserve any level-set bits on AlphaBook1
>  	 */
> -	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
> +	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
>  
> -	level_bits |= (old_level_bits & 0x71ff);
> +	level_bits &= 0x71ff;
>  
>  	outb((level_bits >> 0) & 0xff, 0x4d0);
>  	outb((level_bits >> 8) & 0xff, 0x4d1);
> @@ -181,6 +185,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
>  	int irq = COMMON_TABLE_LOOKUP, tmp;
>  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> +
> +	/* Fixup IRQ level if an actual IRQ mapping is detected */
> +	if (sio_pci_dev_irq_needs_level(dev) && irq > 0)
> +		sio_fixup_irq_level(irq);
> +
>  	return irq >= 0 ? tmp : -1;
>  }
>  
> @@ -208,7 +217,7 @@ noname_init_pci(void)
>  {
>  	common_init_pci();
>  	sio_pci_route();
> -	sio_fixup_irq_levels(sio_collect_irq_levels());
> +	sio_reset_irq_levels();
>  
>  	if (pc873xx_probe() == -1) {
>  		printk(KERN_ERR "Probing for PC873xx Super IO chip failed.\n");
> @@ -271,8 +280,8 @@ alphabook1_init_pci(void)
>                  }
>  	}
>  
> -	/* Do not set *ANY* level triggers for AlphaBook1. */
> -	sio_fixup_irq_levels(0);
> +	/* Reset level triggers for AlphaBook1. */
> +	sio_reset_irq_levels();
>  
>  	/* Make sure that register PR1 indicates 1Mb mem */
>  	outb(0x0f, 0x3ce); orig = inb(0x3cf);   /* read PR5  */
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-04 18:06   ` Mikulas Patocka
@ 2018-01-04 18:49     ` Lorenzo Pieralisi
  0 siblings, 0 replies; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-04 18:49 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Thu, Jan 04, 2018 at 01:06:56PM -0500, Mikulas Patocka wrote:
> 
> 
> On Thu, 4 Jan 2018, Lorenzo Pieralisi wrote:
> 
> > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > Hi
> > > 
> > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > network card.
> > > 
> > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > completes, but the network card doesn't receive any interrupts (and soon 
> > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > branch have this bug.
> > 
> > I have reworked the sio code so that now the IRQ level is set upon IRQ
> > mapping; patch below - it needs thorough testing since I can't test on
> > alpha and I do not have in-depth knowledge of alpha platform code.
> > 
> > Please let me know if it fixes the issues.
> > 
> > Thanks !
> 
> The IDE controller doesn't receive any interrupts with this patch.

Ok - I think I see why, we are getting there, I will send you another
patch tomorrow.

Thanks,
Lorenzo

> Mikulas
> 
> > -- >8 --
> > diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> > index 37bd6d9b8eb9..e91518b6010d 100644
> > --- a/arch/alpha/kernel/sys_sio.c
> > +++ b/arch/alpha/kernel/sys_sio.c
> > @@ -102,44 +102,48 @@ sio_pci_route(void)
> >  				   alpha_mv.sys.sio.route_tab);
> >  }
> >  
> > -static unsigned int __init
> > -sio_collect_irq_levels(void)
> > +static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
> >  {
> > -	unsigned int level_bits = 0;
> > -	struct pci_dev *dev = NULL;
> > +	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> > +	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> > +		return false;
> >  
> > -	/* Iterate through the devices, collecting IRQ levels.  */
> > -	for_each_pci_dev(dev) {
> > -		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> > -		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> > -			continue;
> > +	return true;
> > +}
> >  
> > -		if (dev->irq)
> > -			level_bits |= (1 << dev->irq);
> > -	}
> > -	return level_bits;
> > +static void sio_fixup_irq_level(unsigned int irq)
> > +{
> > +	unsigned int level_bits;
> > +
> > +	/*
> > +	 * Now, make PCI interrupt level sensitive.
> > +	 * Notice: these registers must be accessed byte-wise. inw()/outw()
> > +	 * don't work.
> > +	 */
> > +	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
> > +
> > +	level_bits |= (1 << irq);
> > +
> > +	outb((level_bits >> 0) & 0xff, 0x4d0);
> > +	outb((level_bits >> 8) & 0xff, 0x4d1);
> >  }
> >  
> > -static void __init
> > -sio_fixup_irq_levels(unsigned int level_bits)
> > +static void __init sio_reset_irq_levels(void)
> >  {
> > -	unsigned int old_level_bits;
> > +	unsigned int level_bits;
> >  
> >  	/*
> > -	 * Now, make all PCI interrupts level sensitive.  Notice:
> > -	 * these registers must be accessed byte-wise.  inw()/outw()
> > +	 * Notice: these registers must be accessed byte-wise. inw()/outw()
> >  	 * don't work.
> >  	 *
> > -	 * Make sure to turn off any level bits set for IRQs 9,10,11,15,
> > -	 *  so that the only bits getting set are for devices actually found.
> > +	 * Make sure to turn off any level bits set for IRQs 9,10,11,15.
> >  	 * Note that we do preserve the remainder of the bits, which we hope
> > -	 *  will be set correctly by ARC/SRM.
> > +	 * will be set correctly by ARC/SRM.
> >  	 *
> > -	 * Note: we at least preserve any level-set bits on AlphaBook1
> >  	 */
> > -	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
> > +	level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
> >  
> > -	level_bits |= (old_level_bits & 0x71ff);
> > +	level_bits &= 0x71ff;
> >  
> >  	outb((level_bits >> 0) & 0xff, 0x4d0);
> >  	outb((level_bits >> 8) & 0xff, 0x4d1);
> > @@ -181,6 +185,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
> >  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
> >  	int irq = COMMON_TABLE_LOOKUP, tmp;
> >  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> > +
> > +	/* Fixup IRQ level if an actual IRQ mapping is detected */
> > +	if (sio_pci_dev_irq_needs_level(dev) && irq > 0)
> > +		sio_fixup_irq_level(irq);
> > +
> >  	return irq >= 0 ? tmp : -1;
> >  }
> >  
> > @@ -208,7 +217,7 @@ noname_init_pci(void)
> >  {
> >  	common_init_pci();
> >  	sio_pci_route();
> > -	sio_fixup_irq_levels(sio_collect_irq_levels());
> > +	sio_reset_irq_levels();
> >  
> >  	if (pc873xx_probe() == -1) {
> >  		printk(KERN_ERR "Probing for PC873xx Super IO chip failed.\n");
> > @@ -271,8 +280,8 @@ alphabook1_init_pci(void)
> >                  }
> >  	}
> >  
> > -	/* Do not set *ANY* level triggers for AlphaBook1. */
> > -	sio_fixup_irq_levels(0);
> > +	/* Reset level triggers for AlphaBook1. */
> > +	sio_reset_irq_levels();
> >  
> >  	/* Make sure that register PR1 indicates 1Mb mem */
> >  	outb(0x0f, 0x3ce); orig = inb(0x3cf);   /* read PR5  */
> > 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
                   ` (3 preceding siblings ...)
  2018-01-04 12:17 ` Lorenzo Pieralisi
@ 2018-01-05 11:23 ` Lorenzo Pieralisi
  2018-01-05 18:49   ` Mikulas Patocka
  4 siblings, 1 reply; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-05 11:23 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> Hi
> 
> The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> networking on Alpha for me. I have an Alpha Avanti server with tulip 
> network card.
> 
> The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> completes, but the network card doesn't receive any interrupts (and soon 
> it reports warning about timeout on tx queue). All kernels in the 4.14 
> branch have this bug.

I reworked the patch, please let me know if it does fix the issue.

Thanks,
Lorenzo

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..2602e4abf05d 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -102,6 +102,15 @@ sio_pci_route(void)
 				   alpha_mv.sys.sio.route_tab);
 }
 
+static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
+{
+	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
+	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		return false;
+
+	return true;
+}
+
 static unsigned int __init
 sio_collect_irq_levels(void)
 {
@@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
 
 	/* Iterate through the devices, collecting IRQ levels.  */
 	for_each_pci_dev(dev) {
-		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
-		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		if (!sio_pci_dev_irq_needs_level(dev))
 			continue;
 
 		if (dev->irq)
@@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
 	return level_bits;
 }
 
-static void __init
-sio_fixup_irq_levels(unsigned int level_bits)
+static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
 {
 	unsigned int old_level_bits;
 
@@ -139,12 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
 	 */
 	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
 
-	level_bits |= (old_level_bits & 0x71ff);
+	if (reset)
+		old_level_bits &= 0x71ff;
+
+	level_bits |= old_level_bits;
 
 	outb((level_bits >> 0) & 0xff, 0x4d0);
 	outb((level_bits >> 8) & 0xff, 0x4d1);
 }
 
+static inline void
+sio_fixup_irq_levels(unsigned int level_bits)
+{
+	__sio_fixup_irq_levels(level_bits, true);
+}
+
 static inline int
 noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
@@ -181,6 +197,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
 	int irq = COMMON_TABLE_LOOKUP, tmp;
 	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
+
+	/* Fixup IRQ level if an actual IRQ mapping is detected */
+	if (sio_pci_dev_irq_needs_level(dev) && irq > 0)
+		__sio_fixup_irq_levels(1 << irq, false);
+
 	return irq >= 0 ? tmp : -1;
 }
 

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-05 11:23 ` Lorenzo Pieralisi
@ 2018-01-05 18:49   ` Mikulas Patocka
  2018-01-08 10:18     ` Lorenzo Pieralisi
  0 siblings, 1 reply; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-05 18:49 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha



On Fri, 5 Jan 2018, Lorenzo Pieralisi wrote:

> On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > Hi
> > 
> > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > network card.
> > 
> > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > completes, but the network card doesn't receive any interrupts (and soon 
> > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > branch have this bug.
> 
> I reworked the patch, please let me know if it does fix the issue.
> 
> Thanks,
> Lorenzo

Networking doesn't work, other interrupts work.

With this patch, /proc/interrupts shows one interrupt for the network card 
(it used to be zero without this patch).

# cat /proc/interrupts 
           CPU0       
  1:          3    XT-PIC      i8042
  2:          0    XT-PIC      cascade
  4:        655    XT-PIC      ttyS0
  8:      15768     dummy    -RTC       timer
 10:       1559    XT-PIC      ide0, ide1
 11:        749    XT-PIC      sym53c8xx
 12:          5    XT-PIC      i8042
 15:          1    XT-PIC      eth0
PMI:          0           Performance Monitoring
ERR:          0

Mikulas

> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..2602e4abf05d 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -102,6 +102,15 @@ sio_pci_route(void)
>  				   alpha_mv.sys.sio.route_tab);
>  }
>  
> +static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
> +{
> +	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> +	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		return false;
> +
> +	return true;
> +}
> +
>  static unsigned int __init
>  sio_collect_irq_levels(void)
>  {
> @@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
>  
>  	/* Iterate through the devices, collecting IRQ levels.  */
>  	for_each_pci_dev(dev) {
> -		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> -		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		if (!sio_pci_dev_irq_needs_level(dev))
>  			continue;
>  
>  		if (dev->irq)
> @@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
>  	return level_bits;
>  }
>  
> -static void __init
> -sio_fixup_irq_levels(unsigned int level_bits)
> +static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
>  {
>  	unsigned int old_level_bits;
>  
> @@ -139,12 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
>  	 */
>  	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
>  
> -	level_bits |= (old_level_bits & 0x71ff);
> +	if (reset)
> +		old_level_bits &= 0x71ff;
> +
> +	level_bits |= old_level_bits;
>  
>  	outb((level_bits >> 0) & 0xff, 0x4d0);
>  	outb((level_bits >> 8) & 0xff, 0x4d1);
>  }
>  
> +static inline void
> +sio_fixup_irq_levels(unsigned int level_bits)
> +{
> +	__sio_fixup_irq_levels(level_bits, true);
> +}
> +
>  static inline int
>  noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  {
> @@ -181,6 +197,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
>  	int irq = COMMON_TABLE_LOOKUP, tmp;
>  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> +
> +	/* Fixup IRQ level if an actual IRQ mapping is detected */
> +	if (sio_pci_dev_irq_needs_level(dev) && irq > 0)
> +		__sio_fixup_irq_levels(1 << irq, false);
> +
>  	return irq >= 0 ? tmp : -1;
>  }
>  
> 

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-05 18:49   ` Mikulas Patocka
@ 2018-01-08 10:18     ` Lorenzo Pieralisi
  2018-01-08 18:35       ` Mikulas Patocka
  0 siblings, 1 reply; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-08 10:18 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Fri, Jan 05, 2018 at 01:49:58PM -0500, Mikulas Patocka wrote:
> 
> 
> On Fri, 5 Jan 2018, Lorenzo Pieralisi wrote:
> 
> > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > Hi
> > > 
> > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > network card.
> > > 
> > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > completes, but the network card doesn't receive any interrupts (and soon 
> > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > branch have this bug.
> > 
> > I reworked the patch, please let me know if it does fix the issue.
> > 
> > Thanks,
> > Lorenzo
> 
> Networking doesn't work, other interrupts work.
> 
> With this patch, /proc/interrupts shows one interrupt for the network card 
> (it used to be zero without this patch).

It is getting harder to understand what's going on, here's an
incremental patch with some logging, it would be ideal to add
a similar logging with a working kernel so that we can actually
compare the IRQ level registers programming, please test it
when you have time.

Patch here:

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..086f53a89dfc 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -102,6 +102,15 @@ sio_pci_route(void)
 				   alpha_mv.sys.sio.route_tab);
 }
 
+static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
+{
+	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
+	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		return false;
+
+	return true;
+}
+
 static unsigned int __init
 sio_collect_irq_levels(void)
 {
@@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
 
 	/* Iterate through the devices, collecting IRQ levels.  */
 	for_each_pci_dev(dev) {
-		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
-		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		if (!sio_pci_dev_irq_needs_level(dev))
 			continue;
 
 		if (dev->irq)
@@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
 	return level_bits;
 }
 
-static void __init
-sio_fixup_irq_levels(unsigned int level_bits)
+static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
 {
 	unsigned int old_level_bits;
 
@@ -139,10 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
 	 */
 	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
 
-	level_bits |= (old_level_bits & 0x71ff);
+	if (reset)
+		old_level_bits &= 0x71ff;
+
+	level_bits |= old_level_bits;
 
 	outb((level_bits >> 0) & 0xff, 0x4d0);
 	outb((level_bits >> 8) & 0xff, 0x4d1);
+
+	pr_info("%s: level bits %ux\n", __func__, level_bits);
+}
+
+static inline void
+sio_fixup_irq_levels(unsigned int level_bits)
+{
+	__sio_fixup_irq_levels(level_bits, true);
 }
 
 static inline int
@@ -181,6 +199,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
 	int irq = COMMON_TABLE_LOOKUP, tmp;
 	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
+
+	/* Fixup IRQ level if an actual IRQ mapping is detected */
+	if (sio_pci_dev_irq_needs_level(dev) && (irq >= 0 && tmp))
+		__sio_fixup_irq_levels(1 << tmp, false);
+
 	return irq >= 0 ? tmp : -1;
 }
 
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-08 10:18     ` Lorenzo Pieralisi
@ 2018-01-08 18:35       ` Mikulas Patocka
  2018-01-09 12:16         ` Lorenzo Pieralisi
  0 siblings, 1 reply; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-08 18:35 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4123 bytes --]



On Mon, 8 Jan 2018, Lorenzo Pieralisi wrote:

> On Fri, Jan 05, 2018 at 01:49:58PM -0500, Mikulas Patocka wrote:
> > 
> > 
> > On Fri, 5 Jan 2018, Lorenzo Pieralisi wrote:
> > 
> > > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > > Hi
> > > > 
> > > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > > network card.
> > > > 
> > > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > > completes, but the network card doesn't receive any interrupts (and soon 
> > > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > > branch have this bug.
> > > 
> > > I reworked the patch, please let me know if it does fix the issue.
> > > 
> > > Thanks,
> > > Lorenzo
> > 
> > Networking doesn't work, other interrupts work.
> > 
> > With this patch, /proc/interrupts shows one interrupt for the network card 
> > (it used to be zero without this patch).
> 
> It is getting harder to understand what's going on, here's an
> incremental patch with some logging, it would be ideal to add
> a similar logging with a working kernel so that we can actually
> compare the IRQ level registers programming, please test it
> when you have time.

This patch works. The patch contains some small changes in the function 
noname_map_irq compared to your previous patch and these changes make it 
work. If I revert these changes, networking doesn't work.

I'm attaching dmesg of working kernel (4.14.12 with this patch) and 
non-working kernel (4.14.12 with your previous patch with 'pr_info("%s: 
level bits' added).

Mikulas

> Patch here:
> 
> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..086f53a89dfc 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -102,6 +102,15 @@ sio_pci_route(void)
>  				   alpha_mv.sys.sio.route_tab);
>  }
>  
> +static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
> +{
> +	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> +	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		return false;
> +
> +	return true;
> +}
> +
>  static unsigned int __init
>  sio_collect_irq_levels(void)
>  {
> @@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
>  
>  	/* Iterate through the devices, collecting IRQ levels.  */
>  	for_each_pci_dev(dev) {
> -		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> -		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		if (!sio_pci_dev_irq_needs_level(dev))
>  			continue;
>  
>  		if (dev->irq)
> @@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
>  	return level_bits;
>  }
>  
> -static void __init
> -sio_fixup_irq_levels(unsigned int level_bits)
> +static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
>  {
>  	unsigned int old_level_bits;
>  
> @@ -139,10 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
>  	 */
>  	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
>  
> -	level_bits |= (old_level_bits & 0x71ff);
> +	if (reset)
> +		old_level_bits &= 0x71ff;
> +
> +	level_bits |= old_level_bits;
>  
>  	outb((level_bits >> 0) & 0xff, 0x4d0);
>  	outb((level_bits >> 8) & 0xff, 0x4d1);
> +
> +	pr_info("%s: level bits %ux\n", __func__, level_bits);
> +}
> +
> +static inline void
> +sio_fixup_irq_levels(unsigned int level_bits)
> +{
> +	__sio_fixup_irq_levels(level_bits, true);
>  }
>  
>  static inline int
> @@ -181,6 +199,11 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
>  	int irq = COMMON_TABLE_LOOKUP, tmp;
>  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> +
> +	/* Fixup IRQ level if an actual IRQ mapping is detected */
> +	if (sio_pci_dev_irq_needs_level(dev) && (irq >= 0 && tmp))
> +		__sio_fixup_irq_levels(1 << tmp, false);
> +
>  	return irq >= 0 ? tmp : -1;
>  }
>  
> -- 
> 2.15.0
> 

[-- Attachment #2: Type: TEXT/plain, Size: 14449 bytes --]

[    0.000000] Linux version 4.14.12 (mikulas@hydra) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #1 Mon Jan 8 18:05:20 CET 2018
[    0.000000] Booting on Avanti using machine vector Avanti from SRM
[    0.000000] Major Options: LEGACY_START VERBOSE_MCHECK MAGIC_SYSRQ 
[    0.000000] Command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] memcluster 0, usage 1, start        0, end      249
[    0.000000] memcluster 1, usage 0, start      249, end    81919
[    0.000000] memcluster 2, usage 1, start    81919, end    81920
[    0.000000] freeing pages 249:384
[    0.000000] freeing pages 1353:81919
[    0.000000] reserving pages 1353:1355
[    0.000000] 512K Bcache detected; load hit latency 17 cycles, load miss latency 113 cycles
[    0.000000] On node 0 totalpages: 81919
[    0.000000] free_area_init_node: node 0, pgdat fffffc0000849470, node_mem_map fffffc0000a96000
[    0.000000]   DMA zone: 560 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 81919 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 81359
[    0.000000] Kernel command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] PID hash table entries: 4096 (order: 2, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 524288 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 639488K/655352K available (3905K kernel code, 292K rwdata, 1160K rodata, 136K init, 2156K bss, 15864K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16
[    0.000000] HWRPB cycle frequency bogus.  Estimated 233361008 Hz
[    0.000000] Setting RTC_FREQ to 128 Hz (29)
[    0.000000] Console: colour dummy device 80x25
[    0.125000] console [ttyS0] enabled
[    0.132812] Calibrating delay loop... 462.16 BogoMIPS (lpj=1806336)
[    0.179687] pid_max: default: 32768 minimum: 301
[    0.187500] Mount-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.195312] Mountpoint-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.210937] devtmpfs: initialized
[    0.218750] random: get_random_u32 called from bucket_table_alloc+0x124/0x310 with crng_init=0
[    0.226562] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
[    0.234375] futex hash table entries: 256 (order: -1, 6144 bytes)
[    0.242187] NET: Registered protocol family 16
[    0.250000] PCI host bridge to bus 0000:00
[    0.250000] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.257812] pci_bus 0000:00: root bus resource [mem 0x00000000-0x3fffffff]
[    0.265625] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.273437] pci 0000:00:06.0: [1000:0001] type 00 class 0x000000
[    0.273437] pci 0000:00:06.0: reg 0x10: [io  0x10000-0x100ff]
[    0.273437] pci 0000:00:06.0: reg 0x14: [mem 0x82100100-0x821001ff]
[    0.273437] pci 0000:00:06.0: NCR 53c810 rev 1 PCI class overridden (0x000000 -> 0x010000)
[    0.281250] pci 0000:00:07.0: [8086:0484] type 00 class 0x000000
[    0.289062] pci 0000:00:0b.0: [1011:0009] type 00 class 0x020000
[    0.289062] pci 0000:00:0b.0: reg 0x10: [io  0x10100-0x1017f]
[    0.289062] pci 0000:00:0b.0: reg 0x14: [mem 0x82100200-0x8210027f]
[    0.289062] pci 0000:00:0b.0: reg 0x30: [mem 0x820c0000-0x820fffff pref]
[    0.289062] pci 0000:00:0c.0: [1011:0004] type 00 class 0x038000
[    0.289062] pci 0000:00:0c.0: reg 0x10: [mem 0x88000000-0x89ffffff pref]
[    0.289062] pci 0000:00:0c.0: reg 0x30: [mem 0x82080000-0x820bffff pref]
[    0.289062] pci 0000:00:0d.0: [1095:0680] type 00 class 0x010400
[    0.289062] pci 0000:00:0d.0: reg 0x10: [io  0x101c0-0x101c7]
[    0.289062] pci 0000:00:0d.0: reg 0x14: [io  0x101b0-0x101b3]
[    0.289062] pci 0000:00:0d.0: reg 0x18: [io  0x101a0-0x101a7]
[    0.289062] pci 0000:00:0d.0: reg 0x1c: [io  0x10190-0x10193]
[    0.289062] pci 0000:00:0d.0: reg 0x20: [io  0x10180-0x1018f]
[    0.289062] pci 0000:00:0d.0: reg 0x24: [mem 0x82100000-0x821000ff]
[    0.289062] pci 0000:00:0d.0: reg 0x30: [mem 0x82000000-0x8207ffff pref]
[    0.289062] pci 0000:00:0d.0: supports D1 D2
[    0.289062] pci: enabling save/restore of SRM state
[    0.296875] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.296875] pci 0000:00:0c.0: BAR 0: assigned [mem 0x02000000-0x03ffffff pref]
[    0.304687] pci 0000:00:0d.0: BAR 6: assigned [mem 0x01200000-0x0127ffff pref]
[    0.312500] pci 0000:00:0b.0: BAR 6: assigned [mem 0x01280000-0x012bffff pref]
[    0.320312] pci 0000:00:0c.0: BAR 6: assigned [mem 0x012c0000-0x012fffff pref]
[    0.328125] pci 0000:00:06.0: BAR 0: assigned [io  0x8000-0x80ff]
[    0.335937] pci 0000:00:06.0: BAR 1: assigned [mem 0x01300000-0x013000ff]
[    0.335937] pci 0000:00:0d.0: BAR 5: assigned [mem 0x01301000-0x013010ff]
[    0.343750] pci 0000:00:0b.0: BAR 0: assigned [io  0x8400-0x847f]
[    0.351562] pci 0000:00:0b.0: BAR 1: assigned [mem 0x01302000-0x0130207f]
[    0.359375] pci 0000:00:0d.0: BAR 4: assigned [io  0x8480-0x848f]
[    0.367187] pci 0000:00:0d.0: BAR 0: assigned [io  0x8490-0x8497]
[    0.375000] pci 0000:00:0d.0: BAR 2: assigned [io  0x8498-0x849f]
[    0.375000] pci 0000:00:0d.0: BAR 1: assigned [io  0x84a0-0x84a3]
[    0.382812] pci 0000:00:0d.0: BAR 3: assigned [io  0x84a4-0x84a7]
[    0.390625] pci_bus 0000:00: resource 4 [io  0x0000-0xffff]
[    0.390625] pci_bus 0000:00: resource 5 [mem 0x00000000-0x3fffffff]
[    0.390625] sio_pci_route: PIRQ original 0xb0a0905 new 0xb0a050f
[    0.398437] __sio_fixup_irq_levels: level bits 3616x
[    0.406250] Found PC87332 Super IO chip at 0x26e
[    0.406250] PC873xx enabling EPP v1.9
[    0.429687] vgaarb: loaded
[    0.484375] NET: Registered protocol family 2
[    0.492187] TCP established hash table entries: 8192 (order: 3, 65536 bytes)
[    0.500000] TCP bind hash table entries: 8192 (order: 3, 65536 bytes)
[    0.507812] TCP: Hash tables configured (established 8192 bind 8192)
[    0.515625] UDP hash table entries: 512 (order: 1, 16384 bytes)
[    0.523437] UDP-Lite hash table entries: 512 (order: 1, 16384 bytes)
[    0.531250] PCI: CLS 64 bytes, default 32
[    0.531250] Using epoch 2000 for rtc year 18
[    0.539062] platform rtc-alpha: rtc core: registered rtc-alpha as rtc0
[    0.554687] workingset: timestamp_bits=62 max_order=17 bucket_order=0
[    0.609375] random: fast init done
[    0.617187] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.625000] io scheduler noop registered
[    0.632812] io scheduler cfq registered (default)
[    0.640625] __sio_fixup_irq_levels: level bits 3616x
[    0.656250] Console: switching to colour frame buffer device 80x30
[    0.671875] tgafb: DC21030 [TGA] detected, rev=0x02
[    0.671875] tgafb: at PCI bus 0, device 12, function 0
[    0.679687] fb0: Digital ZLXp-E1 frame buffer device at 0x2000000
[    0.687500] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.703125] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.718750] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    0.734375] Uniform Multi-Platform E-IDE driver
[    0.734375] __sio_fixup_irq_levels: level bits 3616x
[    0.742187] siimage 0000:00:0d.0: IDE controller (0x1095:0x0680 rev 0x02)
[    0.750000] siimage 0000:00:0d.0: BASE CLOCK == 133
[    0.757812] siimage 0000:00:0d.0: 100% native mode on irq 10
[    0.757812]     ide0: MMIO-DMA
[    0.765625]     ide1: MMIO-DMA
[    0.765625] Probing IDE interface ide0...
[    1.125000] hda: WDC WD400BB-00DEA0, ATA DISK drive
[    1.968750] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    1.968750] hda: UDMA/100 mode selected
[    1.968750] Probing IDE interface ide1...
[    2.679687] ide0 at 0xfffffc0301301080-0xfffffc0301301087,0xfffffc030130108a on irq 10
[    2.687500] ide1 at 0xfffffc03013010c0-0xfffffc03013010c7,0xfffffc03013010ca on irq 10
[    2.695312] ide-gd driver 1.18
[    2.695312] hda: max request size: 64KiB
[    2.757812] hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63
[    2.765625] hda: cache flushes not supported
[    2.773437]  hda: hda1 hda2
[    2.789062] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.796875] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.804687] mousedev: PS/2 mouse device common for all mice
[    2.812500] platform rtc-alpha: setting system clock to 2018-01-08 18:53:59 UTC (1515437639)
[    2.820312] atkbd serio0: keyboard reset failed on isa0060/serio0
[    2.875000] atkbd serio1: keyboard reset failed on isa0060/serio1
[    3.171875] VFS: Mounted root (spadfs filesystem) readonly on device 3:1.
[    3.179687] devtmpfs: mounted
[    3.187500] Freeing unused kernel memory: 136K
[    3.187500] This architecture does not have kernel memory protection.
[    5.132812] NET: Registered protocol family 1
[   10.789062] tulip: Linux Tulip driver version 1.1.15-NAPI (Feb 27, 2007)
[   10.796875] __sio_fixup_irq_levels: level bits 36384x
[   10.812500] tulip0: EEPROM default media type Autosense
[   10.820312] tulip0: Index #0 - Media MII (#11) described by a 21140 MII PHY (1) block
[   10.828125] tulip0:  MII transceiver #5 config 2100 status 780f advertising 01e1
[   10.851562] net eth0: Digital DS21140 Tulip rev 34 at MMIO 0x1302000, 00:00:f8:10:0b:42, IRQ 15
[   10.882812] input: PC Speaker as /devices/platform/pcspkr/input/input2
[   10.968750] SCSI subsystem initialized
[   11.023437] random: crng init done
[   11.375000] __sio_fixup_irq_levels: level bits 36384x
[   11.382812] sym0: <810> rev 0x1 at pci 0000:00:06.0 irq 11
[   11.562500] sym0: No NVRAM, ID 7, Fast-10, SE, parity checking
[   11.570312] sym0: SCSI BUS has been reset.
[   11.578125] scsi host0: sym-2.2.3
[   13.890625] hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
[   13.898437] hda: task_no_data_intr: error=0x04 { DriveStatusError }
[   13.906250] hda: possibly failed opcode: 0xef
[   15.015625] scsi 0:0:0:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.023437] scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
[   15.031250] scsi target0:0:0: Beginning Domain Validation
[   15.078125] scsi target0:0:0: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.101562] scsi target0:0:0: Domain Validation skipping write tests
[   15.109375] scsi target0:0:0: Ending Domain Validation
[   15.156250] scsi 0:0:1:0: Direct-Access     SEAGATE  ST39216N         0005 PQ: 0 ANSI: 3
[   15.164062] scsi target0:0:1: tagged command queuing enabled, command queue depth 16.
[   15.171875] scsi target0:0:1: Beginning Domain Validation
[   15.359375] scsi target0:0:1: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.375000] scsi target0:0:1: Domain Validation skipping write tests
[   15.382812] scsi target0:0:1: Ending Domain Validation
[   15.429687] scsi 0:0:2:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.437500] scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
[   15.445312] scsi target0:0:2: Beginning Domain Validation
[   15.546875] scsi target0:0:2: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.578125] scsi target0:0:2: Domain Validation skipping write tests
[   15.585937] scsi target0:0:2: Ending Domain Validation
[   15.945312] scsi 0:0:4:0: CD-ROM            DEC      RRD45   (C) DEC  0436 PQ: 0 ANSI: 2
[   15.953125] scsi target0:0:4: Beginning Domain Validation
[   15.976562] scsi target0:0:4: FAST-5 SCSI 4.2 MB/s ST (236 ns, offset 8)
[   16.000000] scsi target0:0:4: Domain Validation skipping write tests
[   16.007812] scsi target0:0:4: Ending Domain Validation
[   16.867187] scsi 0:0:0:0: Attached scsi generic sg0 type 0
[   16.914062] scsi 0:0:1:0: Attached scsi generic sg1 type 0
[   16.929687] scsi 0:0:2:0: Attached scsi generic sg2 type 0
[   16.960937] scsi 0:0:4:0: Attached scsi generic sg3 type 5
[   17.109375] sr 0:0:4:0: [sr0] scsi-1 drive
[   17.117187] cdrom: Uniform CD-ROM driver Revision: 3.20
[   17.125000] sd 0:0:1:0: [sdb] 17942584 512-byte logical blocks: (9.19 GB/8.56 GiB)
[   17.140625] sd 0:0:2:0: [sdc] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.171875] sd 0:0:1:0: [sdb] Write Protect is off
[   17.179687] sd 0:0:1:0: [sdb] Mode Sense: 9f 00 10 08
[   17.179687] sd 0:0:2:0: [sdc] Write Protect is off
[   17.187500] sd 0:0:2:0: [sdc] Mode Sense: 7b 00 10 08
[   17.187500] sr 0:0:4:0: Attached scsi CD-ROM sr0
[   17.195312] sd 0:0:0:0: [sda] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.218750] sd 0:0:0:0: [sda] Write Protect is off
[   17.218750] sd 0:0:0:0: [sda] Mode Sense: 7b 00 10 08
[   17.218750] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   17.226562] sd 0:0:2:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.242187] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.375000] sd 0:0:1:0: [sdb] Attached SCSI disk
[   17.390625]  sdc: sdc1 sdc2
[   17.414062]  sda: sda1 sda2 sda3
[   17.460937] sd 0:0:2:0: [sdc] Attached SCSI disk
[   17.460937] sd 0:0:0:0: [sda] Attached SCSI disk
[   17.757812] NET: Registered protocol family 17
[   19.453125] sd 0:0:2:0: phase change 2-7 16@65b34360 resid=10.
[   19.468750] sd 0:0:0:0: phase change 2-7 16@65b34360 resid=10.
[   19.484375] sd 0:0:2:0: phase change 2-7 16@658d6360 resid=10.
[   19.492187] sd 0:0:0:0: phase change 2-7 16@65b34360 resid=10.
[   23.187500] tulip 0000:00:0b.0 eth0: tulip_stop_rxtx() failed (CSR5 0xfc660000 CSR6 0x320e2202)
[   23.187500] net eth0: Setting full-duplex based on MII#5 link partner capability of 85e1
[   38.632812] Adding 4177912k swap on /swap.  Priority:-2 extents:1 across:4177912k 
[   41.210937] Adding 4177912k swap on /swap2.  Priority:-3 extents:1 across:4177912k 
[   44.226562] loop: module loaded
[   64.937500] NET: Registered protocol family 10
[   65.039062] Segment Routing with IPv6

[-- Attachment #3: Type: TEXT/plain, Size: 16822 bytes --]

[    0.000000] Linux version 4.14.12 (mikulas@hydra) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #2 Mon Jan 8 19:04:29 CET 2018
[    0.000000] Booting on Avanti using machine vector Avanti from SRM
[    0.000000] Major Options: LEGACY_START VERBOSE_MCHECK MAGIC_SYSRQ 
[    0.000000] Command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] memcluster 0, usage 1, start        0, end      249
[    0.000000] memcluster 1, usage 0, start      249, end    81919
[    0.000000] memcluster 2, usage 1, start    81919, end    81920
[    0.000000] freeing pages 249:384
[    0.000000] freeing pages 1353:81919
[    0.000000] reserving pages 1353:1355
[    0.000000] 512K Bcache detected; load hit latency 17 cycles, load miss latency 113 cycles
[    0.000000] On node 0 totalpages: 81919
[    0.000000] free_area_init_node: node 0, pgdat fffffc0000849470, node_mem_map fffffc0000a96000
[    0.000000]   DMA zone: 560 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 81919 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 81359
[    0.000000] Kernel command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] PID hash table entries: 4096 (order: 2, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 524288 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 639488K/655352K available (3905K kernel code, 292K rwdata, 1160K rodata, 136K init, 2156K bss, 15864K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16
[    0.000000] HWRPB cycle frequency bogus.  Estimated 233364831 Hz
[    0.000000] Setting RTC_FREQ to 128 Hz (29)
[    0.000000] Console: colour dummy device 80x25
[    0.132812] console [ttyS0] enabled
[    0.132812] Calibrating delay loop... 462.16 BogoMIPS (lpj=1806336)
[    0.179687] pid_max: default: 32768 minimum: 301
[    0.187500] Mount-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.195312] Mountpoint-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.210937] devtmpfs: initialized
[    0.218750] random: get_random_u32 called from bucket_table_alloc+0x124/0x310 with crng_init=0
[    0.226562] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
[    0.234375] futex hash table entries: 256 (order: -1, 6144 bytes)
[    0.242187] NET: Registered protocol family 16
[    0.250000] PCI host bridge to bus 0000:00
[    0.250000] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.257812] pci_bus 0000:00: root bus resource [mem 0x00000000-0x3fffffff]
[    0.265625] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.273437] pci 0000:00:06.0: [1000:0001] type 00 class 0x000000
[    0.273437] pci 0000:00:06.0: reg 0x10: [io  0x10000-0x100ff]
[    0.273437] pci 0000:00:06.0: reg 0x14: [mem 0x82100100-0x821001ff]
[    0.273437] pci 0000:00:06.0: NCR 53c810 rev 1 PCI class overridden (0x000000 -> 0x010000)
[    0.281250] pci 0000:00:07.0: [8086:0484] type 00 class 0x000000
[    0.289062] pci 0000:00:0b.0: [1011:0009] type 00 class 0x020000
[    0.289062] pci 0000:00:0b.0: reg 0x10: [io  0x10100-0x1017f]
[    0.289062] pci 0000:00:0b.0: reg 0x14: [mem 0x82100200-0x8210027f]
[    0.289062] pci 0000:00:0b.0: reg 0x30: [mem 0x820c0000-0x820fffff pref]
[    0.289062] pci 0000:00:0c.0: [1011:0004] type 00 class 0x038000
[    0.289062] pci 0000:00:0c.0: reg 0x10: [mem 0x88000000-0x89ffffff pref]
[    0.289062] pci 0000:00:0c.0: reg 0x30: [mem 0x82080000-0x820bffff pref]
[    0.289062] pci 0000:00:0d.0: [1095:0680] type 00 class 0x010400
[    0.289062] pci 0000:00:0d.0: reg 0x10: [io  0x101c0-0x101c7]
[    0.289062] pci 0000:00:0d.0: reg 0x14: [io  0x101b0-0x101b3]
[    0.289062] pci 0000:00:0d.0: reg 0x18: [io  0x101a0-0x101a7]
[    0.289062] pci 0000:00:0d.0: reg 0x1c: [io  0x10190-0x10193]
[    0.289062] pci 0000:00:0d.0: reg 0x20: [io  0x10180-0x1018f]
[    0.289062] pci 0000:00:0d.0: reg 0x24: [mem 0x82100000-0x821000ff]
[    0.289062] pci 0000:00:0d.0: reg 0x30: [mem 0x82000000-0x8207ffff pref]
[    0.289062] pci 0000:00:0d.0: supports D1 D2
[    0.289062] pci: enabling save/restore of SRM state
[    0.296875] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.296875] pci 0000:00:0c.0: BAR 0: assigned [mem 0x02000000-0x03ffffff pref]
[    0.304687] pci 0000:00:0d.0: BAR 6: assigned [mem 0x01200000-0x0127ffff pref]
[    0.312500] pci 0000:00:0b.0: BAR 6: assigned [mem 0x01280000-0x012bffff pref]
[    0.320312] pci 0000:00:0c.0: BAR 6: assigned [mem 0x012c0000-0x012fffff pref]
[    0.328125] pci 0000:00:06.0: BAR 0: assigned [io  0x8000-0x80ff]
[    0.335937] pci 0000:00:06.0: BAR 1: assigned [mem 0x01300000-0x013000ff]
[    0.335937] pci 0000:00:0d.0: BAR 5: assigned [mem 0x01301000-0x013010ff]
[    0.343750] pci 0000:00:0b.0: BAR 0: assigned [io  0x8400-0x847f]
[    0.351562] pci 0000:00:0b.0: BAR 1: assigned [mem 0x01302000-0x0130207f]
[    0.359375] pci 0000:00:0d.0: BAR 4: assigned [io  0x8480-0x848f]
[    0.367187] pci 0000:00:0d.0: BAR 0: assigned [io  0x8490-0x8497]
[    0.375000] pci 0000:00:0d.0: BAR 2: assigned [io  0x8498-0x849f]
[    0.375000] pci 0000:00:0d.0: BAR 1: assigned [io  0x84a0-0x84a3]
[    0.382812] pci 0000:00:0d.0: BAR 3: assigned [io  0x84a4-0x84a7]
[    0.390625] pci_bus 0000:00: resource 4 [io  0x0000-0xffff]
[    0.390625] pci_bus 0000:00: resource 5 [mem 0x00000000-0x3fffffff]
[    0.390625] sio_pci_route: PIRQ original 0xb0a0905 new 0xb0a050f
[    0.398437] __sio_fixup_irq_levels: level bits 3624x
[    0.406250] Found PC87332 Super IO chip at 0x26e
[    0.406250] PC873xx enabling EPP v1.9
[    0.429687] vgaarb: loaded
[    0.484375] NET: Registered protocol family 2
[    0.500000] TCP established hash table entries: 8192 (order: 3, 65536 bytes)
[    0.507812] TCP bind hash table entries: 8192 (order: 3, 65536 bytes)
[    0.515625] TCP: Hash tables configured (established 8192 bind 8192)
[    0.523437] UDP hash table entries: 512 (order: 1, 16384 bytes)
[    0.523437] UDP-Lite hash table entries: 512 (order: 1, 16384 bytes)
[    0.531250] PCI: CLS 64 bytes, default 32
[    0.539062] Using epoch 2000 for rtc year 18
[    0.546875] platform rtc-alpha: rtc core: registered rtc-alpha as rtc0
[    0.554687] workingset: timestamp_bits=62 max_order=17 bucket_order=0
[    0.617187] random: fast init done
[    0.625000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.632812] io scheduler noop registered
[    0.632812] io scheduler cfq registered (default)
[    0.640625] __sio_fixup_irq_levels: level bits 3626x
[    0.664062] Console: switching to colour frame buffer device 80x30
[    0.671875] tgafb: DC21030 [TGA] detected, rev=0x02
[    0.679687] tgafb: at PCI bus 0, device 12, function 0
[    0.679687] fb0: Digital ZLXp-E1 frame buffer device at 0x2000000
[    0.687500] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.703125] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.718750] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    0.726562] Uniform Multi-Platform E-IDE driver
[    0.734375] __sio_fixup_irq_levels: level bits 3628x
[    0.734375] siimage 0000:00:0d.0: IDE controller (0x1095:0x0680 rev 0x02)
[    0.742187] siimage 0000:00:0d.0: BASE CLOCK == 133
[    0.750000] siimage 0000:00:0d.0: 100% native mode on irq 10
[    0.757812]     ide0: MMIO-DMA
[    0.757812]     ide1: MMIO-DMA
[    0.765625] Probing IDE interface ide0...
[    1.125000] hda: WDC WD400BB-00DEA0, ATA DISK drive
[    1.968750] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    1.968750] hda: UDMA/100 mode selected
[    1.968750] Probing IDE interface ide1...
[    2.679687] ide0 at 0xfffffc0301301080-0xfffffc0301301087,0xfffffc030130108a on irq 10
[    2.687500] ide1 at 0xfffffc03013010c0-0xfffffc03013010c7,0xfffffc03013010ca on irq 10
[    2.695312] ide-gd driver 1.18
[    2.695312] hda: max request size: 64KiB
[    2.757812] hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63
[    2.765625] hda: cache flushes not supported
[    2.773437]  hda: hda1 hda2
[    2.789062] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.796875] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.804687] mousedev: PS/2 mouse device common for all mice
[    2.820312] platform rtc-alpha: setting system clock to 2018-01-08 19:15:58 UTC (1515438958)
[    2.828125] atkbd serio0: keyboard reset failed on isa0060/serio0
[    2.882812] atkbd serio1: keyboard reset failed on isa0060/serio1
[    3.187500] VFS: Mounted root (spadfs filesystem) readonly on device 3:1.
[    3.195312] devtmpfs: mounted
[    3.195312] Freeing unused kernel memory: 136K
[    3.203125] This architecture does not have kernel memory protection.
[    5.148437] NET: Registered protocol family 1
[   10.796875] tulip: Linux Tulip driver version 1.1.15-NAPI (Feb 27, 2007)
[   10.812500] tulip0: EEPROM default media type Autosense
[   10.812500] tulip0: Index #0 - Media MII (#11) described by a 21140 MII PHY (1) block
[   10.828125] tulip0:  MII transceiver #5 config 2100 status 780f advertising 01e1
[   10.843750] net eth0: Digital DS21140 Tulip rev 34 at MMIO 0x1302000, 00:00:f8:10:0b:42, IRQ 15
[   10.882812] SCSI subsystem initialized
[   11.023437] random: crng init done
[   11.046875] input: PC Speaker as /devices/platform/pcspkr/input/input2
[   11.421875] __sio_fixup_irq_levels: level bits 3624x
[   11.429687] sym0: <810> rev 0x1 at pci 0000:00:06.0 irq 11
[   11.679687] sym0: No NVRAM, ID 7, Fast-10, SE, parity checking
[   11.687500] sym0: SCSI BUS has been reset.
[   11.695312] scsi host0: sym-2.2.3
[   13.835937] hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
[   13.843750] hda: task_no_data_intr: error=0x04 { DriveStatusError }
[   13.851562] hda: possibly failed opcode: 0xef
[   15.140625] scsi 0:0:0:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.148437] scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
[   15.156250] scsi target0:0:0: Beginning Domain Validation
[   15.210937] scsi target0:0:0: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.226562] scsi target0:0:0: Domain Validation skipping write tests
[   15.234375] scsi target0:0:0: Ending Domain Validation
[   15.296875] scsi 0:0:1:0: Direct-Access     SEAGATE  ST39216N         0005 PQ: 0 ANSI: 3
[   15.304687] scsi target0:0:1: tagged command queuing enabled, command queue depth 16.
[   15.312500] scsi target0:0:1: Beginning Domain Validation
[   15.406250] scsi target0:0:1: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.414062] scsi target0:0:1: Domain Validation skipping write tests
[   15.421875] scsi target0:0:1: Ending Domain Validation
[   15.460937] scsi 0:0:2:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.468750] scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
[   15.484375] scsi target0:0:2: Beginning Domain Validation
[   15.648437] scsi target0:0:2: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.671875] scsi target0:0:2: Domain Validation skipping write tests
[   15.679687] scsi target0:0:2: Ending Domain Validation
[   16.000000] scsi 0:0:4:0: CD-ROM            DEC      RRD45   (C) DEC  0436 PQ: 0 ANSI: 2
[   16.007812] scsi target0:0:4: Beginning Domain Validation
[   16.031250] scsi target0:0:4: FAST-5 SCSI 4.2 MB/s ST (236 ns, offset 8)
[   16.054687] scsi target0:0:4: Domain Validation skipping write tests
[   16.062500] scsi target0:0:4: Ending Domain Validation
[   16.921875] scsi 0:0:0:0: Attached scsi generic sg0 type 0
[   16.937500] scsi 0:0:1:0: Attached scsi generic sg1 type 0
[   16.937500] scsi 0:0:2:0: Attached scsi generic sg2 type 0
[   16.960937] scsi 0:0:4:0: Attached scsi generic sg3 type 5
[   17.007812] sd 0:0:0:0: [sda] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.015625] sd 0:0:1:0: [sdb] 17942584 512-byte logical blocks: (9.19 GB/8.56 GiB)
[   17.046875] sd 0:0:0:0: [sda] Write Protect is off
[   17.054687] sd 0:0:0:0: [sda] Mode Sense: 7b 00 10 08
[   17.054687] sd 0:0:1:0: [sdb] Write Protect is off
[   17.062500] sd 0:0:1:0: [sdb] Mode Sense: 9f 00 10 08
[   17.070312] sd 0:0:2:0: [sdc] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.101562] sd 0:0:2:0: [sdc] Write Protect is off
[   17.101562] sd 0:0:2:0: [sdc] Mode Sense: 7b 00 10 08
[   17.109375] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   17.117187] sd 0:0:2:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.132812] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.242187]  sda: sda1 sda2 sda3
[   17.289062] sd 0:0:1:0: [sdb] Attached SCSI disk
[   17.312500]  sdc: sdc1 sdc2
[   17.320312] sr 0:0:4:0: [sr0] scsi-1 drive
[   17.328125] cdrom: Uniform CD-ROM driver Revision: 3.20
[   17.351562] sd 0:0:0:0: [sda] Attached SCSI disk
[   17.398437] sr 0:0:4:0: Attached scsi CD-ROM sr0
[   17.445312] sd 0:0:2:0: [sdc] Attached SCSI disk
[   17.960937] NET: Registered protocol family 17
[   19.476562] sd 0:0:2:0: phase change 2-7 16@65b32360 resid=10.
[   19.492187] sd 0:0:0:0: phase change 2-7 16@65b32760 resid=10.
[   19.500000] sd 0:0:2:0: phase change 2-7 16@65b32360 resid=10.
[   19.507812] sd 0:0:0:0: phase change 2-7 16@65b32760 resid=10.
[   23.437500] net eth0: Setting full-duplex based on MII#5 link partner capability of 85e1
[   36.617187] Adding 4177912k swap on /swap.  Priority:-2 extents:1 across:4177912k 
[   39.171875] Adding 4177912k swap on /swap2.  Priority:-3 extents:1 across:4177912k 
[   41.437500] loop: module loaded
[   91.492187] NET: Registered protocol family 10
[   91.656250] Segment Routing with IPv6
[  388.500000] ------------[ cut here ]------------
[  388.500000] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:320 dev_watchdog+0x2bc/0x2d0
[  388.507812] NETDEV WATCHDOG: eth0 (tulip): transmit queue 0 timed out
[  388.515625] Modules linked in: ipv6 autofs4 ufs ext2 mbcache loop af_packet sr_mod cdrom sd_mod sg evdev sym53c8xx scsi_transport_spi psmouse pcspkr scsi_mod tulip unix
[  388.523437] CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.12 #2
[  388.531250]        fffffc000082bac0 0000000000000009 fffffc00003240f0 fffffc0000643cac
[  388.539062]        fffffc0000324174 0000000000000000 fffffc00271f6000 fffffc0000870b68
[  388.546875]        0000000000000200 0000000000000000 fffffc000082bc30 fffffc002700a500
[  388.554687]        fffffc0000643cac 0000000000000108 fffffc000075181d fffffc000082bb80
[  388.562500]        fffffc0000000018 fffffc00271c0000 fffffc000036f94c 0000000000000000
[  388.570312]        fffffc0000a78648 fffffc00271f6000 fffffffc003154ff 0000000000000000
[  388.578125] Trace:
[  388.578125] [<fffffc00003240f0>] __warn+0x150/0x180
[  388.578125] [<fffffc0000643cac>] dev_watchdog+0x2bc/0x2d0
[  388.585937] [<fffffc0000324174>] warn_slowpath_fmt+0x54/0x70
[  388.593750] [<fffffc0000643cac>] dev_watchdog+0x2bc/0x2d0
[  388.601562] [<fffffc000036f94c>] timekeeping_update+0x15c/0x220
[  388.609375] [<fffffc000036d9cc>] update_process_times+0x9c/0xc0
[  388.609375] [<fffffc000036c41c>] call_timer_fn.isra.29+0x2c/0xd0
[  388.617187] [<fffffc00006439f0>] dev_watchdog+0x0/0x2d0
[  388.625000] [<fffffc000036c6c4>] run_timer_softirq+0x204/0x460
[  388.632812] [<fffffc000037d19c>] tick_handle_periodic+0x2c/0xc0
[  388.632812] [<fffffc000031855c>] rtc_timer_interrupt+0x2c/0x70
[  388.640625] [<fffffc00003629e0>] __handle_irq_event_percpu+0xc0/0x1c0
[  388.648437] [<fffffc0000362b50>] handle_irq_event_percpu+0x70/0x90
[  388.656250] [<fffffc00003280ac>] irq_exit+0xbc/0xf0
[  388.664062] [<fffffc0000315edc>] handle_irq+0x8c/0xf0
[  388.664062] [<fffffc0000315fec>] do_entInt+0x5c/0x1e0
[  388.671875] [<fffffc0000311420>] ret_from_sys_call+0x0/0x10
[  388.679687] [<fffffc0000357238>] do_idle+0x88/0x1c0
[  388.679687] [<fffffc00006e0610>] cpu_idle_poll+0x0/0x50
[  388.687500] [<fffffc00006e0644>] cpu_idle_poll+0x34/0x50
[  388.695312] [<fffffc0000357678>] cpu_startup_entry+0x28/0x50
[  388.703125] [<fffffc00006d9f94>] rest_init+0xd4/0xf0
[  388.703125] [<fffffc000031001c>] _stext+0x1c/0x20

[  388.710937] ---[ end trace 791319d3e104caca ]---

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-08 18:35       ` Mikulas Patocka
@ 2018-01-09 12:16         ` Lorenzo Pieralisi
  2018-01-09 19:13           ` Mikulas Patocka
  0 siblings, 1 reply; 21+ messages in thread
From: Lorenzo Pieralisi @ 2018-01-09 12:16 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

On Mon, Jan 08, 2018 at 01:35:27PM -0500, Mikulas Patocka wrote:
> 
> 
> On Mon, 8 Jan 2018, Lorenzo Pieralisi wrote:
> 
> > On Fri, Jan 05, 2018 at 01:49:58PM -0500, Mikulas Patocka wrote:
> > > 
> > > 
> > > On Fri, 5 Jan 2018, Lorenzo Pieralisi wrote:
> > > 
> > > > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > > > Hi
> > > > > 
> > > > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > > > network card.
> > > > > 
> > > > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > > > completes, but the network card doesn't receive any interrupts (and soon 
> > > > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > > > branch have this bug.
> > > > 
> > > > I reworked the patch, please let me know if it does fix the issue.
> > > > 
> > > > Thanks,
> > > > Lorenzo
> > > 
> > > Networking doesn't work, other interrupts work.
> > > 
> > > With this patch, /proc/interrupts shows one interrupt for the network card 
> > > (it used to be zero without this patch).
> > 
> > It is getting harder to understand what's going on, here's an
> > incremental patch with some logging, it would be ideal to add
> > a similar logging with a working kernel so that we can actually
> > compare the IRQ level registers programming, please test it
> > when you have time.
> 
> This patch works. The patch contains some small changes in the function 
> noname_map_irq compared to your previous patch and these changes make it 
> work. If I revert these changes, networking doesn't work.

Yes - I am slowly understanding how this Alpha platform deals with IRQs,
thank you for your help and apologies for the drawn-out fix, I just
can't test on this platform.

Patch below (minus pr_info that I will remove) should be the final one,
please test it and provide me with logs so that I can check.

Thank you very much.

-- >8 --
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 37bd6d9b8eb9..754a890c8403 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -102,6 +102,15 @@ sio_pci_route(void)
 				   alpha_mv.sys.sio.route_tab);
 }
 
+static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
+{
+	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
+	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		return false;
+
+	return true;
+}
+
 static unsigned int __init
 sio_collect_irq_levels(void)
 {
@@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
 
 	/* Iterate through the devices, collecting IRQ levels.  */
 	for_each_pci_dev(dev) {
-		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
-		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
+		if (!sio_pci_dev_irq_needs_level(dev))
 			continue;
 
 		if (dev->irq)
@@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
 	return level_bits;
 }
 
-static void __init
-sio_fixup_irq_levels(unsigned int level_bits)
+static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
 {
 	unsigned int old_level_bits;
 
@@ -139,10 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
 	 */
 	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
 
-	level_bits |= (old_level_bits & 0x71ff);
+	if (reset)
+		old_level_bits &= 0x71ff;
+
+	level_bits |= old_level_bits;
 
 	outb((level_bits >> 0) & 0xff, 0x4d0);
 	outb((level_bits >> 8) & 0xff, 0x4d1);
+
+	pr_info("%s: level bits %x\n", __func__, level_bits);
+}
+
+static inline void
+sio_fixup_irq_levels(unsigned int level_bits)
+{
+	__sio_fixup_irq_levels(level_bits, true);
 }
 
 static inline int
@@ -181,7 +199,14 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
 	int irq = COMMON_TABLE_LOOKUP, tmp;
 	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
-	return irq >= 0 ? tmp : -1;
+
+	irq = irq >= 0 ? tmp : -1;
+
+	/* Fixup IRQ level if an actual IRQ mapping is detected */
+	if (sio_pci_dev_irq_needs_level(dev) && irq >= 0)
+		__sio_fixup_irq_levels(1 << irq, false);
+
+	return irq;
 }
 
 static inline int
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking
  2018-01-09 12:16         ` Lorenzo Pieralisi
@ 2018-01-09 19:13           ` Mikulas Patocka
  0 siblings, 0 replies; 21+ messages in thread
From: Mikulas Patocka @ 2018-01-09 19:13 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Bjorn Helgaas, Richard Henderson, Ivan Kokshaysky, Meelis Roos,
	Matt Turner, linux-alpha

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4679 bytes --]



On Tue, 9 Jan 2018, Lorenzo Pieralisi wrote:

> On Mon, Jan 08, 2018 at 01:35:27PM -0500, Mikulas Patocka wrote:
> > 
> > 
> > On Mon, 8 Jan 2018, Lorenzo Pieralisi wrote:
> > 
> > > On Fri, Jan 05, 2018 at 01:49:58PM -0500, Mikulas Patocka wrote:
> > > > 
> > > > 
> > > > On Fri, 5 Jan 2018, Lorenzo Pieralisi wrote:
> > > > 
> > > > > On Tue, Jan 02, 2018 at 04:32:45PM -0500, Mikulas Patocka wrote:
> > > > > > Hi
> > > > > > 
> > > > > > The patch 0e4c2eeb758a91e68b9eaf7a4bee9bd5ed97ff2b ("alpha/PCI: Replace 
> > > > > > pci_fixup_irqs() call with host bridge IRQ mapping hooks") breaks 
> > > > > > networking on Alpha for me. I have an Alpha Avanti server with tulip 
> > > > > > network card.
> > > > > > 
> > > > > > The patch 0e4c2eeb breaks it so that I get MCE when the network card 
> > > > > > driver is loaded. The patch 814eae59 fixes the MCE, the system boot 
> > > > > > completes, but the network card doesn't receive any interrupts (and soon 
> > > > > > it reports warning about timeout on tx queue). All kernels in the 4.14 
> > > > > > branch have this bug.
> > > > > 
> > > > > I reworked the patch, please let me know if it does fix the issue.
> > > > > 
> > > > > Thanks,
> > > > > Lorenzo
> > > > 
> > > > Networking doesn't work, other interrupts work.
> > > > 
> > > > With this patch, /proc/interrupts shows one interrupt for the network card 
> > > > (it used to be zero without this patch).
> > > 
> > > It is getting harder to understand what's going on, here's an
> > > incremental patch with some logging, it would be ideal to add
> > > a similar logging with a working kernel so that we can actually
> > > compare the IRQ level registers programming, please test it
> > > when you have time.
> > 
> > This patch works. The patch contains some small changes in the function 
> > noname_map_irq compared to your previous patch and these changes make it 
> > work. If I revert these changes, networking doesn't work.
> 
> Yes - I am slowly understanding how this Alpha platform deals with IRQs,
> thank you for your help and apologies for the drawn-out fix, I just
> can't test on this platform.
> 
> Patch below (minus pr_info that I will remove) should be the final one,
> please test it and provide me with logs so that I can check.
> 
> Thank you very much.

This patch works - dmesg output is attached.

Mikulas

> -- >8 --
> diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
> index 37bd6d9b8eb9..754a890c8403 100644
> --- a/arch/alpha/kernel/sys_sio.c
> +++ b/arch/alpha/kernel/sys_sio.c
> @@ -102,6 +102,15 @@ sio_pci_route(void)
>  				   alpha_mv.sys.sio.route_tab);
>  }
>  
> +static bool sio_pci_dev_irq_needs_level(const struct pci_dev *dev)
> +{
> +	if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> +	    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		return false;
> +
> +	return true;
> +}
> +
>  static unsigned int __init
>  sio_collect_irq_levels(void)
>  {
> @@ -110,8 +119,7 @@ sio_collect_irq_levels(void)
>  
>  	/* Iterate through the devices, collecting IRQ levels.  */
>  	for_each_pci_dev(dev) {
> -		if ((dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) &&
> -		    (dev->class >> 8 != PCI_CLASS_BRIDGE_PCMCIA))
> +		if (!sio_pci_dev_irq_needs_level(dev))
>  			continue;
>  
>  		if (dev->irq)
> @@ -120,8 +128,7 @@ sio_collect_irq_levels(void)
>  	return level_bits;
>  }
>  
> -static void __init
> -sio_fixup_irq_levels(unsigned int level_bits)
> +static void __sio_fixup_irq_levels(unsigned int level_bits, bool reset)
>  {
>  	unsigned int old_level_bits;
>  
> @@ -139,10 +146,21 @@ sio_fixup_irq_levels(unsigned int level_bits)
>  	 */
>  	old_level_bits = inb(0x4d0) | (inb(0x4d1) << 8);
>  
> -	level_bits |= (old_level_bits & 0x71ff);
> +	if (reset)
> +		old_level_bits &= 0x71ff;
> +
> +	level_bits |= old_level_bits;
>  
>  	outb((level_bits >> 0) & 0xff, 0x4d0);
>  	outb((level_bits >> 8) & 0xff, 0x4d1);
> +
> +	pr_info("%s: level bits %x\n", __func__, level_bits);
> +}
> +
> +static inline void
> +sio_fixup_irq_levels(unsigned int level_bits)
> +{
> +	__sio_fixup_irq_levels(level_bits, true);
>  }
>  
>  static inline int
> @@ -181,7 +199,14 @@ noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
>  	const long min_idsel = 6, max_idsel = 14, irqs_per_slot = 5;
>  	int irq = COMMON_TABLE_LOOKUP, tmp;
>  	tmp = __kernel_extbl(alpha_mv.sys.sio.route_tab, irq);
> -	return irq >= 0 ? tmp : -1;
> +
> +	irq = irq >= 0 ? tmp : -1;
> +
> +	/* Fixup IRQ level if an actual IRQ mapping is detected */
> +	if (sio_pci_dev_irq_needs_level(dev) && irq >= 0)
> +		__sio_fixup_irq_levels(1 << irq, false);
> +
> +	return irq;
>  }
>  
>  static inline int
> -- 
> 2.15.0
> 

[-- Attachment #2: Type: TEXT/plain, Size: 14439 bytes --]

[    0.000000] Linux version 4.14.12 (mikulas@hydra) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #4 Tue Jan 9 20:03:22 CET 2018
[    0.000000] Booting on Avanti using machine vector Avanti from SRM
[    0.000000] Major Options: LEGACY_START VERBOSE_MCHECK MAGIC_SYSRQ 
[    0.000000] Command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] memcluster 0, usage 1, start        0, end      249
[    0.000000] memcluster 1, usage 0, start      249, end    81919
[    0.000000] memcluster 2, usage 1, start    81919, end    81920
[    0.000000] freeing pages 249:384
[    0.000000] freeing pages 1353:81919
[    0.000000] reserving pages 1353:1355
[    0.000000] 512K Bcache detected; load hit latency 17 cycles, load miss latency 113 cycles
[    0.000000] On node 0 totalpages: 81919
[    0.000000] free_area_init_node: node 0, pgdat fffffc0000849470, node_mem_map fffffc0000a96000
[    0.000000]   DMA zone: 560 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 81919 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 81359
[    0.000000] Kernel command line: ro root=/dev/hda1 console=ttyS0,115200
[    0.000000] PID hash table entries: 4096 (order: 2, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 524288 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 639488K/655352K available (3905K kernel code, 292K rwdata, 1160K rodata, 136K init, 2156K bss, 15864K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 16
[    0.000000] HWRPB cycle frequency bogus.  Estimated 233363557 Hz
[    0.000000] Setting RTC_FREQ to 128 Hz (29)
[    0.000000] Console: colour dummy device 80x25
[    0.140625] console [ttyS0] enabled
[    0.140625] Calibrating delay loop... 462.16 BogoMIPS (lpj=1806336)
[    0.187500] pid_max: default: 32768 minimum: 301
[    0.195312] Mount-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.203125] Mountpoint-cache hash table entries: 2048 (order: 1, 16384 bytes)
[    0.218750] devtmpfs: initialized
[    0.226562] random: get_random_u32 called from bucket_table_alloc+0x124/0x310 with crng_init=0
[    0.234375] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 14931722236523437 ns
[    0.242187] futex hash table entries: 256 (order: -1, 6144 bytes)
[    0.250000] NET: Registered protocol family 16
[    0.257812] PCI host bridge to bus 0000:00
[    0.257812] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    0.265625] pci_bus 0000:00: root bus resource [mem 0x00000000-0x3fffffff]
[    0.273437] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.281250] pci 0000:00:06.0: [1000:0001] type 00 class 0x000000
[    0.281250] pci 0000:00:06.0: reg 0x10: [io  0x10000-0x100ff]
[    0.281250] pci 0000:00:06.0: reg 0x14: [mem 0x82100100-0x821001ff]
[    0.281250] pci 0000:00:06.0: NCR 53c810 rev 1 PCI class overridden (0x000000 -> 0x010000)
[    0.289062] pci 0000:00:07.0: [8086:0484] type 00 class 0x000000
[    0.296875] pci 0000:00:0b.0: [1011:0009] type 00 class 0x020000
[    0.296875] pci 0000:00:0b.0: reg 0x10: [io  0x10100-0x1017f]
[    0.296875] pci 0000:00:0b.0: reg 0x14: [mem 0x82100200-0x8210027f]
[    0.296875] pci 0000:00:0b.0: reg 0x30: [mem 0x820c0000-0x820fffff pref]
[    0.296875] pci 0000:00:0c.0: [1011:0004] type 00 class 0x038000
[    0.296875] pci 0000:00:0c.0: reg 0x10: [mem 0x88000000-0x89ffffff pref]
[    0.296875] pci 0000:00:0c.0: reg 0x30: [mem 0x82080000-0x820bffff pref]
[    0.296875] pci 0000:00:0d.0: [1095:0680] type 00 class 0x010400
[    0.296875] pci 0000:00:0d.0: reg 0x10: [io  0x101c0-0x101c7]
[    0.296875] pci 0000:00:0d.0: reg 0x14: [io  0x101b0-0x101b3]
[    0.296875] pci 0000:00:0d.0: reg 0x18: [io  0x101a0-0x101a7]
[    0.296875] pci 0000:00:0d.0: reg 0x1c: [io  0x10190-0x10193]
[    0.296875] pci 0000:00:0d.0: reg 0x20: [io  0x10180-0x1018f]
[    0.296875] pci 0000:00:0d.0: reg 0x24: [mem 0x82100000-0x821000ff]
[    0.296875] pci 0000:00:0d.0: reg 0x30: [mem 0x82000000-0x8207ffff pref]
[    0.296875] pci 0000:00:0d.0: supports D1 D2
[    0.296875] pci: enabling save/restore of SRM state
[    0.304687] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.304687] pci 0000:00:0c.0: BAR 0: assigned [mem 0x02000000-0x03ffffff pref]
[    0.312500] pci 0000:00:0d.0: BAR 6: assigned [mem 0x01200000-0x0127ffff pref]
[    0.320312] pci 0000:00:0b.0: BAR 6: assigned [mem 0x01280000-0x012bffff pref]
[    0.328125] pci 0000:00:0c.0: BAR 6: assigned [mem 0x012c0000-0x012fffff pref]
[    0.335937] pci 0000:00:06.0: BAR 0: assigned [io  0x8000-0x80ff]
[    0.343750] pci 0000:00:06.0: BAR 1: assigned [mem 0x01300000-0x013000ff]
[    0.343750] pci 0000:00:0d.0: BAR 5: assigned [mem 0x01301000-0x013010ff]
[    0.351562] pci 0000:00:0b.0: BAR 0: assigned [io  0x8400-0x847f]
[    0.359375] pci 0000:00:0b.0: BAR 1: assigned [mem 0x01302000-0x0130207f]
[    0.367187] pci 0000:00:0d.0: BAR 4: assigned [io  0x8480-0x848f]
[    0.375000] pci 0000:00:0d.0: BAR 0: assigned [io  0x8490-0x8497]
[    0.382812] pci 0000:00:0d.0: BAR 2: assigned [io  0x8498-0x849f]
[    0.382812] pci 0000:00:0d.0: BAR 1: assigned [io  0x84a0-0x84a3]
[    0.390625] pci 0000:00:0d.0: BAR 3: assigned [io  0x84a4-0x84a7]
[    0.398437] pci_bus 0000:00: resource 4 [io  0x0000-0xffff]
[    0.398437] pci_bus 0000:00: resource 5 [mem 0x00000000-0x3fffffff]
[    0.398437] sio_pci_route: PIRQ original 0xb0a0905 new 0xb0a050f
[    0.406250] __sio_fixup_irq_levels: level bits e20
[    0.414062] Found PC87332 Super IO chip at 0x26e
[    0.414062] PC873xx enabling EPP v1.9
[    0.437500] vgaarb: loaded
[    0.492187] NET: Registered protocol family 2
[    0.500000] TCP established hash table entries: 8192 (order: 3, 65536 bytes)
[    0.507812] TCP bind hash table entries: 8192 (order: 3, 65536 bytes)
[    0.515625] TCP: Hash tables configured (established 8192 bind 8192)
[    0.523437] UDP hash table entries: 512 (order: 1, 16384 bytes)
[    0.531250] UDP-Lite hash table entries: 512 (order: 1, 16384 bytes)
[    0.539062] PCI: CLS 64 bytes, default 32
[    0.546875] Using epoch 2000 for rtc year 18
[    0.546875] platform rtc-alpha: rtc core: registered rtc-alpha as rtc0
[    0.562500] workingset: timestamp_bits=62 max_order=17 bucket_order=0
[    0.625000] random: fast init done
[    0.632812] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.640625] io scheduler noop registered
[    0.640625] io scheduler cfq registered (default)
[    0.648437] __sio_fixup_irq_levels: level bits e20
[    0.664062] Console: switching to colour frame buffer device 80x30
[    0.679687] tgafb: DC21030 [TGA] detected, rev=0x02
[    0.687500] tgafb: at PCI bus 0, device 12, function 0
[    0.687500] fb0: Digital ZLXp-E1 frame buffer device at 0x2000000
[    0.695312] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.710937] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.726562] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    0.734375] Uniform Multi-Platform E-IDE driver
[    0.742187] __sio_fixup_irq_levels: level bits e20
[    0.742187] siimage 0000:00:0d.0: IDE controller (0x1095:0x0680 rev 0x02)
[    0.750000] siimage 0000:00:0d.0: BASE CLOCK == 133
[    0.757812] siimage 0000:00:0d.0: 100% native mode on irq 10
[    0.765625]     ide0: MMIO-DMA
[    0.765625]     ide1: MMIO-DMA
[    0.765625] Probing IDE interface ide0...
[    1.132812] hda: WDC WD400BB-00DEA0, ATA DISK drive
[    1.976562] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
[    1.976562] hda: UDMA/100 mode selected
[    1.976562] Probing IDE interface ide1...
[    2.687500] ide0 at 0xfffffc0301301080-0xfffffc0301301087,0xfffffc030130108a on irq 10
[    2.695312] ide1 at 0xfffffc03013010c0-0xfffffc03013010c7,0xfffffc03013010ca on irq 10
[    2.703125] ide-gd driver 1.18
[    2.703125] hda: max request size: 64KiB
[    2.773437] hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=65535/16/63
[    2.781250] hda: cache flushes not supported
[    2.789062]  hda: hda1 hda2
[    2.804687] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.812500] serio: i8042 AUX port at 0x60,0x64 irq 12
[    2.820312] mousedev: PS/2 mouse device common for all mice
[    2.828125] platform rtc-alpha: setting system clock to 2018-01-09 20:08:12 UTC (1515528492)
[    2.843750] atkbd serio0: keyboard reset failed on isa0060/serio0
[    2.898437] atkbd serio1: keyboard reset failed on isa0060/serio1
[    3.195312] VFS: Mounted root (spadfs filesystem) readonly on device 3:1.
[    3.203125] devtmpfs: mounted
[    3.210937] Freeing unused kernel memory: 136K
[    3.210937] This architecture does not have kernel memory protection.
[    5.203125] NET: Registered protocol family 1
[   10.914062] tulip: Linux Tulip driver version 1.1.15-NAPI (Feb 27, 2007)
[   10.921875] __sio_fixup_irq_levels: level bits 8e20
[   10.929687] tulip0: EEPROM default media type Autosense
[   10.937500] tulip0: Index #0 - Media MII (#11) described by a 21140 MII PHY (1) block
[   10.953125] tulip0:  MII transceiver #5 config 2100 status 780f advertising 01e1
[   10.968750] net eth0: Digital DS21140 Tulip rev 34 at MMIO 0x1302000, 00:00:f8:10:0b:42, IRQ 15
[   11.109375] input: PC Speaker as /devices/platform/pcspkr/input/input2
[   11.148437] SCSI subsystem initialized
[   11.335937] random: crng init done
[   11.531250] __sio_fixup_irq_levels: level bits 8e20
[   11.539062] sym0: <810> rev 0x1 at pci 0000:00:06.0 irq 11
[   11.750000] sym0: No NVRAM, ID 7, Fast-10, SE, parity checking
[   11.750000] sym0: SCSI BUS has been reset.
[   11.757812] scsi host0: sym-2.2.3
[   13.796875] hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
[   13.804687] hda: task_no_data_intr: error=0x04 { DriveStatusError }
[   13.812500] hda: possibly failed opcode: 0xef
[   15.140625] scsi 0:0:0:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.148437] scsi target0:0:0: tagged command queuing enabled, command queue depth 16.
[   15.156250] scsi target0:0:0: Beginning Domain Validation
[   15.203125] scsi target0:0:0: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.242187] scsi target0:0:0: Domain Validation skipping write tests
[   15.242187] scsi target0:0:0: Ending Domain Validation
[   15.265625] scsi 0:0:1:0: Direct-Access     SEAGATE  ST39216N         0005 PQ: 0 ANSI: 3
[   15.273437] scsi target0:0:1: tagged command queuing enabled, command queue depth 16.
[   15.281250] scsi target0:0:1: Beginning Domain Validation
[   15.328125] scsi target0:0:1: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.343750] scsi target0:0:1: Domain Validation skipping write tests
[   15.351562] scsi target0:0:1: Ending Domain Validation
[   15.375000] scsi 0:0:2:0: Direct-Access     DEC      RZ28M    (C) DEC 0616 PQ: 0 ANSI: 2
[   15.382812] scsi target0:0:2: tagged command queuing enabled, command queue depth 16.
[   15.390625] scsi target0:0:2: Beginning Domain Validation
[   15.570312] scsi target0:0:2: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 8)
[   15.585937] scsi target0:0:2: Domain Validation skipping write tests
[   15.593750] scsi target0:0:2: Ending Domain Validation
[   15.921875] scsi 0:0:4:0: CD-ROM            DEC      RRD45   (C) DEC  0436 PQ: 0 ANSI: 2
[   15.929687] scsi target0:0:4: Beginning Domain Validation
[   16.031250] scsi target0:0:4: FAST-5 SCSI 4.2 MB/s ST (236 ns, offset 8)
[   16.054687] scsi target0:0:4: Domain Validation skipping write tests
[   16.062500] scsi target0:0:4: Ending Domain Validation
[   16.921875] scsi 0:0:0:0: Attached scsi generic sg0 type 0
[   16.945312] scsi 0:0:1:0: Attached scsi generic sg1 type 0
[   16.960937] scsi 0:0:2:0: Attached scsi generic sg2 type 0
[   16.968750] scsi 0:0:4:0: Attached scsi generic sg3 type 5
[   17.031250] sd 0:0:0:0: [sda] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.039062] sd 0:0:1:0: [sdb] 17942584 512-byte logical blocks: (9.19 GB/8.56 GiB)
[   17.062500] sd 0:0:2:0: [sdc] 4110480 512-byte logical blocks: (2.10 GB/1.96 GiB)
[   17.093750] sd 0:0:0:0: [sda] Write Protect is off
[   17.093750] sd 0:0:0:0: [sda] Mode Sense: 7b 00 10 08
[   17.093750] sd 0:0:1:0: [sdb] Write Protect is off
[   17.101562] sd 0:0:1:0: [sdb] Mode Sense: 9f 00 10 08
[   17.101562] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.117187] sd 0:0:2:0: [sdc] Write Protect is off
[   17.125000] sd 0:0:2:0: [sdc] Mode Sense: 7b 00 10 08
[   17.164062] sd 0:0:1:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   17.195312] sd 0:0:2:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   17.335937] sr 0:0:4:0: [sr0] scsi-1 drive
[   17.343750] cdrom: Uniform CD-ROM driver Revision: 3.20
[   17.359375]  sda: sda1 sda2 sda3
[   17.398437]  sdc: sdc1 sdc2
[   17.421875] sd 0:0:1:0: [sdb] Attached SCSI disk
[   17.437500] sd 0:0:0:0: [sda] Attached SCSI disk
[   17.445312] sr 0:0:4:0: Attached scsi CD-ROM sr0
[   17.476562] sd 0:0:2:0: [sdc] Attached SCSI disk
[   18.187500] NET: Registered protocol family 17
[   19.531250] sd 0:0:0:0: phase change 2-7 16@65b36360 resid=10.
[   19.546875] sd 0:0:0:0: phase change 2-7 16@65b36360 resid=10.
[   19.562500] sd 0:0:2:0: phase change 2-7 16@65b36360 resid=10.
[   19.578125] sd 0:0:2:0: phase change 2-7 16@65b36360 resid=10.
[   23.937500] tulip 0000:00:0b.0 eth0: tulip_stop_rxtx() failed (CSR5 0xfc660000 CSR6 0x320e2202)
[   23.937500] net eth0: Setting full-duplex based on MII#5 link partner capability of 85e1
[   39.023437] Adding 4177912k swap on /swap.  Priority:-2 extents:1 across:4177912k 
[   41.609375] Adding 4177912k swap on /swap2.  Priority:-3 extents:1 across:4177912k 
[   43.984375] loop: module loaded
[   65.578125] NET: Registered protocol family 10
[   65.625000] Segment Routing with IPv6

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-01-09 19:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 21:32 the patch "alpha/PCI: Replace pci_fixup_irqs()" breaks networking Mikulas Patocka
2018-01-02 21:50 ` Bjorn Helgaas
2018-01-02 21:54 ` Meelis Roos
2018-01-03 10:38   ` Lorenzo Pieralisi
2018-01-03 19:05     ` Mikulas Patocka
2018-01-04 10:46       ` Lorenzo Pieralisi
2018-01-03 19:05   ` Mikulas Patocka
2018-01-03 14:55 ` Lorenzo Pieralisi
2018-01-03 19:03   ` Mikulas Patocka
2018-01-04 10:58     ` Lorenzo Pieralisi
2018-01-03 19:50   ` Meelis Roos
2018-01-04 11:00     ` Lorenzo Pieralisi
2018-01-04 12:17 ` Lorenzo Pieralisi
2018-01-04 18:06   ` Mikulas Patocka
2018-01-04 18:49     ` Lorenzo Pieralisi
2018-01-05 11:23 ` Lorenzo Pieralisi
2018-01-05 18:49   ` Mikulas Patocka
2018-01-08 10:18     ` Lorenzo Pieralisi
2018-01-08 18:35       ` Mikulas Patocka
2018-01-09 12:16         ` Lorenzo Pieralisi
2018-01-09 19:13           ` Mikulas Patocka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.