From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 EA1DBC43218 for ; Tue, 11 Jun 2019 13:53:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2DF4206BB for ; Tue, 11 Jun 2019 13:53:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391371AbfFKNxF (ORCPT ); Tue, 11 Jun 2019 09:53:05 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:35686 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1729011AbfFKNxE (ORCPT ); Tue, 11 Jun 2019 09:53:04 -0400 Received: (qmail 1733 invoked by uid 2102); 11 Jun 2019 09:53:03 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 11 Jun 2019 09:53:03 -0400 Date: Tue, 11 Jun 2019 09:53:03 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Felipe Balbi cc: Mathias Nyman , Greg Kroah-Hartman , David Howells , , , , , , , , , Subject: Re: [PATCH 09/10] usb: Add USB subsystem notifications [ver #3] In-Reply-To: <875zpcfxfk.fsf@linux.intel.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Jun 2019, Felipe Balbi wrote: > >> >> > So for "severe" issues, yes, we should do this, but perhaps not for all > >> >> > of the "normal" things we see when a device is yanked out of the system > >> >> > and the like. > >> >> > >> >> Then what counts as a "severe" issue? Anything besides enumeration > >> >> failure? > >> > > >> > Not that I can think of at the moment, other than the other recently > >> > added KOBJ_CHANGE issue. I'm sure we have other "hard failure" issues > >> > in the USB stack that people will want exposed over time. > >> > >> From an XHCI standpoint, Transaction Errors might be one thing. They > >> happen rarely and are a strong indication that the bus itself is > >> bad. Either bad cable, misbehaving PHYs, improper power management, etc. > > > > Don't you also get transaction errors if the user unplugs a device in > > the middle of a transfer? That's not the sort of thing we want to sent > > notifications about. > > Mathias, do we get Transaction Error if user removes cable during a > transfer? I thought we would just get Port Status Change with CC bit > cleared, no? Even if xHCI doesn't give Transaction Errors when a cable is unplugged during a transfer, other host controllers do. Sometimes quite a lot -- they continue to occur until the kernel polls the parent hub's interrupt ep and learns that the port is disconnected, which can take up to 250 ms. Alan Stern