Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp403729pxu; Tue, 1 Dec 2020 14:23:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjfFXHQwrjWk1vmSuW891QFkHO+hELV99NVZjO7f3Auf6xa/9BYXoBs2vG4S2juaxDModv X-Received: by 2002:a17:906:46d2:: with SMTP id k18mr5041864ejs.33.1606861414896; Tue, 01 Dec 2020 14:23:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861414; cv=none; d=google.com; s=arc-20160816; b=m+ZRl7OLAUhcPYr1163DjIbmnmvnJmrhwqIML3OG0nzSLTDA5f/SVqiJ7FdFmsDG7G IKV0MHTzKZ1il/0ycXrUO9MmaaC9cgq5mTCZlH3SfNaGtHHUyJLTTSAxSx3A0V4n5qR2 Q9eQMGk+mdfHtkRePIrMPDPpIEyU8W16jZtkwnIXWsWS5sVNIDZ6vuygX45mvv2ihADL DIZUIWtdb9U4vTH/fz0uRL30aQ5Nxl5xy/lfuuteBL1uKIpx5Txv2WnvyvZK72xK6lqS kZO9kq4hhapKIcdhjOjwagzY/xG4IxOKYizqUpkQT600pyDkQ5Fg2gFBGQSUeNJeEVAp lwig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vr0I5KsGj3kc5BPf1UE5V95LP+7nYZk2MK9wzRKIrcA=; b=Wd1GhUaJGRK/1Cwih9ZpAuYg7yosolh+N+qAVl1AMuyDDGr8pczHckgxuKH3chYilo vZygEY+uqr/aRSqM/s2+czGUfYgB0N6591ZG/805TKXD2cqkFEsynrpH4xh3UxxBSg58 xMBYsD2jCWh2jqzguYSx+ZqXuK+vL5N3B53ZSHY1UDmv0XaPrIrByuYLRGcRfqjvJzRn Pv/ZN1ZcLWz34KXLg3WR84LREyYmguEmScK3g3NNc9rIi/jtjFy9u3uTdbBRDFPXeUz1 pqp46qUzdivVc44/Mm+v0YMqmRDpUyFoVrNbzk6MmtTQn+F91LUfDeDDLD+6RpkOdo41 a6Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yqqXq2xq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt11si706166ejb.445.2020.12.01.14.23.12; Tue, 01 Dec 2020 14:23:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yqqXq2xq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389225AbgLAJIZ (ORCPT + 99 others); Tue, 1 Dec 2020 04:08:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:43674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388831AbgLAJGs (ORCPT ); Tue, 1 Dec 2020 04:06:48 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 B635D206C1; Tue, 1 Dec 2020 09:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813567; bh=K//IOY9Vb8ru+mIm92M8ULH1E7sDdEbteHa07jMEsHg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yqqXq2xqvMAJg9Y1fyPydojHjD5KK8bS3L4mvLFIubjUMsS240tcEBASTiWr6ErEh zNFDqsNEqAUiRrvJaBHgAUL1w2pyD/7OhvSDSM5SNx7stoRE89NNSgp3jZIcqsQw7J 02fY/cNopTH2ucfxd5uagoAVBKfLF1Xg7hBz2IrM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, penghao Subject: [PATCH 5.4 83/98] USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card Date: Tue, 1 Dec 2020 09:54:00 +0100 Message-Id: <20201201084659.113771711@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084652.827177826@linuxfoundation.org> References: <20201201084652.827177826@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: penghao commit 9ca57518361418ad5ae7dc38a2128fbf4855e1a2 upstream. Add a USB_QUIRK_DISCONNECT_SUSPEND quirk for the Lenovo TIO built-in usb-audio. when A630Z going into S3,the system immediately wakeup 7-8 seconds later by usb-audio disconnect interrupt to avoids the issue. eg dmesg: .... [ 626.974091 ] usb 7-1.1: USB disconnect, device number 3 .... .... [ 1774.486691] usb 7-1.1: new full-speed USB device number 5 using xhci_hcd [ 1774.947742] usb 7-1.1: New USB device found, idVendor=17ef, idProduct=a012, bcdDevice= 0.55 [ 1774.956588] usb 7-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1774.964339] usb 7-1.1: Product: Thinkcentre TIO24Gen3 for USB-audio [ 1774.970999] usb 7-1.1: Manufacturer: Lenovo [ 1774.975447] usb 7-1.1: SerialNumber: 000000000000 [ 1775.048590] usb 7-1.1: 2:1: cannot get freq at ep 0x1 ....... Seeking a better fix, we've tried a lot of things, including: - Check that the device's power/wakeup is disabled - Check that remote wakeup is off at the USB level - All the quirks in drivers/usb/core/quirks.c e.g. USB_QUIRK_RESET_RESUME, USB_QUIRK_RESET, USB_QUIRK_IGNORE_REMOTE_WAKEUP, USB_QUIRK_NO_LPM. but none of that makes any difference. There are no errors in the logs showing any suspend/resume-related issues. When the system wakes up due to the modem, log-wise it appears to be a normal resume. Introduce a quirk to disable the port during suspend when the modem is detected. Signed-off-by: penghao Link: https://lore.kernel.org/r/20201118123039.11696-1-penghao@uniontech.com 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 @@ -421,6 +421,10 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x1532, 0x0116), .driver_info = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL }, + /* Lenovo ThinkCenter A630Z TI024Gen3 usb-audio */ + { USB_DEVICE(0x17ef, 0xa012), .driver_info = + USB_QUIRK_DISCONNECT_SUSPEND }, + /* BUILDWIN Photo Frame */ { USB_DEVICE(0x1908, 0x1315), .driver_info = USB_QUIRK_HONOR_BNUMINTERFACES },