From patchwork Wed Apr 28 19:37:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 95771 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3SJcPce019264 for ; Wed, 28 Apr 2010 19:38:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752908Ab0D1Thv (ORCPT ); Wed, 28 Apr 2010 15:37:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44944 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752675Ab0D1Thu (ORCPT ); Wed, 28 Apr 2010 15:37:50 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3SJbd0h028349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Apr 2010 15:37:39 -0400 Received: from [172.17.64.10] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3SJbb0m021780; Wed, 28 Apr 2010 15:37:38 -0400 Subject: [PATCH] libertas: fix 8686 firmware loading regression in 96021f096e5178582af296a2fbb6df7dbd6b695c From: Dan Williams To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, Steve deRosier , Alagu Sankar In-Reply-To: <1272413690.32717.10.camel@localhost.localdomain> References: <1272413690.32717.10.camel@localhost.localdomain> Date: Wed, 28 Apr 2010 12:37:46 -0700 Message-ID: <1272483466.14103.4.camel@localhost.localdomain> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Apr 2010 19:39:16 +0000 (UTC) diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 13dfeda..64dd345 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -324,7 +324,9 @@ static int if_sdio_wait_status(struct if_sdio_card *card, const u8 condition) timeout = jiffies + HZ; while (1) { status = sdio_readb(card->func, IF_SDIO_STATUS, &ret); - if (ret || (status & condition)) + if (ret) + return ret; + if ((status & condition) == condition) break; if (time_after(jiffies, timeout)) return -ETIMEDOUT;