From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Date: Wed, 12 Jun 2019 06:58:33 +0000 Subject: Re: [PATCH 09/10] usb: Add USB subsystem notifications [ver #3] Message-Id: <87h88v1e92.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit List-Id: References: In-Reply-To: To: Alan Stern Cc: Mathias Nyman , Greg Kroah-Hartman , David Howells , viro@zeniv.linux.org.uk, linux-usb@vger.kernel.org, raven@themaw.net, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Hi, Alan Stern writes: > 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. my comment was specific about XHCI. It even started with "From an XHCI standpoint" :-) -- balbi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: Re: [PATCH 09/10] usb: Add USB subsystem notifications [ver #3] Date: Wed, 12 Jun 2019 09:58:33 +0300 Message-ID: <87h88v1e92.fsf@linux.intel.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Alan Stern Cc: Mathias Nyman , Greg Kroah-Hartman , David Howells , viro@zeniv.linux.org.uk, linux-usb@vger.kernel.org, raven@themaw.net, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-block@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-api@vger.kernel.org Hi, Alan Stern writes: > 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. my comment was specific about XHCI. It even started with "From an XHCI standpoint" :-) -- balbi