On Sat, Mar 19, 2016 at 05:09:34PM -0400, Brandon Mercer wrote:
> I've recently acquired a usb3.0->gigabit ethernet adapter. It did not
> attach reliably, pass traffic reliably, and it made my machine panic
> when I unplugged it. Takahiro HAYASHI suggested that the reset
> code doesn't do anything and that it should initialize the chip. Indeed
> that does seem to help. I also adopted a change that netbsd made to
> lock the mii before trying to write to it during initialization. 
> 
> It appears that the eeprom code is going to be left to rot, so I deleted
> that as well. I've only been able to test this on my device. Feedback is
> welcomed. 

Tested with 

axen0 at uhub2 port 2 configuration 1 interface 0 "ASIX Elec. Corp. AX88179" 
rev 2.10/1.00 addr 4
axen0: AX88179, address 80:1f:02:37:dc:89
rgephy0 at axen0 phy 3: RTL8169S/8110S/8211 PHY, rev. 5

Works fine. ifconfig axen0 lladdr random seems to be broken but I don't
think that's a new issue since the driver only copies the address from
hardware and never writes it back to hardware in case upper layers change it.

ok stsp@

> Index: dev/usb/if_axen.c
> @@ -399,69 +395,13 @@ axen_reset(struct axen_softc *sc)
>       if (usbd_is_dying(sc->axen_udev))
>               return;
>       /* XXX What to reset? */

Don't you want to remove the above comment as well?

> +     axen_ax88179_init(sc);
>       /* Wait a little while for the chip to get its brains in order. */
>       DELAY(1000);
>       return;
>  }

Reply via email to