svn commit: r351616 - head/sys/dev/usb/net

Oleksandr Tymoshenko gonzo at bluezbox.com
Mon Sep 2 00:29:26 UTC 2019


Gleb Smirnoff (glebius at 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);
 	}


More information about the svn-src-head mailing list