From owner-freebsd-stable@FreeBSD.ORG Wed Feb 6 05:53:36 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A34D619A for ; Wed, 6 Feb 2013 05:53:36 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-da0-f43.google.com (mail-da0-f43.google.com [209.85.210.43]) by mx1.freebsd.org (Postfix) with ESMTP id 758FCE7B for ; Wed, 6 Feb 2013 05:53:36 +0000 (UTC) Received: by mail-da0-f43.google.com with SMTP id u36so446071dak.2 for ; Tue, 05 Feb 2013 21:53:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:date:to:cc:subject:message-id:reply-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=xdb5w00+uK2Nl1Z2x+aeLO1TvvHGH1iXyXtluOj4jnU=; b=E//FPiHVaIEMl+85L9u8kHm/V+lyfnYwfXZnqCAuZEx7NBBve+LXQBNHdXwhlAFu0f HOfcRchf0wHsvumVVERh9m8+WUIbGYenauJE4oB7H9OYiAzw2Ku7ht3GonbAnRt6EVmC pUwQI5tP4OEU0yW6lULQhsY5RdmqNYTCxVPg5aSjyuevNWHym6OCmpqFbEzEL26kFg+O NQZ+VmN9jEocf44636vl4Tv9o/FsByIdZSB7aYcJnfxdUMqw1MrU3o6RrXMl6wM6w3rz xuFlJxCUn7rP1Zv9nhqRIbY9U+C4qVJzzoiIXjQbqalBe9sSdlSAUr3Mw8qgOHKGXhIM To4g== X-Received: by 10.66.74.42 with SMTP id q10mr72180981pav.71.1360130010121; Tue, 05 Feb 2013 21:53:30 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id x2sm35004057paw.8.2013.02.05.21.53.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 Feb 2013 21:53:29 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 06 Feb 2013 14:53:22 +0900 From: YongHyeon PYUN Date: Wed, 6 Feb 2013 14:53:22 +0900 To: Oliver Fromme Subject: Re: re(4) problems with GA-H77N-WIFI Message-ID: <20130206055322.GA1442@michelle.cdnetworks.com> References: <201302041815.r14IFpD5007605@grabthar.secnetix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201302041815.r14IFpD5007605@grabthar.secnetix.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 05:53:36 -0000 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: irq 16 at device 28.4 on pci0 > pci2: on pcib2 > re0: 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: on re0 > rgephy0: 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: irq 17 at device 28.5 on pci0 > pci3: on pcib3 > re1: 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: on re1 > rgephy1: 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 metric 0 mtu 1500 > options=8209b > ether 90:2b:34:5f:bd:21 > inet ... > nd6 options=21 > media: Ethernet autoselect (1000baseT ) > status: active > re1: flags=8843 metric 0 mtu 1500 > options=8209b > ether 90:2b:34:5f:bd:11 > inet ... > nd6 options=21 > media: Ethernet autoselect (100baseTX ) > status: active