Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1857774rwb; Fri, 19 Aug 2022 10:32:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR44KS1/r/ysTmzOH1/9g8DnMi8bdB5sYt6O1kN2XYphu7Uz9lUaOyI/dNfYUQ12hQP/HTMK X-Received: by 2002:a17:903:190:b0:16f:642:1a72 with SMTP id z16-20020a170903019000b0016f06421a72mr8904209plg.113.1660930347378; Fri, 19 Aug 2022 10:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930347; cv=none; d=google.com; s=arc-20160816; b=Bdf/noDds9CkQe4uvzYTfaUzosJ6WZcUnPE26lYZCq4vVTYil1avb5jOYNYdtw9SwK h+DmyfZfU0rQHy6YYdT+tB1nz2/MBZdldd4LI6F9T8AWGdkX9IfRk0L2iS5zCNQnuxwh slMeg1OK18tyn44796r1fUwalrhBXj9GSASTad2KH13mjdNbzmMQQC92jAv6bCTCS+xU 1tjK8VLeXJ6vlLNooKqQTFv+bEYIzYm/i4ovC0+Gt152CK1hqzihozKszwxujrtnUv73 iLBa4eT6H4qQ2yaDjvLI9KSM2IYaM/smqVcPgmE7PIYWuu3VOf2ZGmgSwCFlOPhO1lpD 14Og== 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=9SQMeZbiaL8y5uX58HPxR22kvCWKhc4ccWYEs8jKg6s=; b=hmeLi44iI4ffmUmFfBUYmBMYnU+w8+G2FH2K3y/33WS2ENWKnV4QoUZ2B3n6EyJtB3 2ZVCzp8YjpirDaQJhunztoawCRwbl4/TdfixsT76JaAawBLCBhbcPdiaFXjAEjx/8o4g Pj8RuyP6oRJYa2jj4Zl/QujfMNgFIuBlSuEXwRpXLQd5Dvvqe16u6ux0PvzWUJJHEQpW Al9AnLgRcZGJpD0Q2mCKyZ6mP6BIORO8AwO7oLylnpD7saF2txonANr4HzX9AgkY9XYe oAoRA1So7e3Pw8O/wGSGhgsagIjDIdID45Jj4kdC1co9jhZIyLhgDYVMpOmCJ5NRgPBh ADXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WnRXXviz; 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 e24-20020a637458000000b0042268f5eb68si4600887pgn.130.2022.08.19.10.32.16; Fri, 19 Aug 2022 10:32:27 -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=WnRXXviz; 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 S1353839AbiHSQop (ORCPT + 99 others); Fri, 19 Aug 2022 12:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354094AbiHSQlr (ORCPT ); Fri, 19 Aug 2022 12:41:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A455112847F; Fri, 19 Aug 2022 09:10:31 -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 dfw.source.kernel.org (Postfix) with ESMTPS id C60E761861; Fri, 19 Aug 2022 16:09:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD9B2C43470; Fri, 19 Aug 2022 16:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925353; bh=AUCerK9XH4FBAwVk7/scMA0QJUrR5R/M7yfoBaW/UjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WnRXXviz760PPFfQEFOuwqUFD7yWINe6SCnlVXIjR9XpqlVfpbJBCOnjEqwYAAd6D qPKHuiBPEiILw2YsfcOesNjR4OlLOKQO+utvehWxPB1oMRFb3KNjjWKB9ZGmse+qmV +QskScC1cNlep0ostI8UHecUg3puJJYv1x9mVNwE= 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.10 464/545] usbnet: smsc95xx: Dont clear read-only PHY interrupt Date: Fri, 19 Aug 2022 17:43:54 +0200 Message-Id: <20220819153850.160518535@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 e5b744851146..b1d7331c3c5c 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -570,10 +570,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