From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 485DCC433EF for ; Fri, 3 Jun 2022 19:29:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349285AbiFCT3A (ORCPT ); Fri, 3 Jun 2022 15:29:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241021AbiFCT25 (ORCPT ); Fri, 3 Jun 2022 15:28:57 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23EFB580F3 for ; Fri, 3 Jun 2022 12:28:56 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 25so11145314edw.8 for ; Fri, 03 Jun 2022 12:28:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NLcd3Cw3hjI1NfLbhZ7+1EK5axo7GcECogVJtB2kQoo=; b=n63Lg6qyTjWXwuTeS8v+72aLJUJKw4vX/fzlGVF9KlWhmWjFlvsfSiHMmLjmJq8wL+ J1+x0KJSnIYLk4zcB8ymTQjBIInkv9QNNiGw+gbTuk6Agp3JicslpgubNSGLpQP5/Qnp V13l+3GFTz3kWlwBXsM4/d9NyoyY6+LvUMNLw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NLcd3Cw3hjI1NfLbhZ7+1EK5axo7GcECogVJtB2kQoo=; b=S3T9CWb1+GsntUIDMGBrf307Bu7FnqQXUZhn6tdM7cOlIJzRMquCeUgLuBxv8eYRix UDQt/PkbAb0WUje+AgRmk1mpPPqTColmAEoyw5mbg5Q5iHWgv4qK6MqtAhPFI50vAn1n Co5IDuPZQEVB44cWf2LeapWXpTTrddKEP5jobZJFKF6al+P7AfC8WXVnoT3ark8WNI5F 13vhlnfrsenPhKlvm6LtSv/KScXSSXqeIN8gR/noS7wz6rD7tlwZaebQPfmY5UhBsJf7 HruN8USAE4MG+o2jVpqXsAXKmg7uHjQJ1aSANJM+hK9oYQqKi83PLIRy4t0OhpQoW+z3 tpAg== X-Gm-Message-State: AOAM530Cq/ENWnW+8szq8g3+AprFGoiiEcd+EAvJflI9tsASIjt9jWqE 5Gt9XwNMnZQk0y8Q7ByhTEiStvO3DZ/B4qZqSPU= X-Google-Smtp-Source: ABdhPJy5y9ZdktNHSybpOtgW9xnl5/OWvGDbNDWHKkSoFXeOTxHcm1x1MO23HGMZfZsDZM62x7aBWw== X-Received: by 2002:a05:6402:3207:b0:42d:dba6:8ef0 with SMTP id g7-20020a056402320700b0042ddba68ef0mr12848941eda.410.1654284534530; Fri, 03 Jun 2022 12:28:54 -0700 (PDT) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com. [209.85.221.41]) by smtp.gmail.com with ESMTPSA id g8-20020a170906520800b006feb3d65337sm3151649ejm.102.2022.06.03.12.28.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jun 2022 12:28:51 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id p10so11578982wrg.12 for ; Fri, 03 Jun 2022 12:28:51 -0700 (PDT) X-Received: by 2002:a5d:6483:0:b0:20f:d046:6382 with SMTP id o3-20020a5d6483000000b0020fd0466382mr9544675wri.342.1654284530598; Fri, 03 Jun 2022 12:28:50 -0700 (PDT) MIME-Version: 1.0 References: <1652692810-31148-1-git-send-email-quic_vnivarth@quicinc.com> <3866c083-0064-ac9a-4587-91a83946525d@samsung.com> In-Reply-To: From: Doug Anderson Date: Fri, 3 Jun 2022 12:28:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [V4] serial: core: Do stop_rx in suspend path for console if console_suspend is disabled To: Vijaya Krishna Nivarthi Cc: Marek Szyprowski , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, LKML , quic_msavaliy@quicinc.com, Matthias Kaehlcke , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fri, Jun 3, 2022 at 11:54 AM Vijaya Krishna Nivarthi wrote: > > >>> Add a start_rx in uart_resume_port after call to set_termios to handle > >>> this scenario for other drivers. > > Since start_rx is not exposed it doesn't seem like we will be able to > handle it in core. > > In your drivers, Can we add a call to stop_rx at begin of set_termios > and then undo it at end? > > That would ensure that set_termios functionality is unaffected while > fixing the broken cases? > > If that's not an option we will have to go back to a previous version of > limiting the change to qcom driver. How about this: add an optional start_rx() callback to "struct uart_ops" and then only do your stop_rx() logic in uart_suspend_port() if you'll be able to start it again (AKA if the start_rx() callback is not NULL). That keeps the logic in the core. -Doug