From owner-freebsd-net@FreeBSD.ORG Tue Jan 15 02:44:38 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 0A847611 for ; Tue, 15 Jan 2013 02:44:38 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx1.freebsd.org (Postfix) with ESMTP id D6368D50 for ; Tue, 15 Jan 2013 02:44:37 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id bh2so2606920pad.19 for ; Mon, 14 Jan 2013 18:44:37 -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=Nyj0L3/N0xtk1UcIT6Vu9+svav9ZLeW1e3emTGBDUmU=; b=MqxsATxvL7XQh9bqkgkzmUJkfNJYcSkkbKm/XuUavyjHovpY6hGbcE86EwTxAVDP7h EvWRl/atTiqMppNtm+jsPC5ZpusRTZjj/BmZMYcPTPGft6iCRi5IDbKkMUdwqnaQoNFj tXNQyXukbx9aKtrCZERWyYbqGwsjeC/hcU3m3BakRl8PL61chOS4ONF2IDtXrfr35rvK kijHq9J2noIxY7gXXjjINJCwh+U0871BfTatC//FneVj06CZk9R+A4WCexTQ65g4rzQs D9RTa3UGV5fjIk9UWoa4EzA2Dn87/RlYwC3KjobETLYyEkCmj6UrrpKp25BpZ/PuzpID kIkA== X-Received: by 10.68.212.167 with SMTP id nl7mr34232094pbc.12.1358217877068; Mon, 14 Jan 2013 18:44:37 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id ot3sm9261401pbb.38.2013.01.14.18.44.34 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 18:44:36 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 15 Jan 2013 11:44:30 +0900 From: YongHyeon PYUN Date: Tue, 15 Jan 2013 11:44:30 +0900 To: Ruslan Makhmatkhanov Subject: Re: if_vr(4) and DFE520-TX Message-ID: <20130115024430.GA3152@michelle.cdnetworks.com> References: <50F110AB.1030107@yandex.ru> <50F14880.4090001@yandex.ru> <50F177E9.3040003@yandex.ru> <20130114061553.GA3531@michelle.cdnetworks.com> <50F3F172.5060903@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <50F3F172.5060903@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: Tue, 15 Jan 2013 02:44:38 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 14, 2013 at 03:52:18PM +0400, Ruslan Makhmatkhanov wrote: > YongHyeon PYUN wrote on 14.01.2013 10:15: > >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: > > [...] > > >>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+. > > Here they are. Both front and back for the case (see no traces of > RealTek though): > > http://s2.postimage.org/9nvkrlpqx/IMAG1040.jpg > http://s2.postimage.org/4qi06hnrt/IMAG1041.jpg Thanks. Try attached patch and let me know how it works. If that patch does not work, try setting a loader tunable like the following. dev.rl.0.prefer_iomap=0 --6c2NcOVqGQ03X4Wi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="dlink_dfe520.diff" diff -r ffd9aeb1e7ef sys/dev/re/if_re.c --- a/sys/dev/re/if_re.c Mon May 07 23:58:27 2012 +0200 +++ b/sys/dev/re/if_re.c Tue Jan 15 01:10:46 2013 +0100 @@ -174,6 +174,8 @@ static const struct rl_type const re_devs[] = { { DLINK_VENDORID, DLINK_DEVICEID_528T, 0, "D-Link DGE-528(T) Gigabit Ethernet Adapter" }, + { DLINK_VENDORID, DLINK_DEVICEID_520TX, 0, + "D-Link DFE-520(TX) Gigabit Ethernet Adapter" }, { DLINK_VENDORID, DLINK_DEVICEID_530T_REVC, 0, "D-Link DGE-530(T) Gigabit Ethernet Adapter" }, { RT_VENDORID, RT_DEVICEID_8139, 0, @@ -1214,7 +1216,7 @@ * Because RTL8169SC does not seem to work when memory mapping * is used always activate io mapping. */ - if (devid == RT_DEVICEID_8169SC) + if (devid == RT_DEVICEID_8169SC || devid == DLINK_DEVICEID_520TX) prefer_iomap = 1; if (prefer_iomap == 0) { sc->rl_res_id = PCIR_BAR(1); diff -r ffd9aeb1e7ef sys/pci/if_rlreg.h --- a/sys/pci/if_rlreg.h Mon May 07 23:58:27 2012 +0200 +++ b/sys/pci/if_rlreg.h Tue Jan 15 01:10:46 2013 +0100 @@ -1048,6 +1048,11 @@ #define DLINK_DEVICEID_530TXPLUS 0x1300 /* + * D-Link DFE-520TX device ID + */ +#define DLINK_DEVICEID_520TX 0x4200 + +/* * D-Link DFE-5280T device ID */ #define DLINK_DEVICEID_528T 0x4300 --6c2NcOVqGQ03X4Wi--