From owner-freebsd-net@FreeBSD.ORG Tue Jan 15 06:51:15 2013 Return-Path: Delivered-To: freebsd-net@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 0A3BAB90; Tue, 15 Jan 2013 06:51:15 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by mx1.freebsd.org (Postfix) with ESMTP id BBAEAFA5; Tue, 15 Jan 2013 06:51:14 +0000 (UTC) Received: by mail-pb0-f45.google.com with SMTP id mc8so2660894pbc.4 for ; Mon, 14 Jan 2013 22:51:08 -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=qFZdu9rx6Trr8alvy1WPOxigO9kEk2EgVXxqdrOyxgA=; b=tdRkm3uulKvIEvg3KvvHCPRIzsoxwdBgKZEoM8IFtmpvlyKmvAxfzC9A0RJiObJgJ4 zfpdgkbuhJW1u9y5lVp+9t1XZ8ibji4Lvh9v62ngYm+TntMCWbbN3U68adWqpUvHR4D7 vfx1A7NiUD3jgS6YTw7onJmq4NG9fgCJ79+2Hk1jl34GvrkrXNPb+9S2Ioi5xa6FOIR2 47W5zmeZckQrfvljnRI/g6+Tqh7IYWIiaEuAPaFF0sj4GzFfk4aP09UzgNa121r+kAMb gy4QMp0rGafi7lhoqfD0cb8MBy47J3b77hLdg78DnDu6ozTx1Ltc8mnwoOYRKZc+r/6V k5Wg== X-Received: by 10.66.85.74 with SMTP id f10mr238867472paz.38.1358232668776; Mon, 14 Jan 2013 22:51:08 -0800 (PST) Received: from pyunyh@gmail.com (lpe4.p59-icn.cdngp.net. [114.111.62.249]) by mx.google.com with ESMTPS id sk1sm9672598pbc.0.2013.01.14.22.51.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jan 2013 22:51:08 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 15 Jan 2013 15:51:03 +0900 From: YongHyeon PYUN Date: Tue, 15 Jan 2013 15:51:03 +0900 To: Ruslan Makhmatkhanov Subject: Re: if_vr(4) and DFE520-TX Message-ID: <20130115065103.GC1434@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> <20130115024430.GA3152@michelle.cdnetworks.com> <50F4F7E6.7070004@yandex.ru> <20130115064011.GA1434@michelle.cdnetworks.com> <50F4FB8A.6090100@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50F4FB8A.6090100@yandex.ru> User-Agent: Mutt/1.4.2.3i Cc: Jeremie Le Hen , 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 06:51:15 -0000 On Tue, Jan 15, 2013 at 10:47:38AM +0400, Ruslan Makhmatkhanov wrote: > YongHyeon PYUN wrote on 15.01.2013 10:40: > >On Tue, Jan 15, 2013 at 10:32:06AM +0400, Ruslan Makhmatkhanov wrote: > >>YongHyeon PYUN wrote on 15.01.2013 06:44: > >>>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 > >> > >>Terrific! It's now attaching fine, but network over it doesn't seems > >>working (can't ping/access machine via this interface): > > > >Please use my patch. I think rl(4) is the right driver for your > >controller. Jeremie's patch forces re(4) to attach. > > To be honest, your and Jeremie patches are identical. Your patch is > against if_re/if_rlreg.h too :) Hmm, I don't get it. Diff inlined again. Index: sys/pci/if_rlreg.h =================================================================== --- sys/pci/if_rlreg.h (revision 245199) +++ sys/pci/if_rlreg.h (working copy) @@ -1048,6 +1048,11 @@ struct rl_softc { #define DLINK_DEVICEID_530TXPLUS 0x1300 /* + * D-Link DFE-520TX rev. C1 device ID + */ +#define DLINK_DEVICEID_520TX_REVC1 0x4200 + +/* * D-Link DFE-5280T device ID */ #define DLINK_DEVICEID_528T 0x4300 Index: sys/pci/if_rl.c =================================================================== --- sys/pci/if_rl.c (revision 245199) +++ sys/pci/if_rl.c (working copy) @@ -148,6 +148,8 @@ static const struct rl_type rl_devs[] = { "Delta Electronics 8139 10/100BaseTX" }, { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139, RL_8139, "Addtron Technology 8139 10/100BaseTX" }, + { DLINK_VENDORID, DLINK_DEVICEID_520TX_REVC1, RL_8139, + "D-Link DFE-520TX (rev. C1) 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_530TXPLUS, RL_8139, "D-Link DFE-530TX+ 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_690TXD, RL_8139, > > >>re0: flags=8843 metric 0 mtu > >>1500 > >>options=8209b > >> ether 90:94:e4:82:d5:e6 > >> inet 192.168.0.208 netmask 0xffffff00 broadcast 192.168.0.255 > >> inet6 fe80::9294:e4ff:fe82:d5e6%re0 prefixlen 64 scopeid 0x5 > >> nd6 options=29 > >> media: Ethernet autoselect (100baseTX ) > >> status: active > >> > >>re0@pci0:4:1:0: class=0x020000 card=0x11031186 chip=0x42001186 > >>rev=0x10 hdr=0x00 > >> vendor = 'D-Link System Inc' > >> class = network > >> subclass = ethernet > >> > >>I also tried to add dev.rl.0.prefer_iomap=0 to /boot/loader.conf with no > >>difference. I'll try to experiment with this later this day when there > >>will be no active users on this machine, then let you know the results. > > > >It's not a valid option when you use re(4). > > > >>Thank you! > > Yes, it was unmindful copy/paste, sorry. > > -- > Regards, > Ruslan > > Tinderboxing kills... the drives.