From patchwork Sat Sep 14 02:48:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Solomon Peachy X-Patchwork-Id: 2892911 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A380B9F23C for ; Sat, 14 Sep 2013 02:48:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B169F201F2 for ; Sat, 14 Sep 2013 02:48:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDBCD201F0 for ; Sat, 14 Sep 2013 02:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756527Ab3INCsk (ORCPT ); Fri, 13 Sep 2013 22:48:40 -0400 Received: from 162-17-110-37-static.hfc.comcastbusiness.net ([162.17.110.37]:58002 "EHLO stuffed.shaftnet.org" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756519Ab3INCsk (ORCPT ); Fri, 13 Sep 2013 22:48:40 -0400 Received: from stuffed.shaftnet.org (localhost [127.0.0.1]) by stuffed.shaftnet.org (8.14.7/8.14.7) with ESMTP id r8E2mcsJ027960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 13 Sep 2013 22:48:38 -0400 Received: (from pizza@localhost) by stuffed.shaftnet.org (8.14.7/8.14.7/Submit) id r8E2mcoX027959; Fri, 13 Sep 2013 22:48:38 -0400 From: Solomon Peachy To: linux-wireless@vger.kernel.org Cc: Solomon Peachy Subject: [PATCH] cw1200: Use a threaded oneshot irq handler for cw1200_spi Date: Fri, 13 Sep 2013 22:48:34 -0400 Message-Id: <1379126914-27922-1-git-send-email-pizza@shaftnet.org> X-Mailer: git-send-email 1.8.1.4 X-Virus-Scanned: clamav-milter 0.97.8 at stuffed.shaftnet.org X-Virus-Status: Clean X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This supercedes the older patch ("cw1200: Don't perform SPI transfers in interrupt context") that badly attempted to fix this problem. This is a far simpler solution, with has the added benefit of actually working. Signed-off-by: Solomon Peachy --- drivers/net/wireless/cw1200/cw1200_spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index 5a64ac9..899cad3 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -250,9 +250,10 @@ static int cw1200_spi_irq_subscribe(struct hwbus_priv *self) pr_debug("SW IRQ subscribe\n"); - ret = request_any_context_irq(self->func->irq, cw1200_spi_irq_handler, - IRQF_TRIGGER_HIGH, - "cw1200_wlan_irq", self); + ret = request_threaded_irq(self->func->irq, NULL, + cw1200_spi_irq_handler, + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + "cw1200_wlan_irq", self); if (WARN_ON(ret < 0)) goto exit;