Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3560305pxb; Mon, 1 Mar 2021 13:21:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/ItbMpspMy32tHZFrBXyvag+5u7v+TqlZwWTD47A+iQZuvoQ703JmR44HtVaHYF1h3H1R X-Received: by 2002:a17:906:1a06:: with SMTP id i6mr17417622ejf.28.1614633705939; Mon, 01 Mar 2021 13:21:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614633705; cv=none; d=google.com; s=arc-20160816; b=Oqm3djJtOe9VKUrFcT0ZwEx0uSP/j6IhMZ7nbNlVY5N152/8mKak0D5RKvQ6nNvTDs 3gf2RkcrM7Gq8d+eTFDonoJkk4VFDWYBEVN51LUW0RK1g/wUYyn/NEdKlKe3P1IV0JBo 0MPdMhAX/m5p+e0nxzd0Rtme1xCeupGddOt3kGk86d13B0HKpc9/be/dW2A2QemKjpA2 P2D4L/JR0efyhlC2cXpgcTDyndtCnhaq3ld2uGLoenhV6tcMyCpW/Rg7p4tb3ejJ0SrQ h9gnGyoa0rdAVodFmsUuQe5/bWiSVekrFftVPPDdbuiCxMTLtio8dfODJDAJrVr8mYt2 9fwA== 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=+8GlyuIN5VGRFcfR71A6XMFKVS0Wl0sH40fM/teeZi4=; b=08by5/iir4VmopBprusyRVR370KCBgTFrjKltSqtQTq/XUT4U/5x0uW2zeBBFpHnb1 Zvpo1hcO8WYsHTuyaQCIL0oas+9c5VqN7oZ9wC1S7uDhnpGJN+0uPFcJ5znGuIhZyp4o KO90aMbmI5yX3nLUyaOMVChLmJse93UsBDicEI91o50kWTNBttilpbGAddyF1VcKD0Kw rkC5F1NXa50TpUKXqS0NpRfidiHh0wECHDGtqiGPz840MSqZMkOr+K/+gOzOv/nQSej3 LkiS5uPwiRpoGct/Rio1KuMS0UcAADjAk+6/Rv6ht6ek8pGxxU9m1nDwo8sVX06RaNKx 7Onw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1mANvwQ0; 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 e21si4403277edr.370.2021.03.01.13.21.23; Mon, 01 Mar 2021 13:21:45 -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=1mANvwQ0; 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 S237857AbhCAVQg (ORCPT + 99 others); Mon, 1 Mar 2021 16:16:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:47630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236975AbhCAROC (ORCPT ); Mon, 1 Mar 2021 12:14:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA2E465038; Mon, 1 Mar 2021 16:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617143; bh=NiW2HslaaNrXGLKHvuzcdC6Vfb6E+0pLQ55jzDQkPEk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mANvwQ08JHlwWdGEMVbADHlnQiqLcIBwSw6bln3MGDvUdg0TRoPJlYhRZvIJFTqH rcKEtXXvF4hl9jdyr3jxVn84Pdxhh3a8O7noUJ2OcAdqbowkJV4m6dJnf/RwRBEQnx JAcBYjT28fnBKGx/EMTcMLkqPe8qu3NTl8oNe4tY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir , Johan Hovold Subject: [PATCH 4.19 190/247] USB: serial: ftdi_sio: fix FTX sub-integer prescaler Date: Mon, 1 Mar 2021 17:13:30 +0100 Message-Id: <20210301161040.956069917@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@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 @@ -1370,8 +1370,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);