From patchwork Fri May 18 13:25:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10410753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FF336031B for ; Fri, 18 May 2018 13:26:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E66C28982 for ; Fri, 18 May 2018 13:26:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52DCF28988; Fri, 18 May 2018 13:26:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D36F528982 for ; Fri, 18 May 2018 13:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbeERN0G (ORCPT ); Fri, 18 May 2018 09:26:06 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36859 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbeERN0D (ORCPT ); Fri, 18 May 2018 09:26:03 -0400 Received: by mail-lf0-f66.google.com with SMTP id t129-v6so13965273lff.3 for ; Fri, 18 May 2018 06:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=g6GwmlGf+LASAnXbwlwEu8vsUJhnIg/8uu4kPw88+p4=; b=G5Nc7hzWDLOjuAXgg5o00FpodpB3+aObGPG7u4L+j3HrY+1Y+HFJIG+Y0/YXslMd7L 6WZOPYILB+pBL13p1dfHSOqEcQcNTWc//9xeLyVTrpqHqWIJ/xL+JKCmRjaF+FQ1KJmH P0xVfTpGlshepJCp113R8gVzA7L5w81PK6ArjtTlva9QyPq1rwACLTg2r2aHwgUX9Lu+ JsKiitceP3XSxROajY/Gso81bmOlrGzj+pMO58mIKTJvC55IZriJY6t2zwUpUw1JLahf zsMucT0CY6QP6BxSKNNF9v33pPa40lGkFq2wObFT02Sowur3RzM1d03ZiSrRnmUndSRO R0mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=g6GwmlGf+LASAnXbwlwEu8vsUJhnIg/8uu4kPw88+p4=; b=e1SB91Ci/KkbGLcBHhJ+V1v8aX4d5hMNjHNfaQnO3GbxvRnyDW49BGPTnRuvaK9OkH q7Z5Idq5zA1Q2WdtNy0seCVscOGXqUFw4EaME/s3jTVTAKDt8pNCXYHZ3YR+58H+CCG0 vZ6nw2S/Z+J89+klXmXYtkns2gQUvqgwjaKXK9Y4UAzBbGbQWLfQhuHVHRaPRalKYIuc uXR9TZOMvXuNHxe1wixZzkL/LB1YLSNvWj5XP2LLvqP9N5o3aWj9/ha5hG2+H50fgYp3 03v4nqeKG5ESC27m+tB0mory+lwiWHtsHCRaM0DeRh4tuwMMOtjbGc9hBSkVi8pKQ7Io G0cQ== X-Gm-Message-State: ALKqPwdKL6tI7hfoyHLKDZ3+QmMvGrQg0IkqlW33O+l/ajH0ddPU4QAG q7ec8YrXfSlnXHCCKjpqJyIgtVH3 X-Google-Smtp-Source: AB8JxZrLs2EVSdgIIULRKsL5qDUcT16HU1neUiS2+M5nQFn8neo2WwL9qJ9n3UqF7199OesgZX3L6Q== X-Received: by 2002:a2e:9911:: with SMTP id v17-v6mr5674741lji.57.1526649962235; Fri, 18 May 2018 06:26:02 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id g132-v6sm1847683lfg.23.2018.05.18.06.26.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 06:26:01 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1fJfOS-0005fc-MG; Fri, 18 May 2018 15:26:00 +0200 From: Johan Hovold To: Johan Hovold Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: [PATCH 1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup Date: Fri, 18 May 2018 15:25:47 +0200 Message-Id: <20180518132550.21749-2-johan@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518132550.21749-1-johan@kernel.org> References: <20180518132550.21749-1-johan@kernel.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since forever this driver has had IXON and IXOFF mixed up, and has used the latter rather than the former to enable hardware-assisted software flow control on output. Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 7ea221d42dba..62c99871863c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -2342,12 +2342,8 @@ static void ftdi_set_termios(struct tty_struct *tty, } else { /* * Xon/Xoff code - * - * Check the IXOFF status in the iflag component of the - * termios structure. If IXOFF is not set, the pre-xon/xoff - * code is executed. */ - if (iflag & IXOFF) { + if (iflag & IXON) { dev_dbg(ddev, "%s request to enable xonxoff iflag=%04x\n", __func__, iflag); /* Try to enable the XON/XOFF on the ftdi_sio @@ -2372,7 +2368,7 @@ static void ftdi_set_termios(struct tty_struct *tty, } } else { /* else clause to only run if cflag ! CRTSCTS and iflag - * ! XOFF. CHECKME Assuming XON/XOFF handled by tty + * ! XON. CHECKME Assuming XON/XOFF handled by tty * stack - not by device */ dev_dbg(ddev, "%s Turning off hardware flow control\n", __func__); if (usb_control_msg(dev,