From owner-freebsd-net@FreeBSD.ORG Mon Jan 14 06:16:06 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6F937532 for ; Mon, 14 Jan 2013 06:16:06 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD1E397 for ; Mon, 14 Jan 2013 06:16:05 +0000 (UTC) Received: by mail-pb0-f53.google.com with SMTP id jt11so1972958pbb.12 for ; Sun, 13 Jan 2013 22:15:59 -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=+61aG2FVEj4YBy7npHe7/F/0U851NDqe9ndywD9C6M0=; b=KJypQMiJfcDCdMtxwMbnwepr92voHdY5fph/zhHdzQ3OrvU+LC2Jocg2hoX1OWhNu4 OQiqZQ8frydw5W2knm0VnqqGOx0F8AYeIPevql66vcYhETJzJQUaOTeUrYLBfh6nJ4O8 /eUZdBSV3200AYEILSR0BXrklV6tudnibPNhEYf/HMc9FNeXYH0SRRk3rcrNmQTipmKt /RtmA6F25Mr44Vryh+fGuUzPWJXdq1O+6iJaHAWbxUzM4T3pNUFE5kM/A05mATTRilKz aRWBH0QF2L5UBndpIN+nbT7aW3MMMPae/7jky4WD4FF4+ZvUzwJQV0prNdT2ZV8Mj867 q5pw== X-Received: by 10.66.82.170 with SMTP id j10mr230735565pay.9.1358144159530; Sun, 13 Jan 2013 22:15:59 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id qt2sm7619716pbb.24.2013.01.13.22.15.56 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 13 Jan 2013 22:15:58 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 14 Jan 2013 15:15:53 +0900 From: YongHyeon PYUN Date: Mon, 14 Jan 2013 15:15:53 +0900 To: Ruslan Makhmatkhanov Subject: Re: if_vr(4) and DFE520-TX Message-ID: <20130114061553.GA3531@michelle.cdnetworks.com> References: <50F110AB.1030107@yandex.ru> <50F14880.4090001@yandex.ru> <50F177E9.3040003@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50F177E9.3040003@yandex.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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: Mon, 14 Jan 2013 06:16:06 -0000 On Sat, Jan 12, 2013 at 06:49:13PM +0400, Ruslan Makhmatkhanov wrote: > Ok, I got some details. It's an DFE-520TX (/C1 or rev. C1). I crafted an > patch attached, but whenever kldloading the modified if_vr, I got this: > > kernel: vr0: port 0xd100-0xd1ff > mem 0xf7c11000-0xf7c110ff irq 19 at device 0.0 on pci4 > kernel: vr0: Quirks: 0x0 > kernel: vr0: Revision: 0x10 > kernel: vr0: reset never completed! > kernel: vr0: attaching PHYs failed > kernel: device_attach: vr0 attach returned 6 > kernel: vr0: port 0xd000-0xd0ff > mem 0xf7c10000-0xf7c100ff irq 16 at device 1.0 on pci4 > kernel: vr0: Quirks: 0x0 > kernel: vr0: Revision: 0x10 > kernel: vr0: reset never completed! > kernel: vr0: attaching PHYs failed > kernel: device_attach: vr0 attach returned 6 > > I also tried to apply VR_Q_NEEDALIGN quirk, but nothing is changed. Any > hints? I recall D-Link was one of notorious vendor which used to completely change its chip set in later revisions without notice. So I'm afraid the controller you have may not be a VIA manufactured one. Could you take a picture of the chip set of controller and let others see it? I guess it could be a RealTek 8139 or 8139C+. > > > Ruslan Makhmatkhanov wrote on 12.01.2013 15:26: > > > >Here is also verbose boot log for what it's worth: > >http://pastebin.com/SnivrtFr > > > >Please keep me in cc:, I'm not subscribed. Thanks. > > > >Ruslan Makhmatkhanov wrote on 12.01.2013 11:28: > >>Hello, > >> > >>I bought two D-link DFE520-TX ethernet adapters that supposed to work > >>with if_vr(4) according to man-page. But the driver cannot attach > >>(tested in 9.1-R and pfSense 2.0.2/2.1 (8.1-R and 8.3-R respectively)). > >> > >>none2@pci0:4:0:0: class=0x020000 card=0x11031186 chip=0x42001186 > >>rev=0x10 hdr=0x00 > >> vendor = 'D-Link System Inc' > >> class = network > >> subclass = ethernet > >> > >>Can please anybody suggest proper changes for > >>/sys/dev/vr/if_vrreg.h|if_vr.c (pci ids would be enought, right?) to > >>test if it works. Thanks in advance. > > > > > -- > Regards, > Ruslan > > Tinderboxing kills... the drives. > diff -uN vr.orig/if_vr.c vr/if_vr.c > --- vr.orig/if_vr.c 2013-01-12 13:19:28.000000000 +0400 > +++ vr/if_vr.c 2013-01-12 18:42:52.000000000 +0400 > @@ -138,6 +138,9 @@ > { DELTA_VENDORID, DELTA_DEVICEID_RHINE_II, > VR_Q_NEEDALIGN, > "Delta Electronics Rhine II 10/100BaseTX" }, > + { DLINK_VENDORID, DLINK_DEVICEID_RHINE_II, > + 0, > + "D-Link System Inc 4200 10/100BaseTX" }, > { ADDTRON_VENDORID, ADDTRON_DEVICEID_RHINE_II, > VR_Q_NEEDALIGN, > "Addtron Technology Rhine II 10/100BaseTX" }, > diff -uN vr.orig/if_vrreg.h vr/if_vrreg.h > --- vr.orig/if_vrreg.h 2013-01-12 13:19:28.000000000 +0400 > +++ vr/if_vrreg.h 2013-01-12 14:29:26.000000000 +0400 > @@ -557,6 +557,16 @@ > #define DELTA_DEVICEID_RHINE_II 0x1320 > > /* > + * D-Link System Inc device ID. > + */ > +#define DLINK_VENDORID 0x1186 > + > +/* > + * D-Link System Inc device IDs. > + */ > +#define DLINK_DEVICEID_RHINE_II 0x4200 > + > +/* > * Addtron vendor ID. > */ > #define ADDTRON_VENDORID 0x4033