All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vicamo@gmail.com
Cc: grundler@chromium.org, hayeswang@realtek.com,
	kai.heng.feng@canonical.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, pmalani@chromium.org,
	vicamo.yang@canonical.com
Subject: Re: [PATCH v2] r8152: check disconnect status after long sleep
Date: Sat, 29 Feb 2020 21:20:35 -0800 (PST)	[thread overview]
Message-ID: <20200229.212035.1001013376740500991.davem@davemloft.net> (raw)
In-Reply-To: <20200226153710.239838-1-vicamo@gmail.com>

From: You-Sheng Yang <vicamo@gmail.com>
Date: Wed, 26 Feb 2020 23:37:10 +0800

> From: You-Sheng Yang <vicamo.yang@canonical.com>
> 
> Dell USB Type C docking WD19/WD19DC attaches additional peripherals as:
> 
>   /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
>       |__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 5000M
>           |__ Port 3: Dev 12, If 0, Class=Hub, Driver=hub/4p, 5000M
>           |__ Port 4: Dev 13, If 0, Class=Vendor Specific Class,
>               Driver=r8152, 5000M
> 
> where usb 2-1-3 is a hub connecting all USB Type-A/C ports on the dock.
> 
> 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 disconnected 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:
 ...
> To solve this long latency another test to RTL8152_UNPLUG flag should be
> added after those 20ms sleep to skip unnecessary loops, so that the device
> probe can complete early and proceed to parent port reset/reprobe process.
> 
> This can be reproduced on all kernel versions up to latest v5.6-rc2, but
> after v5.5-rc7 the reproduce rate is dramatically lowered to 1/30 or less
> while it was around 1/2.
> 
> Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>

Applied, thank you.

  reply	other threads:[~2020-03-01  5:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24  7:15 r8151: check disconnect status after long sleep You-Sheng Yang
2020-02-24 22:47 ` David Miller
2020-02-26 15:37   ` [PATCH v2] r8152: " You-Sheng Yang
2020-03-01  5:20     ` David Miller [this message]
2020-02-24 23:02 ` r8151: " Prashant Malani
2020-02-26 15:40   ` You-Sheng Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200229.212035.1001013376740500991.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=grundler@chromium.org \
    --cc=hayeswang@realtek.com \
    --cc=kai.heng.feng@canonical.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmalani@chromium.org \
    --cc=vicamo.yang@canonical.com \
    --cc=vicamo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.