Return-path: Received: from web28315.mail.ukl.yahoo.com ([87.248.110.134]:22475 "HELO web28315.mail.ukl.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754060AbZIGSxi (ORCPT ); Mon, 7 Sep 2009 14:53:38 -0400 Message-ID: <369914.76148.qm@web28315.mail.ukl.yahoo.com> Date: Mon, 7 Sep 2009 18:46:58 +0000 (GMT) From: Albert Herranz Subject: [PATCH RFC 1/3] sdio: recognize io card without powercycle To: bcm43xx-dev@lists.berlios.de Cc: linux-mmc@vger.kernel.org, linux-wireless@vger.kernel.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1437562912-1252349218=:76148" Sender: linux-wireless-owner@vger.kernel.org List-ID: --0-1437562912-1252349218=:76148 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =0A=0A=0A --0-1437562912-1252349218=:76148 Content-Type: text/x-patch; name="0116-sdio-recognize-io-card-without-powercycle.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0116-sdio-recognize-io-card-without-powercycle.patch" RnJvbSA1Yzk3NDYyYWU5MTg4NTI0ZmFhMGM1N2ZhOGI1YmY4ZTllMGMxMjVj IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBbGJlcnQgSGVycmFu eiA8YWxiZXJ0X2hlcnJhbnpAeWFob28uZXM+CkRhdGU6IFR1ZSwgMTggQXVn IDIwMDkgMjE6MDY6MzIgKzAyMDAKU3ViamVjdDogW1BBVENIXSBzZGlvOiBy ZWNvZ25pemUgaW8gY2FyZCB3aXRob3V0IHBvd2VyY3ljbGUKClNESU8gU2lt cGxpZmllZCBTcGVjaWZpY2F0aW9uIChhdCBsZWFzdCBWMi4wMCkgc3RhdGVz IHRoYXQgaXQgaXMgc3Ryb25nbHkKcmVjb21tZW5kZWQgdGhhdCB0aGUgaG9z dCBleGVjdXRlcyBlaXRoZXIgYSBwb3dlciByZXNldCBvciBpc3N1ZXMgYSBD TUQ1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