From patchwork Mon Oct 24 11:29:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp399868wru; Mon, 24 Oct 2022 04:45:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6j9jkWWlmkeFGwXdNTkgrNr2bmo8dHBu9vNWIFNrfG/hr1NB8PR6+k/8NYkVhD1mci1n+0 X-Received: by 2002:a05:6402:278d:b0:461:60d4:8ea4 with SMTP id b13-20020a056402278d00b0046160d48ea4mr13512372ede.419.1666611940032; Mon, 24 Oct 2022 04:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666611940; cv=none; d=google.com; s=arc-20160816; b=qoI4eFkedLrAhoisCqtU7mB141ejP7toWWEk9Hc1f+7SsuGS5xidPGud9jP1KWg3kW +PdQlQiNar7fSDT3tgbKW+l7mb9/j737ElnN5gNHUUX3TE/pWkmadMhSQEUlYfbi2JqY 39aZ/mU+BvQi9pI4iEFVHzLWX/3Sl/eZoowxuphQ/oLeaU/FRTtE3rPtWsUWNgFhhFMd Wdq+SavlQINOKbRL2Lj6WiP1Zen4hkRgcNlSHbIWt4n34gRMiSEpaTsS1iXJTjTCPlqE iBjRhyLambolYHoYYOeIViI0fV6A8W2qWUu6rhdOYXf0SnnIR8TMWwnFvTCHlpD0YcTJ SlEw== 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=pScswNFgRSYikkGNOf5+HHLrlvdzFHDErhiYfjaUJg4=; b=oN3u7mZdL/BY+QF5DB5GfqmOxzcxcHPcyl8HvYm97Z9oCe6w3GlXS/D9MQpapA+jIx 8v0sD/PwD93AYmqt2rou5b8Q2PP+7XHCFhKOA6mLol8CBqk3/fp4wpGmjMDpf6/ECRrR WZpUCdSshfntAapcWN8HqhS/+RUNrXcZqrChxUxAhERueT3o3j3/kcMvoKYSXdGO2QTY 1PiO4z/cQ7ReJliarO0abVjapM1JSZJzdBg7MitM8F+ez6ICHaRXut7C0/NX+teLm6KP f2MOoTia+w6I0M/bg+uddyvy0ucz2Dhpa7XBEZ8r1Y38WIpVCMnp9N7fBiLOwbyyv9Zf 1Yqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nsfv3cWZ; 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 ey10-20020a0564022a0a00b004615c5728e8si7493824edb.494.2022.10.24.04.45.16; Mon, 24 Oct 2022 04:45:40 -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=Nsfv3cWZ; 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 S231256AbiJXLoy (ORCPT + 99 others); Mon, 24 Oct 2022 07:44:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231422AbiJXLnn (ORCPT ); Mon, 24 Oct 2022 07:43:43 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63A3B6F263; Mon, 24 Oct 2022 04:40:43 -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 sin.source.kernel.org (Postfix) with ESMTPS id 5A44BCE131B; Mon, 24 Oct 2022 11:39:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34126C433D6; Mon, 24 Oct 2022 11:39:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611561; bh=u+XRH3Ck7chIHn26YPp8pHDV5FsHo7foLSjyHN9IQYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nsfv3cWZxIXrRCyPKSeUYLMvpQrbGgtKjAR81ox6mwGoh+kUNc41QNY8O4v5kkBkd 1HFsP0LU0TezNg+VMSRQbexKo5MAioWZg09uMelalAMYN4CDLUlpcDO2I6x/dVV+5F yAl6Pk7lIi+TCoctEFWqjVKL4OAv4ffgRrGRv9bk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.9 026/159] USB: serial: ftdi_sio: fix 300 bps rate for SIO Date: Mon, 24 Oct 2022 13:29:40 +0200 Message-Id: <20221024112950.356420829@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112949.358278806@linuxfoundation.org> References: <20221024112949.358278806@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?1747569281632965423?= X-GMAIL-MSGID: =?utf-8?q?1747569281632965423?= 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 @@ -1340,8 +1340,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;