From patchwork Mon Oct 24 11:29:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8575 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp418228wru; Mon, 24 Oct 2022 05:14:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM50dvtmMIDecTMK0FhofMtvqPYxRNCJGeFDYdMtruOoujy1AaEhTTcQUKySgVqF3wtQsd1I X-Received: by 2002:a17:907:75c8:b0:78d:b646:e768 with SMTP id jl8-20020a17090775c800b0078db646e768mr27021797ejc.432.1666613657737; Mon, 24 Oct 2022 05:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666613657; cv=none; d=google.com; s=arc-20160816; b=oTZwH9ij+hFU+iefLtXf+pG2kQ2xoYsS5A3ZD1bre44zri0V2Ca0aBmP75OwnyPKIj jUHF8g0AFhVJ3r64AW9Vp4FS1OKtvlKY0WaHDOhGoR+GqI0mcGtSLCUYxF5EZPCeX/Lm ElkY0A8scVrcnKuemK9FFPwDwLygtFLSqlntPZimFM2BhaMxXLGO283E8kdkWgTBj/OC R+2B4V6LWG8wd9rmvBr4KKO65HdRttQtmGsSm35Fegd4eNUf1OL/tbNLnGDmWCfe/XUl iXxhEnykfOg8GxiXcWuP3GPPgj/equYEFdeFJoCCl/HDwbeUP9UAAbhqaTbfwPY5O7Ba wLzg== 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=DaU3fU9X915XWbfFDYmdgDtMx9quPLZBPJtwUhamsCo=; b=uBxwbf67FH9UUCiPVE+q2TR4iOI6VQwLAkbUshLYgnsij9O/rih49nYcSkFkXVPbk+ LGPcwy7JmbHCOAfIPcW59UQeDJKWPZuZJzmAYX8IdmlpgMMvbWgGvOnZknMwvHBZEauJ myXXtunvHljeKmE8zmfG7gEKlXzIHUS0mTjSAl/WlpebMQ6e2eOuBALqyN3nwnQrdCZL HVB+F46Y6kP47KUZ4bKshw4vUkbHA3OZS42UXXy4j8xFXma4mNwaFbakCZ2MzB6LBE/Q lIqLZB6MOCtfnaZhsfxvl2IpvKdxWrhQHD8dLIhSZ7i6kkMRtHNtVcQxuMW5YBA2TaZb p7mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zcTcoqwH; 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 xg14-20020a170907320e00b0072a6c18f1fasi30470650ejb.639.2022.10.24.05.13.52; Mon, 24 Oct 2022 05:14:17 -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=zcTcoqwH; 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 S232590AbiJXMFp (ORCPT + 99 others); Mon, 24 Oct 2022 08:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232586AbiJXMDv (ORCPT ); Mon, 24 Oct 2022 08:03:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C0BB356EA; Mon, 24 Oct 2022 04:50:01 -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 ams.source.kernel.org (Postfix) with ESMTPS id 59ADCB811AB; Mon, 24 Oct 2022 11:48:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8440C433C1; Mon, 24 Oct 2022 11:48:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612107; bh=a7PnIGvopb4QKsMeyez/yTomLe0JNasOnQjCXOfD6PA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zcTcoqwHZ9SQuT4bnkwkMWwAPypis/GCdc5EFbpOxNXwQwhiW+POHAcREJqeW94XK EHDMrC6KlFO/mYPtem4DZQL7/tv9HI93Fdf9NUtpzAQT1c5LiJtztQiiCJz01qQllP glRVrn69GbL77aMXPvBLZmADw6klviDpFmXTlqUI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.14 031/210] USB: serial: ftdi_sio: fix 300 bps rate for SIO Date: Mon, 24 Oct 2022 13:29:08 +0200 Message-Id: <20221024112957.971464744@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@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?1747571083055192028?= X-GMAIL-MSGID: =?utf-8?q?1747571083055192028?= 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 @@ -1309,8 +1309,7 @@ static __u32 get_ftdi_divisor(struct tty 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;