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?