Skip to contentSkip to conversation

New: Sun GEM (PCI) - network device doesn't work

Bugme-new Andrew Morton 4 participants 6 messages Mar 17, 2008 – Apr 25, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw
Quoted 17 lines · On Mon, 17 Mar 2008 14:25:50 -0700 (PDT) [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=10273

           Summary: Sun GEM (PCI) - network device doesn't work
           Product: Drivers
           Version: 2.5
     KernelVersion: 2.6.23
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Network
        AssignedTo: [email protected]
        ReportedBy: [email protected]
Quoted 2 lines

Latest working kernel version: 2.6.22.9
Earliest failing kernel version: 2.6.23

A regression in 2.6.23.

Quoted 50 lines

Distribution: Gentoo
Hardware Environment: Sparc64 (Sun Blade 100)
Software Environment:
Problem Description:

I have two nearly identical Sun Blade 100 systems. Up to and including kernel version 2.6.22.9, both were working fine. However, with the 2.6.23- and 2.6.24- series I cannot get the Sun GEM network device on one of the two Blades to work. The other one strangely does not have this problem at all.

The network device detects fine and the sungem module loads without problems. Mii-diag reports that a 100FDX connection exists and there is link beat. However, packets are neither being sent nor received, all counters in ifconfig remain at zero.

Attempts to use the network eventually result in the following message in dmesg:

eth0: Sun GEM (PCI) 10/100/1000BaseT Ethernet 00:03:ba:08:61:7c
eth0: Found Generic MII PHY
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Pause is disabled
NETDEV WATCHDOG: eth0: transmit timed out
eth0: transmit timed out, resetting
eth0: TX_STATE[003ffc05:00000001:0000001f]
eth0: RX_STATE[0100c805:00000001:00000021]
eth0: Link is up at 100 Mbps, full-duplex.
eth0: Pause is disabled

The difference between the non-working system and the working one are as follows:
- The non-working system has more memory (1G opposed to 512M)
- A dual SCSI controller is present in this system. Connected to it are two external 72G disks and an Exabyte Mammoth tapedrive.
01:02.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 14) 01:02.1 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 14)
- The following kernel modules are loaded on this system and not on the working
one: sym53c8xx, sd_mod, st, nfsd, md_mod and raid1 plus of course their respective dependencies.

The problem is exactly the same with both Gentoo-patched kernels and vanilla kernels, that's why I am reporting it here.

Steps to reproduce:

Just boot an affected kernel and try to use eth0 in any way.

#2 lore raw

Fwd: [SPARC64] INO problem Re: [Bug 10273] New: Sun GEM (PCI) - network device doesn't work

Nice work Jos! I forward it to the author and the lists.

Jarek P.

Andrew Morton wrote, On 03/17/2008 10:36 PM:

Quoted 6 lines
Quoted 3 lines · On Mon, 17 Mar 2008 14:25:50 -0700 (PDT) [email protected] wrote:

http://bugzilla.kernel.org/show_bug.cgi?id=10273

Summary: Sun GEM (PCI) - network device doesn't work

----- Forwarded message from [email protected] -----

Quoted 15 lines

------- Comment #24 from [email protected] 2008-04-02 07:24 ------- I did bisection. The bad commit is:

5a606b72a4309a656cd1a19ad137dc5557c4b8ea is first bad commit commit 5a606b72a4309a656cd1a19ad137dc5557c4b8ea

Author: David S. Miller <[email protected]>
Date:   Mon Jul 9 22:40:36 2007 -0700

[SPARC64]: Do not ACK an INO if it is disabled or inprogress.

Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

----- End forwarded message -----

maintainer
#3 lore raw

Re: [SPARC64] INO problem Re: [Bug 10273] New: Sun GEM (PCI) - network device doesn't work

From: Jarek Poplawski <[email protected]>
Date: Wed, 2 Apr 2008 20:26:55 +0200

Quoted 1 line

Nice work Jos! I forward it to the author and the lists.

Thanks for tracking this down.

I'm very busy currently but I promise I'll try to resolve this somehow.

maintainer
#4 lore raw

Re: [SPARC64] INO problem Re: [Bug 10273] New: Sun GEM (PCI) - network device doesn't work

In reply to Jarek Poplawski

From: Jarek Poplawski <[email protected]>
Date: Wed, 2 Apr 2008 20:26:55 +0200

Quoted 1 line

Nice work Jos! I forward it to the author and the lists.

I haven't forgotten about this bug report, in fact I did some investigation and thinking about it.

I think the case being triggered in the new code is IRQ_DISABLED.

If this is the problem, I suspect that what needs to happen is that when we re-enable the interrupt we have to forcefully hit the clear register to put it back into transmit state. Otherwise it can get stuck.

Please give this patch a try (this is against 2.6.23, which is the version you reported the bug against, let me know if another version is more convenient).

Thanks!

arch/sparc64/kernel/irq.c +2 -0
index 2395609..98b68d2 100644
@@ -313,6 +313,8 @@ static void sun4u_irq_enable(unsigned int virt_irq)
 			 IMAP_AID_SAFARI | IMAP_NID_SAFARI);
 		val |= tid | IMAP_VALID;
 		upa_writeq(val, imap);
+
+		upa_writeq(ICLR_IDLE, data->iclr);
 	}
 }
 
#5 lore raw

Re: [SPARC64] INO problem Re: [Bug 10273] New: Sun GEM (PCI) - network device doesn't work

Quoted 3 lines

Please give this patch a try (this is against 2.6.23, which is the version you reported the bug against, let me know if another version is more convenient).

I applied the patch against 2.6.24-gentoo-r4, the current kernel on this machine. It worked fine, with only an offset of 12 lines. Nothing unusual during compile either.

The first results are hopeful: I am no longer able to trigger this bug by loading sym53c8xx before sungem, nor by having them both loaded by udev. Nothing odd in dmesg and the machine is completely functional.

I don't have much time for testing today, but if desired I will gladly do some more testing tomorrow or Sunday.

Signature · 1 line
Jos van der Ende <[email protected]>
maintainer
#6 lore raw

Re: [SPARC64] INO problem Re: [Bug 10273] New: Sun GEM (PCI) - network device doesn't work

From: Jos van der Ende <[email protected]>
Date: Fri, 25 Apr 2008 21:59:05 +0200

Quoted 10 lines
Quoted 3 lines

Please give this patch a try (this is against 2.6.23, which is the version you reported the bug against, let me know if another version is more convenient).

I applied the patch against 2.6.24-gentoo-r4, the current kernel on this machine. It worked fine, with only an offset of 12 lines. Nothing unusual during compile either.

The first results are hopeful: I am no longer able to trigger this bug by loading sym53c8xx before sungem, nor by having them both loaded by udev. Nothing odd in dmesg and the machine is completely functional.

I don't have much time for testing today, but if desired I will gladly do some more testing tomorrow or Sunday.

Thanks for testing the change, I'll do some of my own testing and push the bug fix upstream.

Thanks again!