Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1437649pxb; Thu, 14 Apr 2022 06:17:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyz4PYNA3gzK4zUDgPqDjCx0q/v8+LMa3YCQShZj3K7l9p2GI3UQAyanZn+V37r7GNaGGw+ X-Received: by 2002:a17:907:3e1d:b0:6d7:1031:7e0 with SMTP id hp29-20020a1709073e1d00b006d7103107e0mr2237225ejc.580.1649942260707; Thu, 14 Apr 2022 06:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649942260; cv=none; d=google.com; s=arc-20160816; b=QunCxwTst0l0Zmxc5gmS6Nu68RZCFe/M4whQv6s8mT+0gS8vgB24ruamtQtwx6kLZ4 69lEbB7j/nv+7JGMvzrgvXYMP742kvjppeqQgze2fBBEq+2AZfF0rWA6FjOReWo35TJU gt0wICIZ5MX5spse4HSaf4nSrP+o4apx8+mFaq8rinW8S+SXcCVodU19jBhI2sygVKim /yi091YYgLKQYI26uMiLSKe2187/03v7DXTtpmEdFf2KTMp0Dlsmi2/HigM9QqXXPZOo GKBhNH7JwiRHQQI1Y1UhSi4lrEw3ipiAdgq17MhC3fghz2dcfNJvJHxKHi4P9stB9QTB jYPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=jqY7wrxDvYGbT9RkRCrN/ea0DRB7hop/p6EzvqDyB0g=; b=ydnNaVJQxNZwA6iHvTg/fBQ+7yQ2zR9c1IJenVvWsBG/X7Ktnnhz/iBODIKPsDxuNz NsP5s+d9ddr2h8BXZSE/gsWTSk2jpxGk+gQ9Ht2o+O2a1Su6do/m7F0PPOm6ZDoATNlo zc5FGCmKylOygT91VwjE30fhj/S6ywMIPvqasxgVYalB3DhWiLdi0QIqKnzcKEGfcw0H mGt8g2mrPt96dqiQup/FodaN/eMUvbMdhA935sqQT9DhlpFrDyu+BoM9+UND2PcVtSIB qTZlNMh46MFp/nCIYHr3J4GSnOVKwT5uiT/hUMDxWva9QmQx+ud++sZgf0LXSY7YlF2m vvKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="c6eWv1y/"; 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=siemens.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a1709064f1000b006df76385cfasi1980304eju.410.2022.04.14.06.17.15; Thu, 14 Apr 2022 06:17: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=@siemens.com header.s=fm1 header.b="c6eWv1y/"; 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=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241911AbiDNJqR (ORCPT + 99 others); Thu, 14 Apr 2022 05:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241188AbiDNJqO (ORCPT ); Thu, 14 Apr 2022 05:46:14 -0400 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 14 Apr 2022 02:43:50 PDT Received: from mta-64-227.flowmailer.net (mta-64-227.siemens.flowmailer.net [185.136.64.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0718E6EC7F for ; Thu, 14 Apr 2022 02:43:49 -0700 (PDT) Received: by mta-64-227.flowmailer.net with ESMTPSA id 20220414094239e7bbd67e61380eda71 for ; Thu, 14 Apr 2022 11:42:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=daniel.starke@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=jqY7wrxDvYGbT9RkRCrN/ea0DRB7hop/p6EzvqDyB0g=; b=c6eWv1y/xwUKqTwdibfmCwGNo7e5Kcqsm4N+tlhKQaTRFfiawl0mUUPxLkGmsbKnM7HJ99 cwcThCoETZPRbtWx8V3zuxvxsIefD7mzXAffqwwwWcsrD6TY/IP0fsh8J7iBWGrEJzMTovqs PJ9DdS7UuhDZJnMyJ6swZDhzfVosE=; From: "D. Starke" To: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-kernel@vger.kernel.org, Daniel Starke Subject: [PATCH 01/20] tty: n_gsm: fix missing mux reset on config change at responder Date: Thu, 14 Apr 2022 02:42:06 -0700 Message-Id: <20220414094225.4527-1-daniel.starke@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-314044:519-21489:flowmailer X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Daniel Starke Currently, only the initiator resets the mux protocol if the user requests new parameters that are incompatible to those of the current connection. The responder also needs to reset the multiplexer if the new parameter set requires this. Otherwise, we end up with an inconsistent parameter set between initiator and responder. Revert the old behavior to inform the peer upon an incompatible parameter set change from the user on the responder side by re-establishing the mux protocol in such case. Fixes: 509067bbd264 ("tty: n_gsm: Delete gsm_disconnect when config requester") 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 fa92f727fdf8..3d28ecebd473 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -2373,7 +2373,7 @@ static int gsm_config(struct gsm_mux *gsm, struct gsm_config *c) * configuration */ - if (gsm->initiator && (need_close || need_restart)) { + if (need_close || need_restart) { int ret; ret = gsm_disconnect(gsm); -- 2.25.1