From patchwork Mon Jan 16 03:06:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 9518015 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16503601C3 for ; Mon, 16 Jan 2017 03:06:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6137284C9 for ; Mon, 16 Jan 2017 03:06:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8E36284CE; Mon, 16 Jan 2017 03:06:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A244284C9 for ; Mon, 16 Jan 2017 03:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583AbdAPDGm (ORCPT ); Sun, 15 Jan 2017 22:06:42 -0500 Received: from fudo.makrotopia.org ([185.142.180.71]:51960 "EHLO fudo.makrotopia.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbdAPDGm (ORCPT ); Sun, 15 Jan 2017 22:06:42 -0500 Received: from local by fudo.makrotopia.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88) (envelope-from ) id 1cSxcy-000835-5a; Mon, 16 Jan 2017 04:06:40 +0100 Date: Mon, 16 Jan 2017 04:06:25 +0100 From: Daniel Golle To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Stanislaw Gruszka , roman@advem.lv, michel.stempin@wanadoo.fr, c.mignanti@gmail.com, evaxige@qq.com, Kalle Valo , Felix Fietkau , John Crispin , Gabor Juhos Subject: [PATCH v2 09/14] rt2x00: rt2x00pci: set PCI MWI only if supported Message-ID: <20170116030613.GA32249@makrotopia.org> References: <874m114lwq.fsf@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <874m114lwq.fsf@codeaurora.org> User-Agent: Mutt/1.7.2 (2016-11-26) 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 From: Claudio Mignanti This is needed for devices without support for PCI MWI. See also https://dev.openwrt.org/changeset/21850 Signed-off-by: Daniel Golle --- drivers/net/wireless/ralink/rt2x00/rt2x00pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c index eb6dbcd4fddf..4becfeb75ba8 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00pci.c @@ -94,8 +94,10 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) pci_set_master(pci_dev); +#ifdef CONFIG_PCI_SET_MWI if (pci_set_mwi(pci_dev)) rt2x00_probe_err("MWI not available\n"); +#endif if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) { rt2x00_probe_err("PCI DMA not supported\n");