From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB6E643E490 for ; Wed, 6 May 2026 12:58:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778072319; cv=none; b=YCyHVzhAQSe0HBYkTvft8eYQnkUPaprbQ8oQSzz6EjZEMDr3+FGHlNQ3NB/0Urh11UxOCKAgfApeWDlr4w8PKQs9vmbz35mFOYj4+KSKdlYASqMCJKLJSEI4jq8CokhPCB+5pSBWPfDB4PA7VvuaY3QVvzsTVadgbr6I0UreyKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778072319; c=relaxed/simple; bh=z9jqkhW0V6ud7bKJ/0boSGhrhI5MbHlXZNIajKm0+1E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h9ikhclUsKkNLFDf95hDitJKYXQW7oB1I4s+iNz53F4VDqitmkIChHXnRNNtAN7L5YINB7aDauh8TqQxPajQPTon95YDJKwjZghyuObi7DEixgIVxaSv6ddFBMFoC+vDTkSHHH6X3221BNMcUrrOTYWxbJPMVL6V9BJOXjh+lUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1wKbpO-0001SE-Jy; Wed, 06 May 2026 14:58:14 +0200 Received: from pty.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::c5]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wKbpL-000kKR-1k; Wed, 06 May 2026 14:58:11 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.98.2) (envelope-from ) id 1wKbpL-00000003UPo-3cWl; Wed, 06 May 2026 14:58:11 +0200 Date: Wed, 6 May 2026 14:58:11 +0200 From: Oleksij Rempel To: Markus Baier Cc: Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , Ethan Nelson-Moore , Miaoqian Lin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net] net: usb: asix: ax88772: replace usbnet_link_change() with queue_work() and usbnet_unlink_rx_urbs() Message-ID: References: <20260506010344.184636-1-Markus.Baier@soslab.tu-darmstadt.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260506010344.184636-1-Markus.Baier@soslab.tu-darmstadt.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Wed, May 06, 2026 at 03:03:44AM +0200, Markus Baier wrote: > Commit 36bdc0e815b4 ("net: usb: asix: ax88772: re-add usbnet_link_change() > in phylink callbacks") restored the link-change notification that was > lost during the phylink migration, by calling usbnet_link_change() from > the phylink mac_link_up() / mac_link_down() callbacks. > > While this fixed the original symptom (RX URB submission not being > initiated after link up), usbnet_link_change() also calls > netif_carrier_off() on link-down, which is redundant in a phylink-based > driver because phylink manages the carrier state itself. > > Replace the usbnet_link_change() calls with the minimal operations: > > - In ax88772_mac_link_up(), schedule dev->bh_work directly via > queue_work(system_bh_wq, &dev->bh_work). This is the same > mechanism usbnet_open() uses to schedule the bottom-half > that submits RX URBs. > > - In ax88772_mac_link_down(), call usbnet_unlink_rx_urbs() to > return any in-flight RX URBs to the host controller. > This releases USB bandwidth and avoids keeping unused buffers > queued while the link is down. This is the symmetric > counterpart to scheduling new RX URBs on link up. > > Tested with the Apple A1277 USB Ethernet Adapter (05ac:1402, > AX88772A based) on a Banana Pro (Allwinner A20). > > Fixes: 36bdc0e815b4 ("net: usb: asix: ax88772: re-add usbnet_link_change() in phylink callbacks") > Assisted-by: Claude:claude-opus-4-7 > Signed-off-by: Markus Baier Tested on AX88772C. Thx! Tested-by: Oleksij Rempel -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |