Message ID | 20231020140655.v5.3.I33c8decabd2e77c37524db02b4e6b9b4dbc3a8d6@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1325682vqb; Fri, 20 Oct 2023 14:09:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4Er/KhQ8Ut12+R2PXYx9DwHqINhd5Xk3WNWxP2R/y4ZxdKea5HQRRMWC8T7OLbbHCuoi0 X-Received: by 2002:a05:6a00:1953:b0:6be:b7c:f703 with SMTP id s19-20020a056a00195300b006be0b7cf703mr3113342pfk.5.1697836159708; Fri, 20 Oct 2023 14:09:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697836159; cv=none; d=google.com; s=arc-20160816; b=S+mdLy4o0F05yyACWzCKAUQcP49ToGMTPwKRM7X2UzQhidZeXb6V4Zkt1U9IatBAAO gnju/KZBmP1uuxWEjwGcjQ+oFt7by50cOE5D5foT6yIkzNUs9j21z2IZRrwXVPOWs8HG /dwTrvqEPrMx042g5kk1G58of141b5I9Tf9CDBrtKF6z1HkaGIHGM97f35UtFSTAVxkE hKPn74QIbsFG7U4lbXcLKaceDBMldheWahHDmFiFK4ZmmfBzYI9Vj4cxEkAUOK8sYlQH YDBk3VXzFCSKTFoP+RqJqVoGCcV0cUQZR9QqB2x7+pH9/nh8neLMORfxzRpi4kFHJECW uUnQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZvOeqgh1R0cFVT/LR2McM1sRBuOsLz4JWxKyKe8PLwc=; fh=zTr+uH2kSs/oKblpwigKoDAJbZw82uLZilNO8W1q+qc=; b=WTu9OHfUfP5kn2WBnZXXyvfDeSDatKdpTje5c2gTePWdwWKfTVX29GsqqTpnlh6hYb lVb3qff9qoURx9dAzhDhQUvf25tXU75Cj6C4YfiQ7XLLuO5bd69obubOiDl8i/dOprkP lgV8ibrbZEBltDI/9ZJXQcEsPsQpa2xTHk1EXyzzRQ2Szk/Q543oYf6SdKcLXFzqjYOi jKg2Undd2eDJy8gNGriKdWE1ca+u/xFI8SBXgy2Xk3wNmrYIRaMFjp6//KcVKvHKhUdV Rs8xZRZope1bvBNUu0qE1o3m6zY0KSqoVlBTpHfvKpLC8DfY2bTegaGBV23YK8/aTgob ZwaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fvrGT2uI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id cb17-20020a056a02071100b00578f1ab2287si2743658pgb.354.2023.10.20.14.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:09:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fvrGT2uI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 80CEF8287880; Fri, 20 Oct 2023 14:09:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231228AbjJTVI2 (ORCPT <rfc822;a1648639935@gmail.com> + 26 others); Fri, 20 Oct 2023 17:08:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbjJTVIX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Oct 2023 17:08:23 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E1CD6D for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 14:08:16 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6b36e1fcea0so1107537b3a.1 for <linux-kernel@vger.kernel.org>; Fri, 20 Oct 2023 14:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1697836095; x=1698440895; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZvOeqgh1R0cFVT/LR2McM1sRBuOsLz4JWxKyKe8PLwc=; b=fvrGT2uIFyeVVEgMKDDOv3hLBZrccgGahRS/L1FAcXmLUZw5xzd2FtVuNtbPKMbGDL PeH3tsTbm/+zEesEPqmYR6QvH5lgY5LvCpv7DaDEoeeQJ9P2MQMV4FkaO1gPSxBdGUPT gucm08DAC2ueM/EG1sJl2tWDOzj90Kc35i1lI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697836095; x=1698440895; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZvOeqgh1R0cFVT/LR2McM1sRBuOsLz4JWxKyKe8PLwc=; b=nMty3qIqb6JJxvwyVgil/cx/cM1vccvYsWDnQK6+MkBr71JVOFXSs1xcJgRjWhn26f KDiEdWcmnwvH6Oot81RROLsg4KoMw5djc7sVA5IvsHVMHvRkgYON3ZTOpgWE1UPu5Nuz i9kB7OI0dG8Gns6Ev7U2FS0M/bj3tddxWzw0n0uvn2eoJhcRxVdf0SsgIztl/fWgbn+F is3X0+8w3C0JIuqnBQWLrT2Rx1G1iEmATcrbKtWWT4XaJi9D/8MeekL2dyKU4QU5Hg3y VYbeGHiFCDy9e+mRKnVypBg69kUyj9DW8ZbfmzAoSORFd53nvWxGzx5VwhbWb+nJ/GTy HDsA== X-Gm-Message-State: AOJu0Yy+XwiGe3chDuSKuQlFL/pryhV/kh1xYYJx9IVp4FISUKrlb2xt WjIE6SLEbWMEgAJYW6zKuFYx/A== X-Received: by 2002:a05:6a20:432c:b0:17b:1696:e5ea with SMTP id h44-20020a056a20432c00b0017b1696e5eamr3319169pzk.14.1697836095564; Fri, 20 Oct 2023 14:08:15 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:c078:ee4f:479f:8486]) by smtp.gmail.com with ESMTPSA id w14-20020aa7954e000000b00686b649cdd0sm1969278pfq.86.2023.10.20.14.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:08:14 -0700 (PDT) From: Douglas Anderson <dianders@chromium.org> To: Jakub Kicinski <kuba@kernel.org>, Hayes Wang <hayeswang@realtek.com>, "David S . Miller" <davem@davemloft.net> Cc: Edward Hill <ecgh@chromium.org>, Laura Nao <laura.nao@collabora.com>, Alan Stern <stern@rowland.harvard.edu>, Simon Horman <horms@kernel.org>, linux-usb@vger.kernel.org, Grant Grundler <grundler@chromium.org>, Douglas Anderson <dianders@chromium.org>, =?utf-8?q?Bj=C3=B8rn_Mork?= <bjorn@mork.no>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v5 3/8] r8152: Cancel hw_phy_work if we have an error in probe Date: Fri, 20 Oct 2023 14:06:54 -0700 Message-ID: <20231020140655.v5.3.I33c8decabd2e77c37524db02b4e6b9b4dbc3a8d6@changeid> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog In-Reply-To: <20231020210751.3415723-1-dianders@chromium.org> References: <20231020210751.3415723-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 14:09:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780310248835314433 X-GMAIL-MSGID: 1780310248835314433 |
Series |
r8152: Avoid writing garbage to the adapter's registers
|
|
Commit Message
Doug Anderson
Oct. 20, 2023, 9:06 p.m. UTC
The error handling in rtl8152_probe() is missing a call to cancel the
hw_phy_work. Add it in to match what's in the cleanup code in
rtl8152_disconnect().
Fixes: a028a9e003f2 ("r8152: move the settings of PHY to a work queue")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v5:
- ("Cancel hw_phy_work if we have an error in probe") new for v5.
drivers/net/usb/r8152.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Fri, Oct 20, 2023 at 2:08 PM Douglas Anderson <dianders@chromium.org> wrote: > > The error handling in rtl8152_probe() is missing a call to cancel the > hw_phy_work. Add it in to match what's in the cleanup code in > rtl8152_disconnect(). Sounds like there is a future opportunity for someone (not Doug) to refactor code. > Fixes: a028a9e003f2 ("r8152: move the settings of PHY to a work queue") > Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Grant Grundler <grundler@chromium.org> > --- > > Changes in v5: > - ("Cancel hw_phy_work if we have an error in probe") new for v5. > > drivers/net/usb/r8152.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index 201c688e3e3f..d10b0886b652 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c > @@ -9783,6 +9783,7 @@ static int rtl8152_probe(struct usb_interface *intf, > > out1: > tasklet_kill(&tp->tx_tl); > + cancel_delayed_work_sync(&tp->hw_phy_work); > if (tp->rtl_ops.unload) > tp->rtl_ops.unload(tp); > usb_set_intfdata(intf, NULL); > -- > 2.42.0.758.gaed0368e0e-goog >
On 10/20/2023 2:06 PM, Douglas Anderson wrote: > The error handling in rtl8152_probe() is missing a call to cancel the > hw_phy_work. Add it in to match what's in the cleanup code in > rtl8152_disconnect(). > > Fixes: a028a9e003f2 ("r8152: move the settings of PHY to a work queue") > Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 201c688e3e3f..d10b0886b652 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -9783,6 +9783,7 @@ static int rtl8152_probe(struct usb_interface *intf, out1: tasklet_kill(&tp->tx_tl); + cancel_delayed_work_sync(&tp->hw_phy_work); if (tp->rtl_ops.unload) tp->rtl_ops.unload(tp); usb_set_intfdata(intf, NULL);