Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp670990pxb; Thu, 30 Sep 2021 14:37:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV6QI54fbXQiG8OajPxaM6FgVCKOHnHA8rF5k9P7YvNQMEX8EupKOvUHr6g+a5iaUQ7jRE X-Received: by 2002:a50:a343:: with SMTP id 61mr9888282edn.218.1633037862842; Thu, 30 Sep 2021 14:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633037862; cv=none; d=google.com; s=arc-20160816; b=WbqKxnZ7ssaD/CsDEngdlLnZHO1SUOq99OmOVeG1MPWKb56tk+hZH4mp3kLmNAdt8R GwUNfbtcUbC8OSxeYsrOYKC4orpz1OMbRIxyMZFdvywxw1zkMVK9UeVZ8F4oQmJOAyvE obnajwkuJ+gQkEsTlSJyjZOeRsL6Fd39kw717yeBC0llO5neFMNUb8tUzkU4TuRzxZVv PZysjYw97P/a64pwnTeSHB7Z1/7v6arIJgakvNCoZCUHy/lG96eKJ5KSoUkRCkZ8Rrhp GOEqAd/H+X2Smv+bf3haCfwnY7Zu+CK1+f9eGaBzYVgRvuD4N09MpGpgQ3kL9JcCV7e8 crvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Vpf22Svo6cqIGsWZJpdeh/dwZZMqP7FxzYcXi9rFHFk=; b=01daXMhcErVR1d+ayShwOLIc3b09t3WvYlXlYEzaVt7OtmhKDYZMVVQf9SMmGYWZYM lb3wdrQYvI/Z8cqLXnoqLUV71IO1m7C8jYY29ZwYdVwHtdFGmJwy1MhndO1E5YxQXWAm VPiOXAt1ZINyYmg0r16C8Zx/SnRri4foBVA9WtX6XouSfaDw9r56CbGclldpGe6JIpvQ 0WYMcdshTDIOdu6/beP9YrzB/LD9YlctocFNB5PCFU1OqE3IeLtwjekstFOSvwCHwfh0 Ygp91wHgPMS2j9XWezncOqLar0oFW0EYmxd0gauZJxaP6bYJh+6Kb2xHhg+E1ZlFTz5k LBCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si2368940edy.28.2021.09.30.14.37.21; Thu, 30 Sep 2021 14:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349468AbhI3VSR (ORCPT + 78 others); Thu, 30 Sep 2021 17:18:17 -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-wireless@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