Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2013 14:53:22 +0900
From:      YongHyeon PYUN <pyunyh@gmail.com>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: re(4) problems with GA-H77N-WIFI
Message-ID:  <20130206055322.GA1442@michelle.cdnetworks.com>
In-Reply-To: <201302041815.r14IFpD5007605@grabthar.secnetix.de>
References:  <201302041815.r14IFpD5007605@grabthar.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 04, 2013 at 07:15:51PM +0100, Oliver Fromme wrote:
> Hello,
> 
> I need some advice how to debug this issue ...
> 
> Recently I got a new mainboard for a router, it's a
> Gigabyte GA-H77N-WIFI with two onboard re(4) NICs.
> 
> The problem is that re0 works fine and re1 doesn't:
> It doesn't receive any packets.  Tcpdump displays all
> outgoing packets, but no incoming ones on re1.

Can you see the packets sent from re1 on other box?
If not, it probably indicates GMAC is in weird state which in turn
indicates initialization was not complete for the controller.

> Ifconfig shows the link correctly (100 or 1000 Mbit,
> depending on where I plug the cable in).
> I also swapped cables just to be sure, but it made no
> difference.
> 

If you cold-boot the box with UTP cable plugged in to re1 does it
make any difference?

> I'm running a recent stable/9 (about 14 days old).
> What's the best way to debug this problem?  At the

I would check whether GMAC is active when driver detects a valid
link.  Add a code like the following to re_miibus_statchg() to get
the status of RL_COMMAND register. You would get the status
whenever a link is established with link partner.

Index: if_re.c
===================================================================
--- if_re.c	(revision 246338)
+++ if_re.c	(working copy)
@@ -626,6 +626,9 @@
 		default:
 			break;
 		}
+		if (sc->rl_flags & RL_FLAG_LINK)
+			device_printf(sc->rl_dev, "CMD 0x%02x\n",
+			    CSR_READ_1(sc, RL_COMMAND));
 	}
 	/*
 	 * RealTek controllers does not provide any interface to

> moment I'm not even sure if it's the hardware, or if
> it's FreeBSD's fault (or my fault) ...
> 
> Best regards
>    Oliver
> 
> PS:  dmesg ...
> 
> pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.4 on pci0
> pci2: <ACPI PCI bus> on pcib2
> re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0xe000-0xe0ff mem 0xf0104000-0xf0104fff,0xf0100000-0xf0103fff irq 16 at device 0.0 on pci2
> re0: Using 1 MSI-X message
> re0: Chip rev. 0x2c800000
> re0: MAC rev. 0x00000000
> miibus0: <MII bus> on re0
> rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
> rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
> re0: Ethernet address: 90:2b:34:5f:bd:21
> pcib3: <ACPI PCI-PCI bridge> irq 17 at device 28.5 on pci0
> pci3: <ACPI PCI bus> on pcib3
> re1: <RealTek 8168/8111 B/C/CP/D/DP/E/F PCIe Gigabit Ethernet> port 0xd000-0xd0ff mem 0xf0004000-0xf0004fff,0xf0000000-0xf0003fff irq 17 at device 0.0 on pci3
> re1: Using 1 MSI-X message
> re1: Chip rev. 0x2c800000
> re1: MAC rev. 0x00000000
> miibus1: <MII bus> on re1
> rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus1
> rgephy1:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
> re1: Ethernet address: 90:2b:34:5f:bd:11
> 
> ifconfig ...
> 
> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
>         ether 90:2b:34:5f:bd:21
>         inet ...
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
> re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
>         ether 90:2b:34:5f:bd:11
>         inet ...
>         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130206055322.GA1442>