Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Sep 2019 17:29:16 -0700
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r351616 - head/sys/dev/usb/net
Message-ID:  <20190902002916.GA25603@bluezbox.com>
In-Reply-To: <201908300005.x7U055YI057385@repo.freebsd.org>
References:  <201908300005.x7U055YI057385@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Gleb Smirnoff (glebius@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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190902002916.GA25603>