Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp479636pxb; Wed, 3 Mar 2021 07:56:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeuYOf5Wd26/aouh4Kh5HfpFGWF1tdLh+fBNiYE9AaMFJVYNx/RE652n8Itw6D9yv2qoXy X-Received: by 2002:aa7:c456:: with SMTP id n22mr25646467edr.277.1614786903374; Wed, 03 Mar 2021 07:55:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614786903; cv=none; d=google.com; s=arc-20160816; b=sobhyjzM2SVTPxzYfhAj1U+qMmJ/2bqr9iiundQuh3LZQ5Ey1SLBV/aJ6744CuvRdk 95cyCNlwj2y/9/yGw7ZRfRliHanhN2R6kVDqV8aQ6F5S41PVV27FP42cENjrul7Qvddb a8EkP0fqPsqPyrBVA25E0m6bepf7fFMb9tVGF5hwrJzKd7RwHA6UQp+zugFpUY1X3el9 N6NQab2HAMPjXqcmdGzjFdb0y5Sb7Ykjtm9uPg7lpQHiW36wHZDtxech5JZDp2tLTTyB IfYUP85xSjT8aG42ibqModXAp2ByH4xPSi5KMpiFfSWY+tmOoMbRkdIr/Tk7b4LnJ/TO H92w== 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=QEK0GMTemnG5PiJmKM36nZJcM0IAJ9Bebz9NZGS7OMI=; b=FdeprqcPxwei7+NNISMvaX2NPQgQZ2l0f/YuGBU+Q/u4g0hzZauvJ7CFEqpTt0HbtT gnd/ll73wIL9fOC6kbbnoLq31oc5agpQ8vG5yEIg1ZYrd8pNetVLcVpPliRXqbCyO38s g8KURvssvL2KZ4h3nr7RyM9HgyOzHhhqEhyak2YCKYapAhg6LvD7bXuTM2hqgwVM/rnd Qrm0OFkr7fenPQ5n9IQUiz3uwAT4RMwB9iZuQwZ9d/nFIC5vof02bjaWFPvma45kri/B mnVcj5Z9tlhZjPQ83aVdEZQnwEEK9bmES94fTtSvjVJ49/uQ/bRVqQYq4UQXMXiMPFTN nhDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kBW6Lbm3; 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 s10si15863704edj.416.2021.03.03.07.54.04; Wed, 03 Mar 2021 07:55:03 -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=kBW6Lbm3; 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 S1345354AbhCAXTv (ORCPT + 99 others); Mon, 1 Mar 2021 18:19:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:54158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239238AbhCAR7F (ORCPT ); Mon, 1 Mar 2021 12:59:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EAE186507E; Mon, 1 Mar 2021 17:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619634; bh=A/xLtAbml7+7AdWvXvXgY6S0HKkVMjf/GFMkeT7FYJ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kBW6Lbm3KtcJIR5p34iJIxtQkAO0sfdL3sHve7h8SCplKV6Um6VS8UmxDYBYtIrkG IGWNWSgl+MR1WrA9bQbfCcLddfYmv2ujLq1g06YIw8qhEjymNW8LfCeA1wxrUzDs8j ER+EbKwLtML+b61u2nheoREhPdxvnaLKTJbMwYoU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir , Johan Hovold Subject: [PATCH 5.10 495/663] USB: serial: ftdi_sio: fix FTX sub-integer prescaler Date: Mon, 1 Mar 2021 17:12:23 +0100 Message-Id: <20210301161206.337200378@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@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: Johan Hovold commit 528222d0c8ce93e435a95cd1e476b60409dd5381 upstream. The most-significant bit of the sub-integer-prescaler index is set in the high byte of the baudrate request wIndex also for FTX devices. This fixes rates like 1152000 which got mapped to 1.2 MBd. Reported-by: Vladimir Link: https://bugzilla.kernel.org/show_bug.cgi?id=210351 Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1386,8 +1386,9 @@ static int change_speed(struct tty_struc index_value = get_ftdi_divisor(tty, port); value = (u16)index_value; index = (u16)(index_value >> 16); - if ((priv->chip_type == FT2232C) || (priv->chip_type == FT2232H) || - (priv->chip_type == FT4232H) || (priv->chip_type == FT232H)) { + if (priv->chip_type == FT2232C || priv->chip_type == FT2232H || + priv->chip_type == FT4232H || priv->chip_type == FT232H || + priv->chip_type == FTX) { /* Probably the BM type needs the MSB of the encoded fractional * divider also moved like for the chips above. Any infos? */ index = (u16)((index << 8) | priv->interface);