Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp619742pxb; Thu, 17 Feb 2022 10:57:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9WmE4owwbQODvK8QK0plDFWzxwhJgsKAxSXfqZ4DZ7GlSVfeg6obkF5VXcp07c0eKdl89 X-Received: by 2002:a63:3dc5:0:b0:370:d638:5826 with SMTP id k188-20020a633dc5000000b00370d6385826mr3493581pga.184.1645124226369; Thu, 17 Feb 2022 10:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645124226; cv=none; d=google.com; s=arc-20160816; b=x6IE7A5YOP2imGVajTRO7vNf6YrugttFjaTiQrKT8EQzfXJI4hcZNLBal8D+59xf0o 1a1EezUsb7m8EuI/jgaLxC56Zsl1KnpB1h2C/1iCe2rp6C2PpCea598w5hpZOyjXP3+u CEYGX2Q8p1ATKjBKpU8VJUTW2236WusTmmlnqIJWbtTzofE4caRlkRkxr3NGLF7agdsL jJo/+rEbTiS7wOqgt40iMzdm1nKWEXLlui0VeiAGQQHVzsMY8xvDrkoz76KrQ0Qtkol1 5USqTZSyOAIbtaGoViuUi3wUxmxwZG/2at5jBQaPRxrMwwgp9PjFUIx5Oud1OoZhq0eW nRag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oSJ7xjQkbD/p3G/RmAY5rQukyvmuUXnZ/ZrDUFoinBI=; b=bG6BVSbGRz65i31e/OsV8gNjyEA7PXZYcNQ405jn3H2Bt7MYY7EQIoPVSxm/39L3CS BvEr3U+0RHRcYwct6QaUcYpfGOi1CJHy6hJaiNeXo4MTmqWBnv62T4hVJ+Xv0jFoN+AX FvBcMd317D+Xhqzs8E1ghbRgQrjhABL2J7+X1S4VffVcpGxntWl7iQMLWMWEh6xZ4rkN 1LlckWnxH3J8wdF9UQI2JBMLJ+FroV2hJOEcwRIQDofutdVTOKXaihXc3xu4+o21ONHd mh4DgfnA+PdeZGfZEJ+2IRBMbfZmbYWC1qhDMGzL4U+C6FFcy9PJ4DOS9i/UGx9vzlQs koSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PPfq2q1N; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo10si1696671pjb.97.2022.02.17.10.56.51; Thu, 17 Feb 2022 10:57:06 -0800 (PST) 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=PPfq2q1N; 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 S238903AbiBQJ5E (ORCPT + 99 others); Thu, 17 Feb 2022 04:57:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:37158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232603AbiBQJ5D (ORCPT ); Thu, 17 Feb 2022 04:57:03 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16FD2DF01; Thu, 17 Feb 2022 01:56:47 -0800 (PST) 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 B0D0761D48; Thu, 17 Feb 2022 09:56:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F001EC340E8; Thu, 17 Feb 2022 09:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645091806; bh=Y6DSt3eMZhMvFqHFms72snpahxDJvYRjgVffayLpLvY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PPfq2q1N0wBrSByJLPrhR7fIJOiiav9xPzbH7NlKbtFDYZokVO8TNX9YDxOe4WiA2 v/iX5ew/3wQO1SGhiq+95GXh2xfV1Y0qHioiLNZXD51iOInWNTjlsxL9JR0xU5Fa1M aO7sxKJ2R3dLW0w8vS63wl0XPS3R9giII67JqyvM= Date: Thu, 17 Feb 2022 10:56:42 +0100 From: Greg KH To: daniel.starke@siemens.com Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] tty: n_gsm: fix encoding of control signal octet bit DV Message-ID: References: <20220217080555.5387-1-daniel.starke@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220217080555.5387-1-daniel.starke@siemens.com> X-Spam-Status: No, score=-7.2 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,T_SCC_BODY_TEXT_LINE 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 On Thu, Feb 17, 2022 at 12:05:49AM -0800, daniel.starke@siemens.com wrote: > n_gsm is based on the 3GPP 07.010 and its newer version is the 3GPP 27.010. > See https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1516 > The changes from 07.010 to 27.010 are non-functional. Therefore, I refer to > the newer 27.010 here. Chapter 5.4.6.3.7 describes the encoding of the > control signal octet used by the MSC (modem status command). The same > encoding is also used in convergence layer type 2 as described in chapter > 5.5.2. Table 7 and 24 both require the DV (data valid) bit to be set 1 for > outgoing control signal octets sent by the DTE (data terminal equipment), > i.e. for the initiator side. > Currently, the DV bit is only set if CD (carrier detect) is on, regardless > of the side. > > This patch fixes this behavior by setting the DV bit on the initiator side > unconditionally. > > Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Starke > --- > drivers/tty/n_gsm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c > index 0b1808e3a912..e199315a158e 100644 > --- a/drivers/tty/n_gsm.c > +++ b/drivers/tty/n_gsm.c > @@ -439,7 +439,7 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci) > modembits |= MDM_RTR; > if (dlci->modem_tx & TIOCM_RI) > modembits |= MDM_IC; > - if (dlci->modem_tx & TIOCM_CD) > + if (dlci->modem_tx & TIOCM_CD || dlci->gsm->initiator) > modembits |= MDM_DV; > return modembits; > } > -- > 2.25.1 > All of these are patch 1/1, which is odd :( Please renumber them properly and resend. thanks, greg k-h