From patchwork Thu Jun 30 22:21:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9209027 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 9D9816075A for ; Thu, 30 Jun 2016 22:22:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DBE520649 for ; Thu, 30 Jun 2016 22:22:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81DE92868A; Thu, 30 Jun 2016 22:22: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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 0325320649 for ; Thu, 30 Jun 2016 22:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbcF3WWA (ORCPT ); Thu, 30 Jun 2016 18:22:00 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35640 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbcF3WV6 (ORCPT ); Thu, 30 Jun 2016 18:21:58 -0400 Received: by mail-pf0-f179.google.com with SMTP id c2so33518418pfa.2 for ; Thu, 30 Jun 2016 15:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=GS/Rgcu7sP9zbcn37BOHikwUKJT1pKlVMdNG2Z4K/Og=; b=lqG+yTzPnvIKgrT+jYwS25y7hzRCtIcK6LknWvqCXAVBKCVvIDzD8DPr3htjgemz+T kiZbet/24w8WPVW3kebvPlnXLLtAlf9aR94YnTtb6d+IpTfjQijHqpBPF/jOcSpeioNx OJnx0+V8h01BqpFq+5NTv6WoK/Ap3P6c7WNqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GS/Rgcu7sP9zbcn37BOHikwUKJT1pKlVMdNG2Z4K/Og=; b=Jbf7FmOHKNNvDN270YXwe3AUWH5zckIAIw8nqGGzVTNgBGGNbP2ombYakt8uyAkxs7 dQiBOyXO2Hrm4x9Xyb4M5HuEnCAJlpR4fXkPYzbDMGu8nm8w3AA2Nr2dRTm3oYikxsT9 Wr7KEl3DURqD/1csi+8ALiOz1hu9YjganKp07C17aFftx87eY0S50bm+CNgBV1Bb4+Iw XMwGXR4r4aSF5BvtevtEinaQuijAOf9PfXdG8nvobn8loZZku0YVHQexcqNqlIseeBwg 1Zp/1Uy5w0uFOKWQR6AxfX58JY2Ohxmbv84euQaRiCmXxHSCmBFZcPcuA83izfYKXBA0 Flqg== X-Gm-Message-State: ALyK8tKbHHduw9W+g/GFOX3eGn68nFsQM9hBkL4x9MngK1j2PDJXbZ/HevUgkytYKoTOaFKw X-Received: by 10.98.111.138 with SMTP id k132mr25529579pfc.105.1467325282424; Thu, 30 Jun 2016 15:21:22 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id 144sm262939pfu.83.2016.06.30.15.21.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jun 2016 15:21:21 -0700 (PDT) From: Brian Norris To: Amitkumar Karwar , Nishant Sarmukadam Cc: , Doug Anderson , Brian Norris , Stephen Barber , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Brian Norris Subject: [PATCH] mwifiex: mask PCIe interrupts before removal Date: Thu, 30 Jun 2016 15:21:02 -0700 Message-Id: <1467325262-82799-1-git-send-email-briannorris@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 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 The PCIe driver didn't mask the host interrupts before trying to tear down. This causes lockups at reboot or rmmod when using MSI-X on 8997, since the MSI handler gets confused and locks up the system. Also tested on 8897, which does not support MSI-X (and wasn't experiencing this same bug). No regressions seen there. Signed-off-by: Brian Norris Tested-by: Douglas Anderson --- drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 0c7937eb6b77..af98371dc2af 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -440,6 +440,11 @@ static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter) return 0; } +static void mwifiex_pcie_disable_host_int_noerr(struct mwifiex_adapter *adapter) +{ + WARN_ON(mwifiex_pcie_disable_host_int(adapter)); +} + /* * This function enables the host interrupt. * @@ -2945,6 +2950,7 @@ static struct mwifiex_if_ops pcie_ops = { .register_dev = mwifiex_register_dev, .unregister_dev = mwifiex_unregister_dev, .enable_int = mwifiex_pcie_enable_host_int, + .disable_int = mwifiex_pcie_disable_host_int_noerr, .process_int_status = mwifiex_process_int_status, .host_to_card = mwifiex_pcie_host_to_card, .wakeup = mwifiex_pm_wakeup_card,