Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp63127lfe; Fri, 15 Apr 2022 19:38:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqhcVk9mxOmngcnfM+cPD4qrCEJZhiVbGnLiLIBkU3N9xJ/Sr2DV2kr28B+5SiOvOelCmI X-Received: by 2002:a17:902:d88a:b0:156:1609:1e62 with SMTP id b10-20020a170902d88a00b0015616091e62mr1786961plz.143.1650076737099; Fri, 15 Apr 2022 19:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650076737; cv=none; d=google.com; s=arc-20160816; b=U9vgO3Kg7YRsz3hghaLaSGFIChzcdEFx5Ux8yRzVjh3yUUPu1BDEBVQyALAKwvSe8k HzUL9uxDJJrzyi0FDKLY5mBhMEc4yvRZmAjRPoPD8JfI0GKZ89bLtUP+PjpTsoDuRK1v cMORi2ojBWteNVpuU1z4cwqg3ZQ6PJ+lun4NihQ5gi4N+xgKseeCFKuFQYhV0TCwuE4J PRvsvGm2gjNvI7WIlRPtUsS5F6RWhlUxBGFaOBf7Qe94y9RmGSkAQf2mezeLm8ULZlO2 FwVTxFdCBTO/O80M71RDBrqWBthOu7xGNXUILkGJo2iULYijAId9ojs74F+b5WkBnOAN i8nw== 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=5g+wMdYP6RKx30L4Qg954mJKx55C1A5HeCrWiqJ997Y=; b=nah+487plMU4W2tPRkYB3N6+O/vNrqlqk0b6ch3+zKoxcLLwWw97+LkkB8imueU8y0 PTg8dogICJ3iXDPAG1hw6sbuCFKJAKx1q6fKjE23C8BjLfpQLtSmUFJYum0g8953Iif1 Z0NaR8eOjMqtWVxOtKsoJ/qtpSaIgEftxxqU373GDFV5lKrJ4XH+xB0hFRSE1o1zrYPk MXdGCDdfmWiXxJ1fZa6OOEAH7xYJgN9n6+AlEEs00lxk1zyVt2lw5cCV57VWNkucatNp uZECuIaj1zbBhdD72h3gT0ILpmkVC1qt2QvX+jy81HO2ByIIx1BlCUnlVL7uO7fv5O/6 lkvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YtaTYBIq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b14-20020a170903228e00b00153b2d16577si3131912plh.383.2022.04.15.19.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:38:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YtaTYBIq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EAE693F7527; Fri, 15 Apr 2022 18:52:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237369AbiDOGco (ORCPT + 99 others); Fri, 15 Apr 2022 02:32:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241005AbiDOGc3 (ORCPT ); Fri, 15 Apr 2022 02:32:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 445A83FD88; Thu, 14 Apr 2022 23:30:02 -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 DEC64B82BF0; Fri, 15 Apr 2022 06:30:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 065EAC385A6; Fri, 15 Apr 2022 06:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650004199; bh=psflDfKqWvAP0ydCreaP3PvJtpFOl3v8AIMyqapUG2Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YtaTYBIq2FZeUlOqOuoVkkrpzAe7DAZ+feUTWibqx7lujuGLlhs+U36JpzhuVccoJ gN1jWTB+fPbV9VEJsStX6FLuYf+UrBdOT/n6qkUfc5oR1prJGNDCinedGOLWlvzp5y js7f9zzM8NCw1YhJHUnZhNB6w84tIDlf+vsMGvmA= Date: Fri, 15 Apr 2022 08:29:56 +0200 From: Greg KH To: "D. Starke" Cc: linux-serial@vger.kernel.org, jirislaby@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/20] tty: n_gsm: fix missing update of modem controls after DLCI open Message-ID: References: <20220414094225.4527-1-daniel.starke@siemens.com> <20220414094225.4527-15-daniel.starke@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220414094225.4527-15-daniel.starke@siemens.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Apr 14, 2022 at 02:42:20AM -0700, D. Starke wrote: > From: Daniel Starke > > Currently the peer is not informed about the initial state of the modem > control lines after a new DLCI has been opened. > Fix this by sending the initial modem control line states after DLCI open. > > Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Starke > --- > drivers/tty/n_gsm.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c > index f3fb66be8513..e9a7d9483c1f 100644 > --- a/drivers/tty/n_gsm.c > +++ b/drivers/tty/n_gsm.c > @@ -369,7 +369,11 @@ static const u8 gsm_fcs8[256] = { > #define INIT_FCS 0xFF > #define GOOD_FCS 0xCF > > +/* > + * Prototypes > + */ We know they are prototypes, no need to say it :) > static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len); > +static int gsmtty_modem_update(struct gsm_dlci *dlci, u8 brk); > > /** > * gsm_fcs_add - update FCS > @@ -1479,6 +1483,8 @@ static void gsm_dlci_open(struct gsm_dlci *dlci) > pr_debug("DLCI %d goes open.\n", dlci->addr); > /* Register gsmtty driver,report gsmtty dev add uevent for user */ > tty_register_device(gsm_tty_driver, dlci->addr, NULL); > + if (dlci->addr) /* Send current modem state */ > + gsmtty_modem_update(dlci, 0); Please do not put comments at the end of a line like this. thanks, greg k-h