if_vr(4) and DFE520-TX

YongHyeon PYUN pyunyh at gmail.com
Mon Jan 14 06:16:06 UTC 2013


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: <D-Link System Inc 4200 10/100BaseTX> 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: <D-Link System Inc 4200 10/100BaseTX> 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 at 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


More information about the freebsd-net mailing list