Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5909121ioo; Wed, 1 Jun 2022 15:43:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1FJtB0v2Rqv/lKvqL3Di/jMwAlh3Y/7N1B5zPUP3d2jpIvRCa/3FelEHxLY7Hsf7m5AM+ X-Received: by 2002:a17:90b:4d0e:b0:1e2:bcd7:c68c with SMTP id mw14-20020a17090b4d0e00b001e2bcd7c68cmr1761218pjb.74.1654123406136; Wed, 01 Jun 2022 15:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654123406; cv=none; d=google.com; s=arc-20160816; b=oMSr3hYo6silEAaCsOjDU+smyAvw1r1ifYQSbul0+jLUJg6n1xBC82kXxFI5ukUwmA MBZvYEez6v2yG0N10IPROCcDcImLMwH45hHAGLWqgXytO9MU7DjIs0OUaTzVKjd1/Bo/ gOWYyQm03boU6NFy0o5ZbRzaIYKHH3vxv9MVPVGymHiD6kXLMn3IsyXGGPq7HYlsHuuW qvy6ZVraSfOv5POUpwhIf9Nwb3w6gSly3cRxNZatO7KA8MaeCnlkbFh5vP73YkYyfuU3 AbgbwCAU/SpVjDTU8Rg7LRZ4iBuCXUvnseXnqASkDtrOOGU0AjeysUEdmLyMKCe8pZbq KlaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=o7I3DBtTGuYXyhj8t1Yuhi5GTNtTOSBL6ssawjuQ1rM=; b=emToRtx8e4/1A2JZl0l6RC5yLOymckebpt745OXj7X5LAYYs38EK0YxwrC2NKj/PTb kHE//2bIPXIen3p2V11IMba/uRA1hltokKaK+SJsvuyn+Zm1P5tIObv/gINerbf/1kwB AXFnOvyVmD5ZI+fdwTPkb/vuSwGUyy9bWqb6DBLW5QhVPWuhFsddS5UIry4/V7xAApHv 0rj6YTQLUY+7iJ3g5tITskk53n1tn3jIjzRrg4+dZAbMAsWiRWAjvgQs1t8wb+oDEiJw ZisX6UmbvUF/3D3KCGj5stOtoLJCIBCtEpmuZpKD3anTdaGSGTGyCcBGOIplFl6wIKGX 9qyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ST29fSCJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a23-20020a621a17000000b0050dcc1acf09si3328149pfa.111.2022.06.01.15.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 15:43:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ST29fSCJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4D6365E0; Wed, 1 Jun 2022 15:26:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232191AbiFAWZ4 (ORCPT + 99 others); Wed, 1 Jun 2022 18:25:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232184AbiFAWZw (ORCPT ); Wed, 1 Jun 2022 18:25:52 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85EB06446 for ; Wed, 1 Jun 2022 15:25:50 -0700 (PDT) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220601222544euoutp0215d64eac45a22cd170dd7461000544ce~0n4I3aWvT0730907309euoutp02X for ; Wed, 1 Jun 2022 22:25:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220601222544euoutp0215d64eac45a22cd170dd7461000544ce~0n4I3aWvT0730907309euoutp02X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1654122344; bh=o7I3DBtTGuYXyhj8t1Yuhi5GTNtTOSBL6ssawjuQ1rM=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=ST29fSCJXQ9hus2IXA2ieP4uw7x16htW2WcK4pu0kTfhxoAlB4EQVhZdBqrMb8vgV pZfR7pywPggWA2ZiGMas9PmYIjrCt1LaEOLwnx1lG5dELcgQGQG7Uj9uEhswT+J1bg pHUUGgVCe+UxrkVVJTCeaImz7HcTuaErXjpATUdQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220601222543eucas1p29724fecf05555f495418f7f5f1b635b5~0n4H8_Lwf0069400694eucas1p2j; Wed, 1 Jun 2022 22:25:43 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id EA.92.10067.767E7926; Wed, 1 Jun 2022 23:25:43 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20220601222542eucas1p22b5391bbb854871b63c6d9e099bdacee~0n4HF3kZr0038600386eucas1p2G; Wed, 1 Jun 2022 22:25:42 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220601222542eusmtrp17c8b491c3b9b79f777238579b4ad675d~0n4HFMtdA0738007380eusmtrp1C; Wed, 1 Jun 2022 22:25:42 +0000 (GMT) X-AuditID: cbfec7f4-dd7ff70000002753-30-6297e767c20d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B6.E8.09038.667E7926; Wed, 1 Jun 2022 23:25:42 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220601222542eusmtip10a26c6e7b7a7e70eeb359295c4949a73~0n4Gmv1zj0182901829eusmtip1E; Wed, 1 Jun 2022 22:25:42 +0000 (GMT) Message-ID: Date: Thu, 2 Jun 2022 00:25:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [V4] serial: core: Do stop_rx in suspend path for console if console_suspend is disabled Content-Language: en-US To: Vijaya Krishna Nivarthi , gregkh@linuxfoundation.org, jirislaby@kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: quic_msavaliy@quicinc.com, dianders@chromium.org, mka@chromium.org, swboyd@chromium.org From: Marek Szyprowski In-Reply-To: Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRmVeSWpSXmKPExsWy7djPc7rpz6cnGUyZp25xdtlBNovmxevZ LN7NlbG4vGsOm8WZxb3sFp83PGa0WHxpJZvF10uTmS2O33nK5MDpMbvhIovHplWdbB77565h 95i4p87j8ya5ANYoLpuU1JzMstQifbsEroxbny8zFbwQqzg6ZS1bA+MuoS5GTg4JAROJc+/b GUFsIYEVjBITN6R0MXIB2V8YJSZvvswO4XxmlNiz+DAbTEdD61VG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JzM stQifbsEvYxbny8zFbwQqzg6ZS1bA+MuoS5GTg4JAROJhtarjF2MXBxCAksZJbZsn8wKkZCR ODmtAcoWlvhzrYsNoug9o8TRvQvYQRK8AnYSHxpmgBWxCKhIfFoD0cwrIChxcuYTFhBbVCBJ Yt7e1YwgtrBAusSThduYQGxmAXGJW0/mM4EMFRFYySgxddMxZohErMSrg89YILbtYZJ4+2op WDebgKFE11uQMzg5OAXsJXoP3mWDaDCT6NraxQhhy0tsfzuHeQKj0Cwkh8xCsnAWkpZZSFoW MLKsYhRJLS3OTc8tNtIrTswtLs1L10vOz93ECIzEbcd+btnBuPLVR71DjEwcjIcYJTiYlUR4 S3ZNTRLiTUmsrEotyo8vKs1JLT7EaAoMjYnMUqLJ+cBUkFcSb2hmYGpoYmZpYGppZqwkzutZ 0JEoJJCeWJKanZpakFoE08fEwSnVwBT9MkA5J6O/SUR/2er1UXfyaqv51XZLJBWt/dJ7StX2 ef6621skrzrbsUbrbFkxi2l7DSPr9U1qvwsMy7Vb8h5uNxWZLnbOyZrJi0NBOy/de0Wr9JTT X+fPLJi0sbjliuTs/DUSHp9c36ZoL1eaZMEwp+fpHBG76Ena6b9/PtYV/CpW/4R1p05z48wj 3SU6hwwTz7jv+bHlbtbDVUeC3VPXKPXUKB0xnn/rUdKRFdmh61/+3J908tgyJ7X3OV8eT281 TMl1v/r5tpDRku+/qtec+jYh5KUgC9OZ+BWP7Sc9rs05EiBcMFPu8afzU88UxT9f6ZX3iCGv g8lxid0XQ8NbLD4xJjsflWuZ7Pi98pESS3FGoqEWc1FxIgBIMvPjTQMAAA== X-CMS-MailID: 20220601222542eucas1p22b5391bbb854871b63c6d9e099bdacee X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20220524115408eucas1p1ddda7aae4db0a65a7d67d6f8c59d404b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220524115408eucas1p1ddda7aae4db0a65a7d67d6f8c59d404b References: <1652692810-31148-1-git-send-email-quic_vnivarth@quicinc.com> <3866c083-0064-ac9a-4587-91a83946525d@samsung.com> X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, 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 Hi, On 01.06.2022 13:24, Vijaya Krishna Nivarthi wrote: > On 5/24/2022 5:24 PM, Marek Szyprowski wrote: >> On 23.05.2022 23:32, Marek Szyprowski wrote: >>> Hi, >>> >>> On 16.05.2022 11:20, 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, during >>>> resume, rx transactions can 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. >>>> >>>> Signed-off-by: Vijaya Krishna Nivarthi >>>> --- >>>> v4: moved the change to serial core to apply for all drivers >>>> v3: swapped the order of conditions to be more human readable >>>> v2: restricted patch to contain only stop_rx in suspend sequence >>>> v1: intial patch contained 2 additional unrelated changes in vicinity >>>> --- >>> This patch landed recently in linux-next as commit c9d2325cdb92 >>> ("serial: core: Do stop_rx in suspend path for console if >>> console_suspend is disabled"). >>> >>> Unfortunately it breaks console operation on my test systems after >>> system suspend/resume cycle if 'no_console_suspend' kernel parameter >>> is present. System properly resumes from suspend, the console displays >>> all the messages and even command line prompt, but then doesn't react >>> on any input. If I remove the 'no_console_suspend' parameter, the >>> console is again operational after system suspend/resume cycle. Before >>> this patch it worked fine regardless the 'no_console_suspend' >>> parameter. >>> >>> If this matters, the test system is ARM 32bit Samsung Exynos5422-based >>> Odroid XU3lite board. >> >> One more information. This issue can be easily reproduced with QEMU. It >> happens both on ARM 32bit and ARM 64bit QEMU's 'virt' machines when >> 'no_console_suspend' is added to kernel's cmdline. >> > Ideally, as comments indicate, the set_termios should have done > stop_rx at begin and start_rx at end to take care of this issue. > > This is probably missing in your driver. Can we check if this can be > fixed? Sure, just point me what need to be added in amba-pl011.c and samsung_tty.c. I've briefly compared the suspend/resume paths of those drivers with other drivers and I don't see anything missing there. > OR other option is > > Add a start_rx in uart_resume_port after call to set_termios to handle > this scenario for other drivers. > > Please let me know if there are any concerns for this options. IMHO this looks like an issue that affects lots of drivers and it should be handled in the core. > ... Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland