From owner-freebsd-net@FreeBSD.ORG Sat Jan 12 14:49:25 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 15BC994F for ; Sat, 12 Jan 2013 14:49:25 +0000 (UTC) (envelope-from cvs-src@yandex.ru) Received: from forward4h.mail.yandex.net (forward4h.mail.yandex.net [IPv6:2a02:6b8:0:f05::4]) by mx1.freebsd.org (Postfix) with ESMTP id 89ED6AEC for ; Sat, 12 Jan 2013 14:49:24 +0000 (UTC) Received: from smtp1h.mail.yandex.net (smtp1h.mail.yandex.net [84.201.187.144]) by forward4h.mail.yandex.net (Yandex) with ESMTP id 247E91B21591 for ; Sat, 12 Jan 2013 18:49:23 +0400 (MSK) Received: from smtp1h.mail.yandex.net (localhost [127.0.0.1]) by smtp1h.mail.yandex.net (Yandex) with ESMTP id E383B13401D2; Sat, 12 Jan 2013 18:49:22 +0400 (MSK) Received: from unknown (unknown [77.66.155.61]) by smtp1h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id nM00R2u7-nM0Olmwc; Sat, 12 Jan 2013 18:49:22 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1358002162; bh=fZsZAOwfNUcuzte6E+uFh060+A3O5zjv/zlTeoIjR10=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=SflkHVFdFclxRJ7m5sPhMiFrWYLSdxV9oVfS8D/JzqWdr7XzLo6Ysku44+0pip4mb lgzT9aOd1jfJHcoTfEKUWrE/7wafbtQrlwLsCiR5qWWKEY3XQ1tF6+3ZweGb3sR8Pq TuZcX5AKaAKH1iOSa/43N5YUT+vCk29Yud+f0gsk= Message-ID: <50F177E9.3040003@yandex.ru> Date: Sat, 12 Jan 2013 18:49:13 +0400 From: Ruslan Makhmatkhanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ruslan Makhmatkhanov Subject: Re: if_vr(4) and DFE520-TX References: <50F110AB.1030107@yandex.ru> <50F14880.4090001@yandex.ru> In-Reply-To: <50F14880.4090001@yandex.ru> Content-Type: multipart/mixed; boundary="------------060106060202080800060809" Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jan 2013 14:49:25 -0000 This is a multi-part message in MIME format. --------------060106060202080800060809 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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? 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. --------------060106060202080800060809 Content-Type: text/plain; charset=UTF-8; name="vr-4200.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vr-4200.diff.txt" 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 --------------060106060202080800060809--