Message ID | 20200319123931.564917852@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=1QoN=5E=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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 9A652C4332B for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B117216FD for <stable@archiver.kernel.org>; Thu, 19 Mar 2020 13:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623426; bh=jJUYZqV0w3aihbIA7hyyPBRaBtdQxZjgWV0UghJS45A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=15+9faCWkpTodRklRg4DuQe/egL+YYai3tpYxfsm/MFf4BXSof01IYFd2CF2au/qO 2r6VPjc7n6/M4khzacR5vpnHMTZCQwRDoCLwdT63CmOMSHw3jTnDFbWnqxCfYsWdjk 0dreCK1RHCnJbff/dWdj6Tl1G2PekMb7gstHdXWc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728526AbgCSNKZ (ORCPT <rfc822;stable@archiver.kernel.org>); Thu, 19 Mar 2020 09:10:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:55214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728523AbgCSNKZ (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 19 Mar 2020 09:10:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 35BD42145D; Thu, 19 Mar 2020 13:10:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623424; bh=jJUYZqV0w3aihbIA7hyyPBRaBtdQxZjgWV0UghJS45A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0FOeEtJs76t7XEdYrIwmdExM5I45L3UqIJeVuQaJNmH5M55nxba1sAXgouPLG8yHT SEyr4G0Z7YWHdBmF8St1RbchUllkFn2GSA9eXMIdCT88bDTQZlaEoYiqmRm1Y9fGmH pAreSulcALere09tgP4mS6SxZ2x5puxCIikTXYdk= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, You-Sheng Yang <vicamo.yang@canonical.com>, "David S. Miller" <davem@davemloft.net> Subject: [PATCH 4.9 09/90] r8152: check disconnect status after long sleep Date: Thu, 19 Mar 2020 13:59:31 +0100 Message-Id: <20200319123931.564917852@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123928.635114118@linuxfoundation.org> References: <20200319123928.635114118@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
|
--- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3423,7 +3423,10 @@ static void r8153_init(struct r8152 *tp) if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & AUTOLOAD_DONE) break; + msleep(20); + if (test_bit(RTL8152_UNPLUG, &tp->flags)) + break; } for (i = 0; i < 500; i++) { @@ -3447,7 +3450,10 @@ static void r8153_init(struct r8152 *tp) ocp_data = ocp_reg_read(tp, OCP_PHY_STATUS) & PHY_STAT_MASK; if (ocp_data == PHY_STAT_LAN_ON) break; + msleep(20); + if (test_bit(RTL8152_UNPLUG, &tp->flags)) + break; } usb_disable_lpm(tp->udev);