Return-path: Received: from na3sys009aog129.obsmtp.com ([74.125.149.142]:36092 "EHLO na3sys009aog129.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547Ab3GGQMh (ORCPT ); Sun, 7 Jul 2013 12:12:37 -0400 From: Amitkumar Karwar To: 'Daniel Drake' CC: Bing Zhao , "'linux-wireless@vger.kernel.org'" , "'linville@tuxdriver.com'" Date: Sun, 7 Jul 2013 09:15:26 -0700 Subject: RE: [PATCH] mwifiex: don't ignore SDIO interrupts during shutdown Message-ID: <5FF020A1CFFEEC49BD1E09530C4FF5951035636356@SC-VEXCH1.marvell.com> (sfid-20130707_181240_753497_68B50379) In-Reply-To: <5FF020A1CFFEEC49BD1E09530C4FF5951035636354@SC-VEXCH1.marvell.com> Content-Type: multipart/mixed; boundary="_002_5FF020A1CFFEEC49BD1E09530C4FF5951035636356SCVEXCH1marve_" MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: --_002_5FF020A1CFFEEC49BD1E09530C4FF5951035636356SCVEXCH1marve_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Daniel, >We didn't test the behavior of sdio_read/sdio_write API's when hardware is= >not present. But they should just return an error. I ran some tests which confirmed that there is no harm in calling these API= 's when hardware is removed. They returned ENOMEDIUM error. Can you please review and verify attached patch? Thanks, Amitkumar Karwar --_002_5FF020A1CFFEEC49BD1E09530C4FF5951035636356SCVEXCH1marve_ Content-Type: application/octet-stream; name="0001-mwifiex-disable-SDIO-interrupts-in-remove-handler.patch" Content-Description: 0001-mwifiex-disable-SDIO-interrupts-in-remove-handler.patch Content-Disposition: attachment; filename="0001-mwifiex-disable-SDIO-interrupts-in-remove-handler.patch"; size=5178; creation-date="Sun, 07 Jul 2013 16:00:49 GMT"; modification-date="Sun, 07 Jul 2013 16:04:18 GMT" Content-Transfer-Encoding: base64 RnJvbSBkMWIwNjNkMjA5N2QzMGZkNDQ1YjMxYTk4NWMwMjQ3NjVh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