Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4581740pxf; Tue, 30 Mar 2021 11:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKpt3Ha+Bt1Ubo9DwCwcfEQDRiU0YDwcz75Bjk4NmPSg8KiQRCR09U+HvN1QHirzczG42F X-Received: by 2002:a05:6402:b85:: with SMTP id cf5mr35785332edb.248.1617128088370; Tue, 30 Mar 2021 11:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617128088; cv=none; d=google.com; s=arc-20160816; b=xSLab5dfflogtQ0h9RSSwxL8RjYMk5wP8Px74rEUMPoHNE9UeKPZ3uZouJbcJkeV8G Rmq1YNurQ1dCa6PL+d8xx0X/+bBHpr9oNvu6iIJAOuX+UCoxXr4+SGluagfQoAWzHy3f EY83vVJUzqLL5V1BB8yLwESinAxGTx6C+Sb6mhHLKPDid37d0kz/l5rz/PwJ/LC5PhSB 0dI7NG9kMcPGpOIsfgZN/CDSi3Uk0QmBPBcTHmNZVOIEjAmID3VlDCCthDyCUwFul9Di zSf24e7fCBKlZbxE4+Kg4DjglA1XvCq3Q+vVcXLPrfPf2vLApCwywTjNzDjM0+f8PgVL qWyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=SzER9ngIZUzsDi9DddE1pUMfm25pdOpiinCZUUajhrY=; b=Tv86dkEX0PpmrjD4kZ2yGmKzCYE6/iTXyfZWbCZlxQO5WvRopGfnLxPlbj5ix5elHa fYlR450IVYxehDOzC2jMgRog6AGuUBEiFBk28Cd87eZfurei0w28Hii04VSN1zH1QqRR ESZbIrMmdUtXCeKxbyqYqskj1xxa/RBJnrMnQHvGnpLwh+LDe9U2FM1ku/Zu+q+44VxP 33Z9z2924Q6i5IriAzDMq9JHVN1QS9PNV5Rov1WSorOdbHzSlOWFeeXlTN7sXAQPl+4d 19F29Fu7b2lB5ubo4kOhdxRtqw/lg0vpJ65RxbJUZvY57ubc7+27Rg6NKxTqw+bTuI2b p1Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pg2Q4AK7; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc2si2287483ejc.653.2021.03.30.11.14.25; Tue, 30 Mar 2021 11:14:48 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=Pg2Q4AK7; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232756AbhC3SNP (ORCPT + 99 others); Tue, 30 Mar 2021 14:13:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:41444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232691AbhC3SMv (ORCPT ); Tue, 30 Mar 2021 14:12:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2D4B619BD; Tue, 30 Mar 2021 18:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617127970; bh=8cd65BTZtf101g5mY/B2N2CWYMXY6mJvb6XeSEgiiw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pg2Q4AK75NrfrWXZT3PUBFl9K54f3b8hbTOYWjniYC6bhvA9NGRLfPqG8ha/zdqjR P1B6v0jCfCXn+83Val1IPREf5G2/GFb4FbUTph0Q49JGv7VqDefQ836CJPxOt9JYTN gd1AUU7FTBiLYOfMKTT6oeWDJgSgbGM36CTfo5kvx/m8Vx1pBYQgK9uWGWerJmnm0M HSjZl+lbwMNA66qGlX+p65+UpgKtkuj4SPtHTzWY6337EpvQXh6BdUKIWe9D0KlF0G q/9P8JYsThsKElJvRlJLlsqMwsNOHYRlfaxKbSWsDBP9iMl+u6KfNmRUWUYRups/SJ pcNE7ZmrHPf9w== Date: Tue, 30 Mar 2021 23:42:45 +0530 From: Manivannan Sadhasivam To: Johan Hovold Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: serial: xr: fix CSIZE handling Message-ID: <20210330181245.GC27256@work> References: <20210330143716.9042-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210330143716.9042-1-johan@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 04:37:16PM +0200, Johan Hovold wrote: > The XR21V141X does not have a 5- or 6-bit mode, but the current > implementation failed to properly restore the old setting when CS5 or > CS6 was requested. Instead an invalid request would be sent to the > device. > > Fixes: c2d405aa86b4 ("USB: serial: add MaxLinear/Exar USB to Serial driver") > Signed-off-by: Johan Hovold Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > drivers/usb/serial/xr_serial.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c > index 0ca04906da4b..c59c8b47a120 100644 > --- a/drivers/usb/serial/xr_serial.c > +++ b/drivers/usb/serial/xr_serial.c > @@ -467,6 +467,11 @@ static void xr_set_termios(struct tty_struct *tty, > termios->c_cflag &= ~CSIZE; > if (old_termios) > termios->c_cflag |= old_termios->c_cflag & CSIZE; > + else > + termios->c_cflag |= CS8; > + > + if (C_CSIZE(tty) == CS7) > + bits |= XR21V141X_UART_DATA_7; > else > bits |= XR21V141X_UART_DATA_8; > break; > -- > 2.26.3 >