From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ohad Ben-Cohen Subject: Re: [PATCH] mmc: sdio: reset card during power_restore Date: Wed, 29 Jun 2011 18:25:23 +0300 Message-ID: References: <20110605123852.BC6F39D401C@zog.reactivated.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:52887 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754824Ab1F2PZo (ORCPT ); Wed, 29 Jun 2011 11:25:44 -0400 Received: by wwe5 with SMTP id 5so1347375wwe.1 for ; Wed, 29 Jun 2011 08:25:43 -0700 (PDT) In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: zhangfei gao Cc: linux-mmc@vger.kernel.org, Daniel Drake , Bing Zhao On Wed, Jun 29, 2011 at 12:19 PM, zhangfei gao wrote: > Enable wlan: # ifconfig up mlan0 -> power up the chip via runtime PM > -> wlan_probe download the firmware > Disable wlan: # ifconfig down mlan0 -> power down the chip via runtime > PM -> wlan_remove ? Sounds all good, besides the part where you mention the "probe" and "remove" names. I'm not sure what you mean exactly, but generally, the driver's probe and remove functions should be called only once during the lifetime of the device it controls. You may want to refactor the driver a bit, so you don't need those handlers to be called whenever you power up/down the card. > So every time ifconfig up/down, the chip is power up/down, and > firmware reloaded? Yes, this is one way to go (I know some other out-of-tree WLAN drivers behave differently, but this is the way mac80211 works, and it's quite nice).