From patchwork Tue May 3 13:15: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: 12835770 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 9B890C433FE for ; Tue, 3 May 2022 13:15:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236002AbiECNSi (ORCPT ); Tue, 3 May 2022 09:18:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235385AbiECNSg (ORCPT ); Tue, 3 May 2022 09:18:36 -0400 Received: from mailout3.hostsharing.net (mailout3.hostsharing.net [IPv6:2a01:4f8:150:2161:1:b009:f236:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00B432ED6C; Tue, 3 May 2022 06:15:03 -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 mailout3.hostsharing.net (Postfix) with ESMTPS id 3AEEC101E6B56; Tue, 3 May 2022 15:15:02 +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 033F1630FA12; Tue, 3 May 2022 15:15:01 +0200 (CEST) X-Mailbox-Line: From 95ff93fffa161a7a96604b4dfe2be933fe740785 Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Tue, 3 May 2022 15:15:00 +0200 Subject: [PATCH net-next v2 0/7] Polling be gone on LAN95xx To: "David S. Miller" , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, Steve Glendinning , UNGLinuxDriver@microchip.com, Oliver Neukum , Andre Edich , Oleksij Rempel , Martyn Welch , Gabriel Hojda , Christoph Fritz , Lino Sanfilippo , Philipp Rosenberger , Heiner Kallweit , Andrew Lunn , Russell King , Ferry Toth 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. Link to v1: https://lore.kernel.org/netdev/cover.1651037513.git.lukas@wunner.de/ Changes since v1: * Patch [4/7]: * Silence "Error updating MAC full duplex mode" warning if it's caused by hot-removal. (Oleksij Rempel) * Explain in commit message why a semicolon on a line by itself is temporarily added in smsc95xx_status(). (Andrew Lunn) * Patch [5/7]: * Eliminate a checkpatch "no space before tabs" warning. * Explain in commit message why the call to phy_init_hw() is moved in smsc95xx_resume(). * Patch [6/7]: * Expand commit message to explain in greater detail why caching the interrupt mask is beneficial. (Andrew Lunn) 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 | 157 ++++++++++++++++----------------- drivers/net/usb/usbnet.c | 6 +- 4 files changed, 93 insertions(+), 104 deletions(-)