Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbbLIDsp (ORCPT ); Tue, 8 Dec 2015 22:48:45 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:49610 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbbLIDso (ORCPT ); Tue, 8 Dec 2015 22:48:44 -0500 Date: Tue, 08 Dec 2015 22:48:42 -0500 (EST) Message-Id: <20151208.224842.1810870878153442975.davem@davemloft.net> To: peter@lekensteyn.nl Cc: hayeswang@realtek.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, baolu.lu@linux.intel.com Subject: Re: [PATCH v2] r8152: fix lockup when runtime PM is enabled From: David Miller In-Reply-To: <1449573462-28417-1-git-send-email-peter@lekensteyn.nl> References: <1449573462-28417-1-git-send-email-peter@lekensteyn.nl> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 08 Dec 2015 19:48:44 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 32 From: Peter Wu Date: Tue, 8 Dec 2015 12:17:42 +0100 > When an interface is brought up which was previously suspended (via > runtime PM), it would hang. This happens because napi_disable is called > before napi_enable. > > Solve this by avoiding napi_enable in the resume during open function > (netif_running is true when open is called, IFF_UP is set after a > successful open; netif_running is false when close is called, but IFF_UP > is then still set). > > While at it, remove WORK_ENABLE check from rtl8152_open (introduced with > the original change) because it cannot happen: > > - After this patch, runtime resume will not set it during rtl8152_open. > - When link is up, rtl8152_open is not called. > - When link is down during system/auto suspend/resume, it is not set. > > Fixes: 41cec84cf285 ("r8152: don't enable napi before rx ready") > Link: https://lkml.kernel.org/r/20151205105912.GA1766@al > Signed-off-by: Peter Wu > --- > v2: moved rtl_runtime_suspend_enable from close to rtl8152_suspend Applied, and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/