On 2021/07/20 11:03, adrian...@fortix.com.ar wrote:
> >Description:
>       The ure driver with the RTL8152 adapter does not respond if the device 
> is UP before having ethernet link. The dmesg command displays the following 
> lines when the error occurs:

Oh I hit that the other day, forgot the silly thinkpad donlge and tried
a ure instead, but I didn't figure out that there was a way to get it to
work. RTL8153B in my case.

ure0: RTL8153B (0x6010), address 00:e0:4c:38:2b:0f
rgephy0 at ure0 phy 0: RTL8251 PHY, rev. 0
ure0: usb error on tx: IOERROR
ure0: usb error on tx: IN_PROGRESS
usb_insert_transfer: xfer=0xfffffd847bccd000 not free
ure0: usb error on tx: IOERROR
ure0: usb error on tx: IN_PROGRESS
usb_insert_transfer: xfer=0xfffffd847bccd230 not free

On 2021/07/20 21:44, Marcus Glocker wrote:
> I don't have such a device here.  But one reason could be that ure(4)
> isn't reading the link status correctly.  Following a debug diff.  If
> you could run it with the cable disconnected and then connected and
> send back the output please.

It's not triggered, that function is only called if
(sc->ure_flags & URE_FLAG_8156).

> Index: if_ure.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_ure.c,v
> retrieving revision 1.24
> diff -u -p -u -p -r1.24 if_ure.c
> --- if_ure.c  15 Apr 2021 02:23:17 -0000      1.24
> +++ if_ure.c  20 Jul 2021 19:38:41 -0000
> @@ -576,6 +576,13 @@ ure_link_state(struct ure_softc *sc)
>  int
>  ure_get_link_status(struct ure_softc *sc)
>  {
> +     uint8_t status1;
> +     uint16_t status2;
> +
> +     status1 = ure_read_1(sc, URE_PLA_PHYSTATUS, URE_MCU_TYPE_PLA);
> +     status2 = ure_read_2(sc, URE_PLA_PHYSTATUS, URE_MCU_TYPE_PLA);
> +     printf("link status1=0x%x, status2=0x%x\n", status1, status2);
> +
>       if (ure_read_2(sc, URE_PLA_PHYSTATUS, URE_MCU_TYPE_PLA) &
>           URE_PHYSTATUS_LINK) {
>               sc->ure_flags |= URE_FLAG_LINK;
> 

Reply via email to