From patchwork Mon May 6 22:28:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 2526531 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id DDE943FC5A for ; Mon, 6 May 2013 22:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757022Ab3EFW3M (ORCPT ); Mon, 6 May 2013 18:29:12 -0400 Received: from mx3.wp.pl ([212.77.101.7]:60864 "EHLO mx3.wp.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756807Ab3EFW3K (ORCPT ); Mon, 6 May 2013 18:29:10 -0400 Received: (wp-smtpd smtp.wp.pl 9979 invoked from network); 7 May 2013 00:29:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1367879346; bh=w3wVn963G8jdf7dd1YEArSqK/PSSqpyXTDRMbiqNcOc=; h=From:To:Cc:Subject; b=KS4d0ssolKb5mS2Y9E3ilseH4Zw/uX1DP9I+tLhAUY2diKfUS0l3jFkk/j0UxYvEj +xH0Nd897EltllUICnWpHE4btOdTJpUCfrxCquh9PR6h8u6qrhTpw3g4gIps7AMl12 632t294hzHcAYdCNyNetpvLI4+UPh/NI1hYYt3r8= Received: from 89-71-197-70.dynamic.chello.pl (HELO smtp.wp.pl) (kubakici@[89.71.197.70]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with SMTP for ; 7 May 2013 00:29:05 +0200 Received: by smtp.wp.pl (sSMTP sendmail emulation); Tue, 07 May 2013 00:29:05 +0200 From: Jakub Kicinski To: "John W. Linville" Cc: Ivo van Doorn , linux-wireless , users@rt2x00.serialmonkey.com, Jakub Kicinski Subject: [PATCH] rt2x00pci: Use PCI MSIs whenever possible Date: Tue, 7 May 2013 00:28:50 +0200 Message-Id: <1367879330-5718-1-git-send-email-kubakici@wp.pl> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1349292758-20045-1-git-send-email-kubakici@wp.pl> References: <1349292758-20045-1-git-send-email-kubakici@wp.pl> X-WP-DKIM-Status: good (id: wp.pl) X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [gSBl] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org All PCIe devices must support MSIs, make use of them. Signed-off-by: Jakub Kicinski Acked-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2x00pci.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 1.8.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index dc49e52..76d95de 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c @@ -105,11 +105,13 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) goto exit_release_regions; } + pci_enable_msi(pci_dev); + hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); if (!hw) { rt2x00_probe_err("Failed to allocate hardware\n"); retval = -ENOMEM; - goto exit_release_regions; + goto exit_disable_msi; } pci_set_drvdata(pci_dev, hw); @@ -150,6 +152,9 @@ exit_free_reg: exit_free_device: ieee80211_free_hw(hw); +exit_disable_msi: + pci_disable_msi(pci_dev); + exit_release_regions: pci_release_regions(pci_dev); @@ -174,6 +179,8 @@ void rt2x00pci_remove(struct pci_dev *pci_dev) rt2x00pci_free_reg(rt2x00dev); ieee80211_free_hw(hw); + pci_disable_msi(pci_dev); + /* * Free the PCI device data. */