From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C68DC4332F for ; Thu, 14 Dec 2023 12:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573151AbjLNMs7 convert rfc822-to-8bit (ORCPT ); Thu, 14 Dec 2023 07:48:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573131AbjLNMs5 (ORCPT ); Thu, 14 Dec 2023 07:48:57 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA56E113; Thu, 14 Dec 2023 04:49:03 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3BECmjWhB840110, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 3BECmjWhB840110 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Dec 2023 20:48:46 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.17; Thu, 14 Dec 2023 20:48:46 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 14 Dec 2023 20:48:45 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Thu, 14 Dec 2023 20:48:45 +0800 From: JustinLai0215 To: Jakub Kicinski CC: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "andrew@lunn.ch" , Ping-Ke Shih , Larry Chiu Subject: RE: [PATCH net-next v14 09/13] rtase: Implement pci_driver suspend and resume function Thread-Topic: [PATCH net-next v14 09/13] rtase: Implement pci_driver suspend and resume function Thread-Index: AQHaKbuedtDdJPDHRk24Rnt75cJCOrClhpOAgAM9neA= Date: Thu, 14 Dec 2023 12:48:45 +0000 Message-ID: <05bd9b22872348c6a931408e7b58106a@realtek.com> References: <20231208094733.1671296-1-justinlai0215@realtek.com> <20231208094733.1671296-10-justinlai0215@realtek.com> <20231212111907.543e8f04@kernel.org> In-Reply-To: <20231212111907.543e8f04@kernel.org> Accept-Language: zh-TW, en-US Content-Language: zh-TW x-originating-ip: [172.21.210.185] x-kse-serverinfo: RTEXMBS01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Fri, 8 Dec 2023 17:47:29 +0800 Justin Lai wrote: > > +static int rtase_suspend(struct device *device) { > > + struct net_device *dev = dev_get_drvdata(device); > > + > > + if (netif_running(dev)) { > > + netif_stop_queue(dev); > > + netif_device_detach(dev); > > detach stops the queue, you don't have to call both Thanks for the reminder, I will modify it. > > > + rtase_hw_reset(dev);