On Fri, Apr 01, 2022 at 12:06:02PM +1000, Jonathan Matthew wrote:
>
> On Thu, Mar 31, 2022 at 09:41:09PM +0800, Kevin Lo wrote:
> > Hi,
> >
> >
> >
> > This diff adds preliminary support for RTL8156B to ure(4) and
> > bug fixes for RTL8153/RTL8156.
> >
> > Tested:
> > ure0 at uhub0 port 12 configuration 1 interface 0 "Realtek USB
> > 10/100/1G/2.5G LAN" rev 3.20/31.00 addr 3
> > ure0: RTL8156B (0x7410), address 00:e0:4c:xx:xx:xx
>
> Works OK here:
>
> ure0 at uhub0 port 2 configuration 1 interface 0 "Realtek USB 10/100 LAN" rev
> 2.10/20.00 addr 2
> ure0: RTL8152 (0x4c00), address 00:e0:4c:xx:xx:xx
> rlphy0 at ure0 phy 0: RTL8201E 10/100 PHY, rev. 2
>
> Regarding this part:
>
> > @@ -1914,7 +2026,7 @@ ure_rxeof(struct usbd_xfer *xfer, void *
> > total_len -= roundup(pktlen, URE_RX_BUF_ALIGN);
> > buf += sizeof(rxhdr);
> >
> > - m = m_devget(buf, pktlen, ETHER_ALIGN);
> > + m = m_devget(buf, pktlen - ETHER_CRC_LEN, ETHER_ALIGN);
> > if (m == NULL) {
> > DPRINTF(("unable to allocate mbuf for next packet\n"));
> > ifp->if_ierrors++;
>
> We tried this earlier (r1.22 of if_ure.c) and had to back it out because it
> didn't work on some devices. Have we worked out what the problem was there?
First off, thanks for testing! I recall this problem. I used speedtest-cli
to test the connection speed at home, significant drop in download speed with
r1.22.
With my latest diff, no regressions seen on so far:
ure0: RTL8153 (0x5c10), address 00:e0:4c:xx:xx:xx
rgephy1 at ure0 phy 0: RTL8251 PHY, rev. 0
ure0: RTL8153B (0x6010), address f4:28:53:xx:xx:xx
rgephy1 at ure0 phy 0: RTL8251 PHY, rev. 0
ure0 at uhub0 port 4 configuration 1 interface 0 "Planex USB 10/100/1G/2.5G
LAN" rev 2.10/30.00 addr 5
ure0: RTL8156 (0x7030), address 1c:c0:35:xx:xx:xx