From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932099AbcFNOZX (ORCPT ); Tue, 14 Jun 2016 10:25:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59906 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752445AbcFNOZU (ORCPT ); Tue, 14 Jun 2016 10:25:20 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: mwifiex: fix racing condition when downloading firmware From: Kalle Valo In-Reply-To: <1463630023-5258-1-git-send-email-wnhuang@chromium.org> To: Wei-Ning Huang Cc: Linux-Wireless , LKML , akarwar@marvell.com, djkurtz@chromium.org, Wei-Ning Huang Message-Id: <20160614142519.AB5F2613E0@smtp.codeaurora.org> Date: Tue, 14 Jun 2016 14:25:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei-Ning Huang wrote: > The action 'check for winner' and 'download firmware' should be an > atomic action. This is true for btmrvl driver but not mwmfiex, which > cause firmware download to fail when the following senerio happens: > > 1) mwifiex check winner status: true > 2) btmrvl check winner status: true, and start downloading firmware > 3) mwfieix tries to download firmware, but failed because btmrvl is > already downloading. > > This won't happen if 1) and 3) is an atomic action. This patch adds > sdio_claim/release_host call around those two actions to make sure it's > atomic. > > Signed-off-by: Wei-Ning Huang Thanks, 1 patch applied to wireless-drivers-next.git: 65c71efe1c59 mwifiex: fix racing condition when downloading firmware -- Sent by pwcli https://patchwork.kernel.org/patch/9123771/