Gleb Smirnoff (gleb...@freebsd.org) wrote:
> Author: glebius
> Date: Fri Aug 30 00:05:04 2019
> New Revision: 351616
> URL: https://svnweb.freebsd.org/changeset/base/351616
> 
> Log:
>   Use mbuf queue instead of ifqueue in USB network drivers.

Hi Gleb,

This change broke NFS root on RPi. I suspect it's not just NFS root
but USB ethernet functionality in general. Patch below fixes it for me.
The same patch probably should also be applied to if_axe and if_axge.

Index: sys/dev/usb/net/usb_ethernet.c
===================================================================
--- sys/dev/usb/net/usb_ethernet.c      (revision 351673)
+++ sys/dev/usb/net/usb_ethernet.c      (working copy)
@@ -219,6 +219,7 @@
        ue->ue_unit = alloc_unr(ueunit);
        usb_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0);
        sysctl_ctx_init(&ue->ue_sysctl_ctx);
+       mbufq_init(&ue->ue_rxq, ifqmaxlen);
 
        error = 0;
        CURVNET_SET_QUIET(vnet0);
@@ -330,6 +331,9 @@
                /* free sysctl */
                sysctl_ctx_free(&ue->ue_sysctl_ctx);
 
+               /* drain mbuf queue */
+               mbufq_drain(&ue->ue_rxq);
+
                /* free unit */
                free_unr(ueunit, ue->ue_unit);
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to