Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2575336yba; Mon, 6 May 2019 08:13:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgck6fbdEf1ysa0fi+JxsQRzksi/cP2v9/J8m8ztjR9nI+2pmtJfkP7LIeAyTZIgjeI8zr X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr32599638plf.119.1557155589581; Mon, 06 May 2019 08:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557155589; cv=none; d=google.com; s=arc-20160816; b=N8KDh0/WJW/pWDdDzV1J6fqqjq6q8t2n8LT5GgHmKJ3pvstC2/H50tRmEChFoRyG6T 6d7k7W5qsf+nFuD+aQitX9BaKY1StW+r6jGQfDJGJMY+UevAPru4kgerYtEpqdMa7a77 qhG9tRxgag6Ig29yAu9oiHj+iqxGa/qJDLcTWxbP4bg0ILOqUwTSbO2XRsaR9iT4yrUC Z9AwvoIIMNHCeLUWfD99dEId2vbzsx+QdXmllVl2Yajp46Mc0XUXzVI8uRQOKvikWDVC TiN6fyCNXjr7nPrLJjUGWdujCFUsqx7JnYoMA1BBi9nBKW18rQql0BjavvqFxtL1zx2A pqGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nbtqM9R6bOiEzAYwMu0pLDcJ4FaH680qzATrCSj95dk=; b=zgy0uk8+B1dwYL5BSxMtwvanTorK91xFFC2EjYVxEe5/ogLxDyf5sbFWMAfKNb9mUP 6FTsTqzsb/yYwBSzZBfDDSi5crEOyf8p7QcDn1kKt6jcPpLpJJ898kQbtGP0Ria1jrIk qfcj69BbUfgxtiesWqjD2GLOB36lh0wUvPe1yqhzLuUuM7F6NH7afzedNqLQAIa+Wuop dQsBTV09q0O9FNbGDo8hRKqBjLRMWlrS3kbi/EKOUBoPSOu4r+hx2L4725TuCUYEMaas CISokxmijKj7ncff89fDRaCvr3iQz2oZdFclRlK1s3zoY93QYtHe3Tz5e56T4D66UsLn VdzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lnxr0nOl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si14947861pft.22.2019.05.06.08.12.52; Mon, 06 May 2019 08:13:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lnxr0nOl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726754AbfEFPKi (ORCPT + 99 others); Mon, 6 May 2019 11:10:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:53858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfEFOeR (ORCPT ); Mon, 6 May 2019 10:34:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 236B5204EC; Mon, 6 May 2019 14:34:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557153256; bh=h5G9h/bRS+IuYmY6CVOdg7fWktl2RLXV8mvmFo2gtw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lnxr0nOlgT3c3IPKAScI05eBnoBWaWvXyOuqO+45Okj9qQx5SXSRLz9iBP15Yc6iS cK3kM5dwGCFdAMEG2b9BCJhQ3UhOb6U7/dvdqvASBPPNaip1+DfPmiJPw7Yc/ce9pF 5k9jv2H2Bx5++Sm2uDZiVgSWW9mXlY/Y+VDTesYM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Douglas Anderson , Brian Norris , Kalle Valo Subject: [PATCH 5.0 005/122] mwifiex: Make resume actually do something useful again on SDIO cards Date: Mon, 6 May 2019 16:31:03 +0200 Message-Id: <20190506143055.201621206@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190506143054.670334917@linuxfoundation.org> References: <20190506143054.670334917@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Douglas Anderson commit b82d6c1f8f8288f744a9dcc16cd3085d535decca upstream. The commit fc3a2fcaa1ba ("mwifiex: use atomic bitops to represent adapter status variables") had a fairly straightforward bug in it. It contained this bit of diff: - if (!adapter->is_suspended) { + if (test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) { As you can see the patch missed the "!" when converting to the atomic bitops. This meant that the resume hasn't done anything at all since that commit landed and suspend/resume for mwifiex SDIO cards has been totally broken. After fixing this mwifiex suspend/resume appears to work again, at least with the simple testing I've done. Fixes: fc3a2fcaa1ba ("mwifiex: use atomic bitops to represent adapter status variables") Cc: Signed-off-by: Douglas Anderson Reviewed-by: Brian Norris Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -181,7 +181,7 @@ static int mwifiex_sdio_resume(struct de adapter = card->adapter; - if (test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) { + if (!test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) { mwifiex_dbg(adapter, WARN, "device already resumed\n"); return 0;