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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A9EFC433FE for ; Mon, 3 Oct 2022 18:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbiJCSSE (ORCPT ); Mon, 3 Oct 2022 14:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbiJCSRv (ORCPT ); Mon, 3 Oct 2022 14:17:51 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4C0F22BB15 for ; Mon, 3 Oct 2022 11:17:45 -0700 (PDT) Received: (qmail 680091 invoked by uid 1000); 3 Oct 2022 14:17:44 -0400 Date: Mon, 3 Oct 2022 14:17:44 -0400 From: Alan Stern To: James Dutton Cc: "linux-usb@vger.kernel.org" Subject: Re: USB disk disconnect problems Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Oct 03, 2022 at 07:04:05PM +0100, James Dutton wrote: > I have done some more tests. > With the device plugged in, and me manually send a command to reset > the USB device. > Using instructions listed here: > https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line > > The reset fails. > It never recovers. > So, I think there is some problem relating to USB 3.x reset, and maybe > just my specific device which is an NVME storage in a USB dock. > I think the problem is more to do with the Linux kernel's USB 3.x > reset procedure, rather than any other cause. > Is there any quirk or test I can add, that would remove power from the > USB port and return it, as part of the reset procedure? > Or, is there any extra debug logging I can enable to help diagnose > where the reset function is failing? You can try collecting a usbmon trace of the reset (instructions on the web or in Documentation/usb/usbmon.rst in the kernel source). That will provide some clues as to whether the problem lies in the reset itself or in the activities that follow the reset. Have you tried running a similar test using, say, a plain old USB thumb drive in place of the NVME storage device? Alan Stern