Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp845270imu; Tue, 11 Dec 2018 08:25:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/VJAmSuXWAZhY8icfEkygpz55/gSoBpuDdBK7RSbw/aal+SjtcKULc9uuwMYPi/acBtTIWK X-Received: by 2002:a63:f201:: with SMTP id v1mr14152512pgh.232.1544545537193; Tue, 11 Dec 2018 08:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545537; cv=none; d=google.com; s=arc-20160816; b=RdAwXDKT7Kb9/P501FHpwAJHyHFl5lwKhRjAM4zSF51VVsNPWXmBzuvVOjHEI8kg/5 xVXM6FUqFYcQjf2MbBLOimFI5mmlGASlvssFKbybEQ1rh1tXwh7ApEr9ww5p3kk5plVZ nGRmq1jAgS8VTDijG2F13tV4vSyuc8quXGZz3YvuKLP0mAMuxh7LryfMdTveo6pDAUve y/Az7aRLNi+gAa6VXRzShSCykhHJVkMr7m0N2GgltGDPOpx4pf5/9WgDN4Ce9VsfwvI9 VoGB0oTicAkbbwPxBxD5++rH5YZXQ+tXMCvacAjQiEb9PnmqFZsUrCpp8TjHh16y22ET FRcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5AgE4G2jNMVjQQnBhzn2Jq3hJP35sn1LkKfvOp1urmo=; b=tLe2pg/UTJN4zDNNEKO33o8Fduc4BOr9/H5gH65JWxUFUVR8rKv2Su1ynQAp+xXFko VHytR+LOwSILSMsDtdSdkECk+sFG4Yd8ofd77dPqIh+XDXLx83nCf9LeoEo043yqSaLc vWQXrDmUREigenwjgeamI8dMOsdqM76X7GewtagrklqxsT5pmTqhHSnF7AgNl72TPd2g UArR/n+sojPfc39dPJrfNF8hJCUoxxXLigBoc3u9OpRPBBAz6iAPK8uy7+RWbDt7ZefY MUxzSqRUtBoxOab0Wvun29bFSHFPblNgM5hC4lGY9YwrUCyb62OCxVMy6hP3UrkX0Wk8 bjlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o69DpDTy; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si12857619pfh.267.2018.12.11.08.25.22; Tue, 11 Dec 2018 08:25:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=o69DpDTy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbeLKPn6 (ORCPT + 99 others); Tue, 11 Dec 2018 10:43:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:60512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727647AbeLKPn4 (ORCPT ); Tue, 11 Dec 2018 10:43:56 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42CE02087F; Tue, 11 Dec 2018 15:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543035; bh=OIZaAMpI6/FOYm/IDIfp7TNnKrLY+BHhod+379IK3qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o69DpDTyRIodZHNircO1ABvSAwwpJOB8iCsAMz+AoFnAXAI70Tx+mE1P360rVpaKV wbskyLFhWDBaLmonaDZ1W3Xjcl2RJYjCVtuUbFkqCzPGLJc+5mrSouQ8oc6BiJSg4f 47zzpljbLK58jWdaMeRahrzm9vDMB58A+U2rddyw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Harry Pan Subject: [PATCH 3.18 41/54] usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device Date: Tue, 11 Dec 2018 16:41:29 +0100 Message-Id: <20181211151548.385413245@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Harry Pan commit 2f2dde6ba89b1ef1fe23c1138131b315d9aa4019 upstream. 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 Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -177,6 +177,10 @@ static const struct usb_device_id usb_qu /* 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 },