Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2639207pxa; Mon, 17 Aug 2020 15:10:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk2sLAGA10a/XzCrTOFer+lhrJ6w2FanVPEJh1PuQ63h6hZAfrJqWd/MMD5pEw60X2rgMh X-Received: by 2002:aa7:c604:: with SMTP id h4mr17245615edq.336.1597702236474; Mon, 17 Aug 2020 15:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702236; cv=none; d=google.com; s=arc-20160816; b=YC+WLhpINZMsceNAvsOboO4eUAOGjreD2uibfMaHIv7lByKHvfWvyvr0xHEbFECBVQ uDCCTB0rYdFO+ER/TQP353cPj/EoDlpXiHeCCXT+BKfcUsfv4LpPJjMSXvcDBW2Z673V cvjWsczhmeC6osILFw4uskGa/MLDlJruYbOyBROaZkAaG90ufr32dd+23YvV1bzRP2BB KadYALpM6ErcphuhIjFgSufvnOttwR+A+PN1AO7yq4T7UP2AvJRBBtI3iozklcpK/18D zIjf/wrs7/FXcs5oLpxxtF2CYNCyvQjGxRkMNYEqAA+aFRr9FSJ32Xca51eDq+BDAqus nNeg== 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=rKVeKArjtKekAdcFY5cO+75+dkydiOCmtqnZYXoHd7c=; b=vrtyiXXsloXUbSGIBD3JAXCneolFQwOnlCxZt2UCJmVeQA3ISAIkfp3z0Y5FxLFuTP cpMRLgOk4HElBtelFSil88OB3RCbzqxtnqlYaU2eRi+r3Xw7afMEqA2fQ4MkWu2EYvNj SoZyaGn5Q+zMnxoAa38rC0yjA5KURM8p405eN4wR3krCkxsZc/kbnxcYylkO0iiqE3LA TBwE1rnJLA2uGpQiQlX60wJLC6sh+KdA0rgA2Y8yoz+gQV1aqLwt1K5i8BqcAW7wcLZU PFhTYQStL3aQj4hQUOIv5YqTHa6VbPuKpM7w5YfRrJfz4YjxBo3c8jmD0+VHga7wFVvI oK/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="v4mE/JoF"; 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=fail (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 u25si11859416ejj.483.2020.08.17.15.10.12; Mon, 17 Aug 2020 15:10:36 -0700 (PDT) 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=@kernel.org header.s=default header.b="v4mE/JoF"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731271AbgHQQhM (ORCPT + 99 others); Mon, 17 Aug 2020 12:37:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:44054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387578AbgHQP4R (ORCPT ); Mon, 17 Aug 2020 11:56:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 964DB214F1; Mon, 17 Aug 2020 15:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679777; bh=SrnGT9mFV8mx+n9fnp7oqTYm1Ykr9auihTd+1/BmR7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v4mE/JoFX6tey03BInvUA7OdZjP6Wg1h1KFr5uvegBeSR2/ddrr+jBoWO+auIBeGg uHSKgLhBR3b4lSB8T1VpnCj+qCl/JjLTslpu9J1SJaikqUmMxtMQ9wOt9XxzZ/F0FB yU0vVJzBmvSdO9R56XQWLSUAVWwG61pP6efZS1Y8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brant Merryman , Phu Luu , Johan Hovold Subject: [PATCH 5.7 331/393] USB: serial: cp210x: enable usb generic throttle/unthrottle Date: Mon, 17 Aug 2020 17:16:21 +0200 Message-Id: <20200817143835.652817219@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Brant Merryman commit 4387b3dbb079d482d3c2b43a703ceed4dd27ed28 upstream. Assign the .throttle and .unthrottle functions to be generic function in the driver structure to prevent data loss that can otherwise occur if the host does not enable USB throttling. Signed-off-by: Brant Merryman Co-developed-by: Phu Luu Signed-off-by: Phu Luu Link: https://lore.kernel.org/r/57401AF3-9961-461F-95E1-F8AFC2105F5E@silabs.com [ johan: fix up tags ] Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") Cc: stable # 2.6.12 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cp210x.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -272,6 +272,8 @@ static struct usb_serial_driver cp210x_d .break_ctl = cp210x_break_ctl, .set_termios = cp210x_set_termios, .tx_empty = cp210x_tx_empty, + .throttle = usb_serial_generic_throttle, + .unthrottle = usb_serial_generic_unthrottle, .tiocmget = cp210x_tiocmget, .tiocmset = cp210x_tiocmset, .attach = cp210x_attach,