Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp377023iog; Wed, 29 Jun 2022 02:00:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tZ96KLl2/axfHNyHHxTrDUp663SUbOD+jCDLTdl+M9MHlqYJWr8DTQoPkqpgCunNXqGu81 X-Received: by 2002:a17:907:1b14:b0:6ef:a5c8:afbd with SMTP id mp20-20020a1709071b1400b006efa5c8afbdmr2176123ejc.151.1656493225679; Wed, 29 Jun 2022 02:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656493225; cv=none; d=google.com; s=arc-20160816; b=ngipII9FCA6ftTE8Ji406GueJ/xNb7KgjqPDgTp/Pa6A0xezRZY/t3WamzbLWlKRAO fPAh1e7j4J8ILIU6Tr7sLU4O4FxpQij/I+a0VvCdUccGhAOzngRb5L1GCjRM3N5hJNPC 0FJf3f32CsTBqmNGgJjf8mfHKbmx0NuB99I7ZkGeYJxzCs8X+uIkYHcpiegiYO+Icnvw Ygb0HVDCgm+KvzcH4eIP0sxST9x9AuS25A8txoGwpz6YHGydG2w3y06S7GuVO84i+7E1 ayepi6sP9zzx4fI2QPD10Z/6SUH0ik1oHOGTa/KtHe7EJW1u5EJ8JM2OiNQjv0WaAQEd 64lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-id:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=XFzGSmM+LSDJ8pJ7zJltoDYRwPqmEZVmmlSY2UKV7SQ=; b=dWPE6dfLWpnAmS7VKJOHgvefG2lRcGacpCyQNU08HiS/bv4WWOF3OV0qA1WDeJkjPl xcWeWpXFX6Qp1u+yLkBmy2ww2NIJ08KnLv95bmwhah0bSOvJGeP05wA3IpDqUGQ/PD+N OgPeKxhiebXgdVHFO9zDdIGdGrWS8oUbeLPX6EIJ46zgRpUujAZ9E2AQ69mJU6j5b+eH CMtaH8nQjbN4o1Ug+CGHxOfPsNGBoite9G10lJKzN/F2iJ5rCrkP9Ord0H6BWIqRdbTa 4QoLtFR4yrOP14wiXwgoQ+P52awJKRPAhmGECXj/xVcAzzA0w+mMgrULRK5SW2724ovr sjvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kBB8LDa9; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho33-20020a1709070ea100b00726b8b2949fsi8250370ejc.698.2022.06.29.01.59.59; Wed, 29 Jun 2022 02:00:25 -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=@intel.com header.s=Intel header.b=kBB8LDa9; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232861AbiF2Irn (ORCPT + 99 others); Wed, 29 Jun 2022 04:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbiF2Irm (ORCPT ); Wed, 29 Jun 2022 04:47:42 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E293E3CA62; Wed, 29 Jun 2022 01:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656492461; x=1688028461; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version:content-id; bh=CoZ4DKPpgtGqYVqyBw6YdCVH1MrmDvlVaHZ2vdLt+Ls=; b=kBB8LDa9vDfbWE56LLYDBs1edFzpJ+Xr/+0PKWm6spVqS7s67LL7556m ddNCxoIRk8Slk4SHJfb+n9gMF1oY2o1ArJ+37wu/X3HG5kA34OACed0sU ksqtkxtNp8TcSotEj5ol7krP74jRRlF6prUqCYTqpHlzpIciQV1fDCNld wAc2EpvhKOSzRUEHL46+jGEbi/WoY9coB9oCaloDDgXaAzVLvqnoLQcfp TI5ELPkB+FJY3alwZp3zFDHl21WMML8tuGV6/mK3BWmBJNy5McqA+265F 30fXOgW1LvCYW6xR6FcF6SBLIq6lvqDk2ndNilGX5tZtteIkDldzujQLJ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="283068906" X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="283068906" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 01:47:41 -0700 X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="647303570" Received: from dsummer-mobl.ger.corp.intel.com ([10.252.38.121]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 01:47:38 -0700 Date: Wed, 29 Jun 2022 11:47:36 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Andy Shevchenko cc: "open list:SERIAL DRIVERS" , Greg KH , Jiri Slaby , Andy Shevchenko , Linux Kernel Mailing List Subject: Re: [PATCH 4/4] serial: 8250_dw: Rework ->serial_out() LCR write retry logic In-Reply-To: Message-ID: <29b084c-183b-4a84-2376-2c88eff7d5a@linux.intel.com> References: <20220628134234.53771-1-ilpo.jarvinen@linux.intel.com> <20220628134234.53771-5-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-624552388-1656489970=:1529" Content-ID: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-624552388-1656489970=:1529 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: On Tue, 28 Jun 2022, Andy Shevchenko wrote: > On Tue, Jun 28, 2022 at 3:43 PM Ilpo J?rvinen > wrote: > > > > Currently dw8250_verify_write() (was dw8250_check_lcr()) nullifies the > > benefit from differentiated ->serial_out() by having big if tree to > > select correct write type. > > > > Rework the logic such that the LCR write can be retried within the > > relevant ->serial_out() handler: > > 1. Move retries counter on the caller level and pass as pointer to > > dw8250_verify_write() > > 2. Make dw8250_verify_write() return bool > > 3. Retry the write on caller level (if needed) > > I'm wondering if it's possible to utilize one of iopoll.h macro here > instead of copying retries and that not-so-obvious IO poll write. Eh, are you suggesting I should do write as a side-effect inside one of the iopoll.h macros? Because those available seem to only read? Or should I create another macro there which writes too? -- i. --8323329-624552388-1656489970=:1529--