Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2937863ybv; Mon, 24 Feb 2020 14:49:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyR8nBM1q5Vb/GYIaCK63N5SeO74rFAvptvDIXeJ3JnoM1dbTQ/huudBEen0xbwefi1A99l X-Received: by 2002:a9d:7cd0:: with SMTP id r16mr43761152otn.50.1582584587798; Mon, 24 Feb 2020 14:49:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582584587; cv=none; d=google.com; s=arc-20160816; b=CTFjUDKbA5lQ13CQ8b/EWRL+nsfEttWqrnZGw0+iJYkUza8ffv+hNnS/mrFBZnRvoH /6gBTMmdNIYXB9koHz4wXtF3tVNj6uB9W0lQwH42ot3XUmyAuFdzQoBV7UwANVqZ8iO3 LeUkJaQl+6nBqFMPW4jtc73ruxsKl5jRxkSZLHtYUTEwVXSJ6Dd6mZPa+yjyMxLnlazB Q7zHwyfs41qA0OY9ABsAqcl1zDHg4MzzZCjqKx17EA2hqzapB22oU4lgpxj/tP4ruU33 uXonVaugOD2buXMfRQi5zMPB1Oe1B1zbUSfVIyQ0Oc4Dg6gN696+mIG2s26i7hPLEHN1 BMig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=QbCI77TCWRDLhU+oc0bGJgDsulgiiTuXMYSY23vQJ38=; b=PsT/KyttEyRtfl//DtFIz3QMx/eoSKMHzNnP9c+LmmYOQhiXiD6czDUkWxwmJSmFEn NWo4MqVoUEATytgeMuL5gAwwlpNUOL+PSnm3JQsAqKZNRoU4WYT/m8jPXAxhAqKSYiWE AOGmE8VrI62ulByVChlqt70IkBIV4+vOk3KUycaQ7EWZAqsouagZTZoMXGT+UhwsnyRr svoYh0OWJwHvZGMLF1kG7Sfq1I6/VSqnsFzpBDJ9j+iy429FGcZQLTEPvOWxK+CcVmKq GDLzIzHlVYGeQhFrQkxPFn+iO1M19rj1FsWF3+Z8vs8qE0qzsofE/fbeLi1R1OKwQJSg +ATQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si7106698otq.23.2020.02.24.14.49.34; Mon, 24 Feb 2020 14:49:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728152AbgBXWsh (ORCPT + 99 others); Mon, 24 Feb 2020 17:48:37 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:39680 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgBXWsg (ORCPT ); Mon, 24 Feb 2020 17:48:36 -0500 Received: from localhost (unknown [50.226.181.18]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EFFCA1235831F; Mon, 24 Feb 2020 14:47:29 -0800 (PST) Date: Mon, 24 Feb 2020 14:47:14 -0800 (PST) Message-Id: <20200224.144714.329725174070305071.davem@davemloft.net> To: vicamo.yang@canonical.com Cc: hayeswang@realtek.com, kuba@kernel.org, pmalani@chromium.org, kai.heng.feng@canonical.com, grundler@chromium.org, vicamo@gmail.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: r8151: check disconnect status after long sleep From: David Miller In-Reply-To: <20200224071541.117363-1-vicamo.yang@canonical.com> References: <20200224071541.117363-1-vicamo.yang@canonical.com> X-Mailer: Mew version 6.8 on Emacs 26.3 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]); Mon, 24 Feb 2020 14:48:36 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: You-Sheng Yang Date: Mon, 24 Feb 2020 15:15:41 +0800 > When hotplugging such dock with additional usb devices already attached on > it, the probing process may reset usb 2.1 port, therefore r8152 ethernet > device is also reset. However, during r8152 device init there are several > for-loops that, when it's unable to retrieve hardware registers due to > being discconected from USB, may take up to 14 seconds each in practice, > and that has to be completed before USB may re-enumerate devices on the > bus. As a result, devices attached to the dock will only be available > after nearly 1 minute after the dock was plugged in: Your description of the problem and exactly what is happening is great, but you are not explaining how exactly you are solving the problem and why you are solving it in that way. Please enhance your commit message the explain those things. Thank you.