Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp982478pxb; Fri, 15 Apr 2022 17:21:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwegmXQ9cvn2qzK8rQ+MRuBYbkCZ+OzqSzMC/is/OaIkI+elqrKT9fgLity+If/3QHbOZzY X-Received: by 2002:a17:90b:4f82:b0:1d1:b8fd:7e36 with SMTP id qe2-20020a17090b4f8200b001d1b8fd7e36mr2206824pjb.194.1650068484369; Fri, 15 Apr 2022 17:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068484; cv=none; d=google.com; s=arc-20160816; b=KwoqUOUzfxHN7kUOm3rjfGMerWTw7WBdXfYTjJXGhwsNq34xQv1hPJ575d6dp9WoLj M9lLdXTC9aGBsTUW5CR0eELpvFHD7VHYLd498T6YnZR1fck3OKq5q48KI2aGMPagiUbB fXZYUp8U1f3oMupo0tTTqol5qdXJYRriZkixSHXDm3qxuBCOGVzGvmWQrZ5vDkf8NzmA uSFCdPEJKEaF/4YF2Jmumf+H34bmlKp6bulaxbKrWG/VYOAoIn0QzNK1GUMVEu0snuuV FQzoZ+rUaobmaYhQ63pGzuSpQjgqyBnXeqne1AO6/M3QvM4Hhdm6rse/pnb+UXEkyjye 6Gxg== 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=Z7aRUVg/NBK+8nrcJXy7Nf2JRF2XdCUorXUFm3o0A/s=; b=uSnJlX9G6jzdxpRdkvXCAZpOYtj/WG/ah94wkCTgxeliEEBesGVUacz2Ern7KY01xC wvXaep5YwCFv7lbTFx7KRX3HumjbqoM8kGC6QpUx09KVod0jzfWLCn/9OpUXCJKJbFdj 88ru+PqDGH2II4/WUbrRu+jCtwDynK9Wc1o3P3NoitFJGUpzlV1Juijw6q5kd5eactnj PUtx1ZAKI/gqdwbmgWz7XqX/vC0/Glnb9h1OM8xNTvMDyIAHiAzpu4dGgOopwNEgXjmS wCWTmcuPMIbSmFJlFae55jnHxe8MccSjCwcjfLM9FOd5ohz4W679RwzfWgoUctuD5Tjk fPDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s7mlmLOZ; 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 b6-20020a63cf46000000b0039cc1700f93si2852977pgj.862.2022.04.15.17.21.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:21:24 -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=s7mlmLOZ; 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 F372FD1CDE; Fri, 15 Apr 2022 17:20:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245441AbiDOHCC (ORCPT + 99 others); Fri, 15 Apr 2022 03:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245147AbiDOHB7 (ORCPT ); Fri, 15 Apr 2022 03:01:59 -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 6F28C101EA; Thu, 14 Apr 2022 23:59:31 -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 29654B82BF0; Fri, 15 Apr 2022 06:59:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17957C385A5; Fri, 15 Apr 2022 06:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650005968; bh=gjZUSGDTebqm+7kMg8qn41MG0S0apgk+Sr5BdM0f3BM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=s7mlmLOZVL9wubHJz12vp4Q5rhFTSrmrxTAENiUJ/M95LOskQc3ZxTSAJIUEUWINc LXGoGFxiwDj1iuuH2pP0wIehea0dYF1fcMHbCOFCvBIxgUZfneMr33fKPgj8DQjnSW 5XGTTB4YEZRNgLg/lEpAyfCHQF24VJEC/kq+dlsM= Date: Fri, 15 Apr 2022 08:59:25 +0200 From: Greg KH To: Vijaya Krishna Nivarthi Cc: Jiri Slaby , agross@kernel.org, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, quic_msavaliy@quicinc.com, dianders@chromium.org Subject: Re: [V3] drivers/tty/serial/qcom-geni-serial: Do stop_rx in suspend path for console if console_suspend is disabled Message-ID: References: <1649316351-9220-1-git-send-email-quic_vnivarth@quicinc.com> <1649316351-9220-2-git-send-email-quic_vnivarth@quicinc.com> <0f52c6aa-46be-6971-76df-364150b1c1e1@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Apr 08, 2022 at 11:45:11AM +0530, Vijaya Krishna Nivarthi wrote: > > On 4/7/2022 1:21 PM, Jiri Slaby wrote: > > On 07. 04. 22, 9:25, Vijaya Krishna Nivarthi wrote: > > > For the case of console_suspend disabled, if back to back suspend/resume > > > test is executed, at the end of test, sometimes console would appear to > > > be frozen not responding to input. This would happen because, for > > > console_suspend disabled, suspend/resume routines only turn resources > > > off/on but don't do a port close/open. > > > As a result, during resume, some rx transactions come in before > > > system is > > > ready, malfunction of rx happens in turn resulting in console appearing > > > to be stuck. > > > > > > Do a stop_rx in suspend sequence to prevent this. start_rx is already > > > present in resume sequence as part of call to set_termios which does a > > > stop_rx/start_rx. > > > > So why is it OK for every other driver? Should uart_suspend_port() be > > fixed instead? > > For qcom driver we know that set_termios() call in uart_suspend_port() will > recover with a call to start_rx. > However that may not be the case with other drivers. > > We can move stop_rx to uart_suspend_port() and additionally have a start_rx > in uart_resume_port() > Please let know if such a change would be ok. This should not be something that each individual driver has to do, please fix it for everyone. thanks, greg k-h