From patchwork Fri Sep 11 16:31:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 46890 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8BGWuaK008941 for ; Fri, 11 Sep 2009 16:32:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754704AbZIKQcV (ORCPT ); Fri, 11 Sep 2009 12:32:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754553AbZIKQcV (ORCPT ); Fri, 11 Sep 2009 12:32:21 -0400 Received: from bu3sch.de ([62.75.166.246]:59143 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754471AbZIKQcV (ORCPT ); Fri, 11 Sep 2009 12:32:21 -0400 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1Mm92s-0000r1-TB; Fri, 11 Sep 2009 16:32:23 +0000 From: Michael Buesch To: "John W. Linville" Subject: [PATCH] b43: Fix resume failure Date: Fri, 11 Sep 2009 18:31:32 +0200 User-Agent: KMail/1.9.9 Cc: Broadcom Wireless , "linux-wireless" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200909111831.33136.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This fixes a resume failure where a signal is pending on resume so the firmware upload fails. This removes the interruptible sleep, because we don't really need it. In the worst case (with broken firmware) the sleep loop will take 1 second. In the common case (working firmware), it will only take a few milliseconds. So we don't really need to be interruptible. Signed-off-by: Michael Buesch Index: wireless-testing/drivers/net/wireless/b43/main.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/b43/main.c 2009-09-11 18:24:59.000000000 +0200 +++ wireless-testing/drivers/net/wireless/b43/main.c 2009-09-11 18:25:13.000000000 +0200 @@ -2309,11 +2309,7 @@ static int b43_upload_microcode(struct b err = -ENODEV; goto error; } - msleep_interruptible(50); - if (signal_pending(current)) { - err = -EINTR; - goto error; - } + msleep(50); } b43_read32(dev, B43_MMIO_GEN_IRQ_REASON); /* dummy read */