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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D184C433EF for ; Thu, 30 Sep 2021 21:16:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0021961052 for ; Thu, 30 Sep 2021 21:16:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349208AbhI3VST (ORCPT ); Thu, 30 Sep 2021 17:18:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:18616 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349413AbhI3VSP (ORCPT ); Thu, 30 Sep 2021 17:18:15 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="204774280" X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="204774280" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2021 14:16:31 -0700 X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="708231121" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2021 14:16:27 -0700 Received: from andy by smile with local (Exim 4.95-RC2) (envelope-from ) id 1mW3Pj-007GBl-F0; Fri, 01 Oct 2021 00:16:23 +0300 Date: Fri, 1 Oct 2021 00:16:23 +0300 From: Andy Shevchenko To: Jonas =?iso-8859-1?Q?Dre=DFler?= Cc: Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , Kalle Valo , "David S. Miller" , Jakub Kicinski , Tsuchiya Yuto , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Maximilian Luz , Bjorn Helgaas , Pali =?iso-8859-1?Q?Roh=E1r?= , Heiner Kallweit , Johannes Berg , Brian Norris , stable@vger.kernel.org Subject: Re: [PATCH v2 2/2] mwifiex: Try waking the firmware until we get an interrupt Message-ID: References: <20210914114813.15404-1-verdre@v0yd.nl> <20210914114813.15404-3-verdre@v0yd.nl> <98c1b772-ae6b-e435-030e-399f613061ba@v0yd.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <98c1b772-ae6b-e435-030e-399f613061ba@v0yd.nl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 11:07:09PM +0200, Jonas Dreßler wrote: > On 9/30/21 10:58 PM, Andy Shevchenko wrote: > > On Thu, Sep 30, 2021 at 08:04:00PM +0200, Jonas Dreßler wrote: ... > > Second, what is the problem with having one write more or less? > > Your current code doesn't guarantee this either. It only decreases > > probability of such scenario. Am I wrong? > > Indeed my approach just decreases the probability and we sometimes end up > writing twice to wakeup the card, but it would kinda bug me if we'd always > do one write too much. > > Anyway, if you still prefer the read_poll_timeout() solution I'd be alright > with that of course. Yes, it will make code cleaner. -- With Best Regards, Andy Shevchenko