Return-path: Received: from mail-qe0-f44.google.com ([209.85.128.44]:42071 "EHLO mail-qe0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050Ab3GKSnE (ORCPT ); Thu, 11 Jul 2013 14:43:04 -0400 Received: by mail-qe0-f44.google.com with SMTP id 5so4701773qeb.3 for ; Thu, 11 Jul 2013 11:43:02 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <5FF020A1CFFEEC49BD1E09530C4FF5951035636367@SC-VEXCH1.marvell.com> Date: Thu, 11 Jul 2013 12:43:02 -0600 Message-ID: (sfid-20130711_204308_150438_931DD4BC) Subject: Re: [PATCH] mwifiex: don't ignore SDIO interrupts during shutdown From: Daniel Drake To: Amitkumar Karwar Cc: Bing Zhao , "linux-wireless@vger.kernel.org" Content-Type: multipart/mixed; boundary=001a11c2bd329b8b2304e140c30d Sender: linux-wireless-owner@vger.kernel.org List-ID: --001a11c2bd329b8b2304e140c30d Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 11, 2013 at 8:38 AM, Daniel Drake wrote: > On Thu, Jul 11, 2013 at 8:17 AM, Amitkumar Karwar wrote: >> Hi Daniel, >> >> Thanks for your elaborative comments. We can go with your patch which fixes the issue in a cleaner way. I ran some tests and verified remove path with it. > > Hmm. Now that I heard back from you and Bing, that interrupts at this > point are totally unexpected, I would prefer to see the interrupt > handler being disabled at the appropriate time, I think we can do > better than my original patch. Let me see if I can find some time > today/tomorrow to explore a better approach. What about this one? --001a11c2bd329b8b2304e140c30d Content-Type: application/octet-stream; name="0001-mwifiex-fix-IRQ-enable-disable.patch" Content-Disposition: attachment; filename="0001-mwifiex-fix-IRQ-enable-disable.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hj0awmmq0 RnJvbSBmMDQ2YWYwYjMxNDJlY2M0ZGFiZWRiYzhjYzMyZDU4MmUwMjA0MTQzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEYW5pZWwgRHJha2Ug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