From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD3D57B3A1 for ; Tue, 12 Dec 2023 19:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EJnt4hSj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16CECC433C7; Tue, 12 Dec 2023 19:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702408748; bh=VxUoH5W5QC5FMheEWzI9jkp0t9473bp8pPVB/cabv8Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EJnt4hSjmhNoJdTQBC3pAIpLXXR60HMnuj7GY98aRzTVrTSMiSR7FQbNGgf04MACC UEJ1I75/BzQawTP6amcrMVoo0fzVVH7OlW78OY6upyqPsEBEtzu9wXuOK4cq0IQcMB FY1j3CqXTyoH0rLYlxeUcXAkSHJ694vOd9CmFZA1LTtN2Aw6hvxBwfuCRR2ZBcUic2 vZakpo64JMHxfEPwV5B47K7y5b12bTDGFDkhaPDhK97iLDYpjLBuEOBVsbTlMpDQM5 eqanzn7KJPQhcAk5KQfqIiu+NkkKPr66qK4V6//XNdTbTj6zMhgO0WG4zrZO7B8kbR oY8UG/MKLO46w== Date: Tue, 12 Dec 2023 11:19:07 -0800 From: Jakub Kicinski To: Justin Lai Cc: , , , , , , , Subject: Re: [PATCH net-next v14 09/13] rtase: Implement pci_driver suspend and resume function Message-ID: <20231212111907.543e8f04@kernel.org> In-Reply-To: <20231208094733.1671296-10-justinlai0215@realtek.com> References: <20231208094733.1671296-1-justinlai0215@realtek.com> <20231208094733.1671296-10-justinlai0215@realtek.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 > + rtase_hw_reset(dev);