From owner-freebsd-net@FreeBSD.ORG Fri Oct 31 01:13:28 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 798441065674 for ; Fri, 31 Oct 2008 01:13:28 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by mx1.freebsd.org (Postfix) with ESMTP id 408518FC08 for ; Fri, 31 Oct 2008 01:13:28 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so878312rvf.43 for ; Thu, 30 Oct 2008 18:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=mgQW47bhkQE7ot/t4mt8xT6gHMdV6uq9DQKUflMULgo=; b=NUXMqMxPG0Aq0R9tRQvMEM1raXysqwHsNLGb+0TEAdD7y2ri0EvV4mIAypeU4crbr7 NQLdnfqU5X4i7PuwMQZi7CkTE/4vCiyKeLngivPkIZXqGNvy0o34CvhvlMsGDEERsavX ZR5ue7SS4vait5D6IyXvhN+Ps/euHJ6jk8kFg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=X7QoPJhrMMdSpnJe/7B5+rKQRHWsIGFGAZX/qwtLtQP73IahP6vWPXoxdPaVNRWXft nROqlg0sTQ8JizzfFlUyEZG+IkyyenSOv1C4bJk4N9943o/8H7zdAk2oZdRRmEwGI9bR n9r60GzjojWzS74UvEsBLQW4SPRr4FB0isMnI= Received: by 10.140.163.12 with SMTP id l12mr6253749rve.137.1225415608051; Thu, 30 Oct 2008 18:13:28 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ([211.53.35.84]) by mx.google.com with ESMTPS id b39sm3501636rvf.0.2008.10.30.18.13.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Oct 2008 18:13:26 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m9V1BQuJ083095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 31 Oct 2008 10:11:26 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m9V1BPVG083094; Fri, 31 Oct 2008 10:11:25 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 31 Oct 2008 10:11:25 +0900 From: Pyun YongHyeon To: Milan Obuch Message-ID: <20081031011125.GC82781@cdnetworks.co.kr> References: <200810300829.35980.freebsd-net@dino.sk> <20081030102656.GD78796@cdnetworks.co.kr> <200810302241.01863.freebsd-net@dino.sk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200810302241.01863.freebsd-net@dino.sk> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: re weird bug X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 01:13:28 -0000 On Thu, Oct 30, 2008 at 10:41:01PM +0100, Milan Obuch wrote: > On Thursday 30 October 2008 11:26:56 Pyun YongHyeon wrote: > > On Thu, Oct 30, 2008 at 08:29:35AM +0100, Milan Obuch wrote: > > > Hi, > > > yesterday I csup'ped my 8-current sources on my MSI Wind netbook (again) > > > and tried to build new kernel. There is again a problem with re > > > interface. It just does not work, with following > > > > > > re0: port 0xc000-0xc0ff > > > mem 0xffd10000-0xffd10fff,0xffd00000-0xffd0ffff irq 16 at device 0.0 on > > > pci1 re0: Chip rev. 0x34800000 > > > re0: MAC rev. 0x00200000 > > > re0: PHY write failed > > > re0: PHY write failed > > > re0: MII without any phy! > > > device_attach: re0 attach returned 6 > > > > > > in dmesg. This happened already some time ago, but I did not investigate > > > it, just reverted to older kernel and later it disappeared. Today I > > > found there is some timing issue or racing condition - when I boot with > > > verbose message logging, it works with expected > > > > > > re0: port 0xc000-0xc0ff > > > mem 0xffd10000-0xffd10fff,0xffd00000-0xffd0ffff irq 16 at device 0.0 on > > > pci1 re0: Reserved 0x1000 bytes for rid 0x18 type 3 at 0xffd10000 > > > re0: MSI count : 1 > > > re0: Chip rev. 0x34800000 > > > re0: MAC rev. 0x00200000 > > > miibus0: on re0 > > > rlphy0: PHY 1 on miibus0 > > > rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > > > re0: bpf attached > > > re0: Ethernet address: 00:1d:92:59:f5:8b > > > re0: [MPSAFE] > > > re0: [FILTER] > > > > > > So I think some issue could be in miibus or rlphy code. > > > I am using stripped down kernel with no interfaces, I kldload if_re (and > > > miibus as dependency), if that matters. > > > Has anybody an idea or patch to test? Something similar appeared > > > recently on list, but I would like to get issue commented first (maybe > > > with a pointer to patch). > > > > That's known issue for newer RealTek PCIe controllers. Would you > > please try the patch at the following URL? > > http://people.freebsd.org/~yongari/re/re.ephy.patch.20081021 > > > > Since it's not easy to reproduce this issue please make sure to > > (cold and warm) reboot several times until you can put confidence > > in the patch. > > I tried, but no change - with patch applied re still does not work unless I > boot with verbose logging, no matter whether I boot cold or warm. > Thanks for testing. If you look into patched if_re.c you can see a "#if 1" in function re_ephy_config(). How about changing it to "#if 0" to enable more aggresive reprogramming for EPHY register? -- Regards, Pyun YongHyeon