From patchwork Mon Oct 24 11:28:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp421604wru; Mon, 24 Oct 2022 05:20:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM55qi/fc7U5Y7HLa6HOjRrlM06CLsxofH1zyXj8whSB7kUDW+rolS/GcDUfWFxwNLJ14MEC X-Received: by 2002:a17:907:6ea9:b0:794:8b93:2e44 with SMTP id sh41-20020a1709076ea900b007948b932e44mr22387757ejc.407.1666614052833; Mon, 24 Oct 2022 05:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666614052; cv=none; d=google.com; s=arc-20160816; b=uL+GXqg2ww37l8Kbotqrs6hg1w5nUJ9qU8pZeAlcZ6W6KQHRrexmSk4j8Zm6yptz/V 1zsWl8pAEZlSNwSalUupnXtEI+Q8U9ShOJCK9Zkn99KUbyAfUiCBO+CvwS67O2/0+pq1 HfKLyDWTH/l/nBNMa2hkdo8+isxU+nRBJKvWOT66tuWuyfOEKMJLwUzPPLG3XOGqCwoI GFDI93nOMfklI3fzS+sfYbcG7CTCKVbKAJSoST8X9oyayz90T/TlQ/uruqUlMosh+SQA wQjye5/KPqeiEWgL/jBM31Ckb8dqX+NSxemsvbCXRfgr8uQbndCBd1l+BZeAAj4KHu4c nNrA== 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=ZUqxbdN/MLGRLL2SO+JNTqhG+EqU+sUkONTXStK0AQc=; b=ZFj2SIoUzeHVnt45ogXR7RiTYpoAHjwrlt+ANpAvdQi20Y8jpLAmngESbW2zUagpD4 JUkZlAWkVKhurX3Aicb1FwwlNuhWDvTC1+rUrL+qif29NwLWuH4YBNtUJljE2r/CUGgA C5KlNn4KfR7ppZ+ObwcaR/ey138QR8eIUTWLewNur7pvB0RZ3IlGVDWVKEQFXlR6YmP1 w3kFGi8U8YG41tjoE3ee9pAmgqtV3ImHfsvMUiueVBffxoB1tBxRkfHjkcD/2zdGJs5w TMTsW8ZN9xPlkbNjoa9G1gQk1Sh78SMuhKFIIjATn/z8rQuKpFT0bLJICmEgpdTIdlzK lgNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JUmQI2wK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056402279400b00461d5afea01si2259752ede.165.2022.10.24.05.20.28; Mon, 24 Oct 2022 05:20:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JUmQI2wK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233114AbiJXMQW (ORCPT + 99 others); Mon, 24 Oct 2022 08:16:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233294AbiJXMOo (ORCPT ); Mon, 24 Oct 2022 08:14:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B11A18350; Mon, 24 Oct 2022 04:55:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 42ADC612BB; Mon, 24 Oct 2022 11:55:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 559A4C433C1; Mon, 24 Oct 2022 11:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612507; bh=pKT/iQfxBxGioKBlfo90x9MW0lGwQY8QgTHrj5HQNl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JUmQI2wKs8AyNhafoVJbp+Z4gPI1wkY59zQG/zS8icN6M3NlU8N29XU41bRs/enVX xzSVJTmFD600LoPz3MXn7da6pZ56AxmfS9Pm60CXgYqdKpQtJE5iKcUS6aZUlT9qs2 rATxg53oQ9iV7ksEvx0t6T448BHPH/JIxdTfUs3k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.19 014/229] USB: serial: ftdi_sio: fix 300 bps rate for SIO Date: Mon, 24 Oct 2022 13:28:53 +0200 Message-Id: <20221024112959.601347548@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747571496784610894?= X-GMAIL-MSGID: =?utf-8?q?1747571496784610894?= From: Johan Hovold commit 7bd7ad3c310cd6766f170927381eea0aa6f46c69 upstream. The 300 bps rate of SIO devices has been mapped to 9600 bps since 2003... Let's fix the regression. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1304,8 +1304,7 @@ static u32 get_ftdi_divisor(struct tty_s case 38400: div_value = ftdi_sio_b38400; break; case 57600: div_value = ftdi_sio_b57600; break; case 115200: div_value = ftdi_sio_b115200; break; - } /* baud */ - if (div_value == 0) { + default: dev_dbg(dev, "%s - Baudrate (%d) requested is not supported\n", __func__, baud); div_value = ftdi_sio_b9600;