From patchwork Wed Apr 27 05:48:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 12828294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AA56C4332F for ; Wed, 27 Apr 2022 05:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357917AbiD0GAU (ORCPT ); Wed, 27 Apr 2022 02:00:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357916AbiD0GAS (ORCPT ); Wed, 27 Apr 2022 02:00:18 -0400 X-Greylist: delayed 459 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 26 Apr 2022 22:57:08 PDT Received: from mailout1.hostsharing.net (mailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5fcc:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38C0D2BB1F; Tue, 26 Apr 2022 22:57:07 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1" (verified OK)) by mailout1.hostsharing.net (Postfix) with ESMTPS id EA04F1033C2C7; Wed, 27 Apr 2022 07:49:26 +0200 (CEST) Received: from localhost (unknown [89.246.108.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id BC6BC61ABA99; Wed, 27 Apr 2022 07:49:26 +0200 (CEST) X-Mailbox-Line: From 62b8375ae008035bcaa85c348ea4aa80c519bb07 Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Wed, 27 Apr 2022 07:48:00 +0200 Subject: [PATCH net-next 0/7] Polling be gone on LAN95xx To: Steve Glendinning , UNGLinuxDriver@microchip.com, Oliver Neukum , "David S. Miller" , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, Andre Edich , Oleksij Rempel , Martyn Welch , Gabriel Hojda , Christoph Fritz , Lino Sanfilippo , Philipp Rosenberger , Heiner Kallweit , Andrew Lunn , Russell King Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Do away with link status polling on LAN95XX USB Ethernet and rely on interrupts instead, thereby reducing bus traffic, CPU overhead and improving interface bringup latency. The meat of the series is in patch [5/7]. The preceding and following patches are various cleanups to prepare for and adjust to interrupt-driven link state detection. Please review and test. Thanks! Lukas Wunner (7): usbnet: Run unregister_netdev() before unbind() again usbnet: smsc95xx: Don't clear read-only PHY interrupt usbnet: smsc95xx: Don't reset PHY behind PHY driver's back usbnet: smsc95xx: Avoid link settings race on interrupt reception usbnet: smsc95xx: Forward PHY interrupts to PHY driver to avoid polling net: phy: smsc: Cache interrupt mask net: phy: smsc: Cope with hot-removal in interrupt handler drivers/net/phy/smsc.c | 28 +++--- drivers/net/usb/asix_devices.c | 6 +- drivers/net/usb/smsc95xx.c | 155 ++++++++++++++++----------------- drivers/net/usb/usbnet.c | 6 +- 4 files changed, 91 insertions(+), 104 deletions(-) Tested-by: Oleksij Rempel Tested-by: Ferry Toth (Intel Edison-Arduino)