Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1462244imu; Wed, 28 Nov 2018 09:54:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/X2abEyN4FGg7n1Vjv0Tufa8BJj28xlcVh/9XEJz+L3cwkKD1xuKPUo6+1TQmkXYKKgxwiv X-Received: by 2002:a62:4714:: with SMTP id u20mr4013559pfa.144.1543427653577; Wed, 28 Nov 2018 09:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543427653; cv=none; d=google.com; s=arc-20160816; b=SkQzMjJSRnyJEfwyadXma9wUvcgmwxdba87RuVvp7PnnWUpQ5Uuh5B0XFzw7nfrfi6 77IJ4KxucexQoOlAvC1pBhrgR6NGYx/mXqgic9NnnIEPzHSwUcTFj5wShJhB8z5VHTH0 iG2T3dRfHeuRlR9EswvvEkH03v/6cyzeYdVQ/QPa6UuXRl7N4o4sj96G+Yjz7glx+76l Y0tRMujy66NMOpbSkj5Dl22XG8QA6KIQIWAzKxVrN83QyqpW2/7x3ljRCCVkFR+D5jXg G2jdzRc/YN7JcsweLxAeyYtQ2jBDLPJ3eZsVJBwoSooh/ptXc2yf3R170OpVPLmAP90G aKNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=9vQd6WUE3BrE1zPQ3ZWunkbd/MU04FdGs5/uQhHAKlc=; b=HjVGJJ1G4L9CwI6gTCE7ByOzddQ1tHHVRyUk6JL//HTQzNljbe88VuaYsstN5rGJDh Hv0IcXIuay0Fc8gZ4P+fw8YnKpTKd4SA8U0ecuhCRbITSINWJyV+RjapdNwX8Te/gFv8 P59GTAR9IDFQz7F47plFQaFIqcPyT5kLMJeJocj8dCeIgIsUtx1Qi2SW5Pu+tao2+K4T iM0mkbrUg9RC4XRJKL/Il0BVWQTM1cerhP11ht/sX96dKpTbLkKroSyLZiRMTVBkcyq1 JigX85x7buk39aWApgv7pPVv9cLS/8oEaiWvZvlZNOrkDdRuQIseyg24WWff9C4m/68W KiOQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si7947613pfh.138.2018.11.28.09.53.53; Wed, 28 Nov 2018 09:54:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729203AbeK2Eza (ORCPT + 99 others); Wed, 28 Nov 2018 23:55:30 -0500 Received: from 36-231-37-231.dynamic-ip.hinet.net ([36.231.37.231]:60030 "EHLO E6440.gar.corp.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727867AbeK2Eza (ORCPT ); Wed, 28 Nov 2018 23:55:30 -0500 X-Greylist: delayed 4324 seconds by postgrey-1.27 at vger.kernel.org; Wed, 28 Nov 2018 23:55:30 EST Received: from E6440.gar.corp.intel.com (localhost [127.0.0.1]) by E6440.gar.corp.intel.com (Postfix) with ESMTP id 2617DC04B8; Thu, 29 Nov 2018 00:40:45 +0800 (CST) From: Harry Pan To: LKML Cc: gs0622@gmail.com, chiranjeevi.rapolu@intel.com, freddy.paul@intel.com, utkarsh.h.patel@intel.com, Harry Pan , gregkh@linuxfoundation.org, kai.heng.feng@canonical.com, stern@rowland.harvard.edu, danilokrummrich@dk-develop.de, kamilx.lulko@intel.com, oneukum@suse.com, xpros64@hotmail.fr, linux-usb@vger.kernel.org Subject: [PATCH] usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device Date: Thu, 29 Nov 2018 00:40:41 +0800 Message-Id: <20181128164041.896-1-harry.pan@intel.com> X-Mailer: git-send-email 2.18.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some lower volume SanDisk Ultra Flair in 16GB, which the VID:PID is in 0781:5591, will aggressively request LPM of U1/U2 during runtime, when using this thumb drive as the OS installation key we found the device will generate failure during U1 exit path making it dropped from the USB bus, this causes a corrupted installation in system at the end. i.e., [ 166.918296] hub 2-0:1.0: state 7 ports 7 chg 0000 evt 0004 [ 166.918327] usb usb2-port2: link state change [ 166.918337] usb usb2-port2: do warm reset [ 166.970039] usb usb2-port2: not warm reset yet, waiting 50ms [ 167.022040] usb usb2-port2: not warm reset yet, waiting 200ms [ 167.276043] usb usb2-port2: status 02c0, change 0041, 5.0 Gb/s [ 167.276050] usb 2-2: USB disconnect, device number 2 [ 167.276058] usb 2-2: unregistering device [ 167.276060] usb 2-2: unregistering interface 2-2:1.0 [ 167.276170] xhci_hcd 0000:00:15.0: shutdown urb ffffa3c7cc695cc0 ep1in-bulk [ 167.284055] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK [ 167.284064] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 33 04 90 00 01 00 00 ... Analyzed the USB trace in the link layer we realized it is because of the 6-ms timer of tRecoveryConfigurationTimeout which documented on the USB 3.2 Revision 1.0, the section 7.5.10.4.2 of "Exit from Recovery.Configuration"; device initiates U1 exit -> Recovery.Active -> Recovery.Configuration, then the host timer timeout makes the link transits to eSS.Inactive -> Rx.Detect follows by a Warm Reset. Interestingly, the other higher volume of SanDisk Ultra Flair sharing the same VID:PID, such as 64GB, would not request LPM during runtime, it sticks at U0 always, thus disabling LPM does not affect those thumb drives at all. The same odd occures in SanDisk Ultra Fit 16GB, VID:PID in 0781:5583. Signed-off-by: Harry Pan --- drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index f9ff03e6af93..b62f47c15ccf 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -330,6 +330,10 @@ static const struct usb_device_id usb_quirk_list[] = { /* Midiman M-Audio Keystation 88es */ { USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME }, + /* SanDisk Ultra Fit and Ultra Flair */ + { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM }, + { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, -- 2.18.1