Message ID | 20200203161914.352721176@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=s+JW=3X=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98684C35247 for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:47:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5ED0920838 for <stable@archiver.kernel.org>; Mon, 3 Feb 2020 16:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580748475; bh=V/URwyR45V2UVqCc6dN8N9EyzaFjT5CgEyR/Gyu1eyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z/G76R3uGBX8psrfYmleMuDbPkTz0KjGrl+YK5URM/v3J9KQ9RlEKy7nOXPb6MUDr 282jA5lVE+yJpyDHNz+drU3FFmd5PJhB/NPPLuaevu5KUo4aenfb5puL5fA+W5kYOH YWCstIvT5+KenKO4xrRFEC5TDE6OcVn/8gocbYlc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727562AbgBCQ0t (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 3 Feb 2020 11:26:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:37898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729252AbgBCQ0t (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 3 Feb 2020 11:26:49 -0500 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 95EF82086A; Mon, 3 Feb 2020 16:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580747208; bh=V/URwyR45V2UVqCc6dN8N9EyzaFjT5CgEyR/Gyu1eyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jKRLO2EEq/pt5OBA4U7Bf2h313ByZa0ZXWoeUukXQOQHmX/1ia98P0+ffkhme3Org u1Dnqpb8AeZqBAvqsNltcvpuUGylLd0H0UnEsCGZqmgXYR6F1R6NGQ8zKURbFkkt01 u2qBrdaj0uF/z9FuEnWLuRWNTtfcrkvqcXpQQOt0= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Hayes Wang <hayeswang@realtek.com>, "David S. Miller" <davem@davemloft.net>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.9 57/68] r8152: get default setting of WOL before initializing Date: Mon, 3 Feb 2020 16:19:53 +0000 Message-Id: <20200203161914.352721176@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203161904.705434837@linuxfoundation.org> References: <20200203161904.705434837@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3c037b76a0cc8..ba7cfc0895165 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -4441,6 +4441,11 @@ static int rtl8152_probe(struct usb_interface *intf, intf->needs_remote_wakeup = 1; + if (!rtl_can_wakeup(tp)) + __rtl_set_wol(tp, 0); + else + tp->saved_wolopts = __rtl_get_wol(tp); + tp->rtl_ops.init(tp); queue_delayed_work(system_long_wq, &tp->hw_phy_work, 0); set_ethernet_addr(tp); @@ -4454,10 +4459,6 @@ static int rtl8152_probe(struct usb_interface *intf, goto out1; } - if (!rtl_can_wakeup(tp)) - __rtl_set_wol(tp, 0); - - tp->saved_wolopts = __rtl_get_wol(tp); if (tp->saved_wolopts) device_set_wakeup_enable(&udev->dev, true); else