Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2886436rwb; Mon, 15 Aug 2022 13:19:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Pzyuwl9//obpC1OXQnQuUtrkEDY0Y3KgVzPNGhEcMmdAqhoaKWc3/w8YEWJaW/NnwMR9d X-Received: by 2002:a17:906:8446:b0:730:ab78:2353 with SMTP id e6-20020a170906844600b00730ab782353mr11238680ejy.625.1660594748994; Mon, 15 Aug 2022 13:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594748; cv=none; d=google.com; s=arc-20160816; b=Szx8zgtJp9BFz9rIXJIXbdqEbipWLirCBi/mSgbPBop3je8R4JTMDTQGC+zLA0G6yw fvbiqNga95puly41idI6ICrhlDjYS3q9BLpQCfXqbvv4wH9eqzfVhiTd/VioTFOlMzlL 0kuDL3yvnE5v99JbzVue4eSdL7Il6cI5nWw7GX2impLTcBR7UXARNt4FSlmZSVTKneUf bJrQzjyPDNLmGAmQn/BCASW+Ihn7f3nfg4ATCIcgzaTnLQyZQHvmmfe7wLrWtgdBIDxX quIwilflwas3/ERYDEUKZBWQ5PZuY2Nreso8HQ3QCcxg/zPUDPrZBvFHXUgxPLF/31qz OpNA== 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=kzsBecgUwTpeIufM4szi9SFoXqavoc97W5lnoeM1KY4=; b=rhHcAS41BX69guznlFiDJbgpVw5yBV6F24ZzcT5IXQGQ0gYeod8Ec+ZpIyjy48jBe7 fEY1Huf2GDVBcowIdLSFFVvWN3xEUKa6YedZGFRzo60/YRjzqwfnu7hh/li9XRaWdVok r9iC5XL/8jdv43HW223ifL920a9O1XVtAmjFbt/r01qrGTeK0NbzzY+ZkpUweYseUXs5 f3CGgw+JV2zOP8CIcqrt3GfgzgsPlk0WjG/VKDy95bB9cGa0xuoEd5rBDLltGXtV5Fxp Cnro0qp0IqOWZLsSbipODBufAO6HnM85cMyyqDO+pnQbiJ4jA8egn+ST38LJmhG+GiV7 pmPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UgLOSITr; 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 lz5-20020a170906fb0500b00730c1b3d753si6725234ejb.424.2022.08.15.13.18.41; Mon, 15 Aug 2022 13:19:08 -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=UgLOSITr; 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 S242343AbiHOTvr (ORCPT + 99 others); Mon, 15 Aug 2022 15:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345276AbiHOTtN (ORCPT ); Mon, 15 Aug 2022 15:49:13 -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 C0E3172854; Mon, 15 Aug 2022 11:49:48 -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 06612611EC; Mon, 15 Aug 2022 18:49:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E546FC433D6; Mon, 15 Aug 2022 18:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589387; bh=Oyu8SLvYHA4waZZ1sY8iSpqGSuscCZRhPGnX5EgPg38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UgLOSITrE+W4uR5mXnSbJ7bPMgLmF7RLewFepynLIRx4qIWf+4OCBCPcrjBdkrHka ARJ72CPDnVhm/fxyy3UnECzA0df3jTATeYtvQfecJY413SeyJ4AF9PrDXIXCqwAz10 3bFErjH9fVeweGTfySOMHH1TJpr4r4Ns6LKBGwgU= 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.15 695/779] usbnet: smsc95xx: Dont clear read-only PHY interrupt Date: Mon, 15 Aug 2022 20:05:39 +0200 Message-Id: <20220815180407.050105261@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 4e39e4345084..c33089168880 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