From patchwork Thu May 12 08:42: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: 572022 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 E80CDC433F5 for ; Thu, 12 May 2022 08:43:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347001AbiELInE (ORCPT ); Thu, 12 May 2022 04:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346555AbiELInB (ORCPT ); Thu, 12 May 2022 04:43:01 -0400 Received: from mailout1.hostsharing.net (mailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5fcc:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78E053ED2D; Thu, 12 May 2022 01:42:59 -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 52EC8101917A2; Thu, 12 May 2022 10:42:57 +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 3042761C2B10; Thu, 12 May 2022 10:42:57 +0200 (CEST) X-Mailbox-Line: From 4a90661372af73e056f7b243df9c039945715a3b Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Thu, 12 May 2022 10:42:00 +0200 Subject: [PATCH net-next v3 0/7] Polling be gone on LAN95xx To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet 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: linux-usb@vger.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 v2: https://lore.kernel.org/netdev/cover.1651574194.git.lukas@wunner.de/ Only change since v2: * Patch [5/7]: * Drop call to __irq_enter_raw() which worked around a warning in generic_handle_domain_irq(). That warning is gone since 792ea6a074ae (queued on tip.git/irq/urgent). (Marc Zyngier, Thomas Gleixner) 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 | 152 +++++++++++++++------------------ drivers/net/usb/usbnet.c | 6 +- 4 files changed, 88 insertions(+), 104 deletions(-) Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Tested-by: Marek Szyprowski