Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027537rwb; Mon, 15 Aug 2022 16:25:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZxXAY6Dkytxi3tCy0Hzk8Boofd0bjuyisazHqYg8pTU+0Go1ND1VKEQ4ttvu7lnj4UsvX X-Received: by 2002:a65:498b:0:b0:412:8e4:2842 with SMTP id r11-20020a65498b000000b0041208e42842mr15745128pgs.71.1660605955212; Mon, 15 Aug 2022 16:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605955; cv=none; d=google.com; s=arc-20160816; b=BJ7ywsYLar7qHsBonot2/6wWYLyssXC7wxVBXtJatRwsWuzAOnhjyUIzVrZR8ilkGI M31ZXQsZHIlZUi6ptTfMk6LJDzUOHUo5Rxawo4gocp0rR5wgjvjGshTm2qa2KzvNRkyN feiT2wKR5oN68vU72CuUJr6FHDvWh5ZK/8XJyNJz4kITiRISPsm/dIyoJNXvecM27FCq 1wuIGAZX02rmGFw5BINSA/eHzmRgTL/WAB7zD0m1BsX2hdItkwaTUl5RGM/ZGqov7l29 GdBiAw1y3TYvb+2eyUPz3x6vrzdEKwGJc9TasxUrrFsZkowqSw6LB4Mm4iwXjb2T+NZu 0nyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CtEx27sOm4qUdditauMek6otxgcEPwv5129AVwKUbUQ=; b=tArOKGxmyJPpOpgh44Q0b7ZBtEtaXFlUueCQQLXuA+DXSD42gY2x45Vp8c4PO+brRX CpJ6nYD7UwOxPfi5KqfRnHNshqy1fqlTlh1fUo0Q47U+u39RC5CtWuUdW5KilBUYDarw JXkdtVbMoq3SIQ59ivTFZPEiU1JH/zIUwA5brz9Mjg23nmxs339Iy1mXe0to9WKVPLfL qty/6i+13t8f+A7alkCXRSR2YZLsgI7DiKLmAvWYePigtXG8biljsrVn4N/GYST4VBBO wRW7gm3RIHd+cSN11A3D2Ja4lYxcMLw2aPB9MEzAtYGL8pR21E7DIQET7ZOmcau/kByK kLvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ye9a+lfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ha1-20020a17090af3c100b001f535a66012si15911043pjb.70.2022.08.15.16.25.44; Mon, 15 Aug 2022 16:25:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ye9a+lfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241137AbiHOXPc (ORCPT + 99 others); Mon, 15 Aug 2022 19:15:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244510AbiHOXOX (ORCPT ); Mon, 15 Aug 2022 19:14:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4815C7B1E4; Mon, 15 Aug 2022 13:01:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C1D6FB80EAD; Mon, 15 Aug 2022 20:01:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13D6EC433D6; Mon, 15 Aug 2022 20:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593675; bh=RFuo3WxZHd0czDWPWQq5UQkkkavjlJKyFlZDppA2rJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ye9a+lfIbFO4FCFcltTrjeGwHIaGb0aIYlYpzT+Zob/RDvck4G/yNvK9ZYwqdH/Sg rKDhKBmxEQ9BmPUjXQToNftxIaBqvdzpQs1clGyjKtaQcML0R0u4zBSsgfErbRJ6mX 2mluBBiv8Paz5VDJovcfH0ZP1urCCSlN6VHnF80o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Andrew Lunn , "David S. Miller" , Sasha Levin , Oleksij Rempel , Ferry Toth Subject: [PATCH 5.18 0985/1095] usbnet: smsc95xx: Dont clear read-only PHY interrupt Date: Mon, 15 Aug 2022 20:06:24 +0200 Message-Id: <20220815180509.873447422@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lukas Wunner [ Upstream commit 3108871f19221372b251f7da1ac38736928b5b3a ] Upon receiving data from the Interrupt Endpoint, the SMSC LAN95xx driver attempts to clear the signaled interrupts by writing "all ones" to the Interrupt Status Register. However the driver only ever enables a single type of interrupt, namely the PHY Interrupt. And according to page 119 of the LAN950x datasheet, its bit in the Interrupt Status Register is read-only. There's no other way to clear it than in a separate PHY register: https://www.microchip.com/content/dam/mchp/documents/UNG/ProductDocuments/DataSheets/LAN950x-Data-Sheet-DS00001875D.pdf Consequently, writing "all ones" to the Interrupt Status Register is pointless and can be dropped. Tested-by: Oleksij Rempel # LAN9514/9512/9500 Tested-by: Ferry Toth # LAN9514 Signed-off-by: Lukas Wunner Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/smsc95xx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index edf0492ad489..2cb44d65bbc3 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -572,10 +572,6 @@ static int smsc95xx_link_reset(struct usbnet *dev) unsigned long flags; int ret; - ret = smsc95xx_write_reg(dev, INT_STS, INT_STS_CLEAR_ALL_); - if (ret < 0) - return ret; - spin_lock_irqsave(&pdata->mac_cr_lock, flags); if (pdata->phydev->duplex != DUPLEX_FULL) { pdata->mac_cr &= ~MAC_CR_FDPX_; -- 2.35.1