iwl3945: fix deep sleep when removing the driver.
A warning message "MAC is in deep sleep" sometimes happen when user removes the driver. This warning is related to card not being ready. In __iwl3945_down function some of the going down steps are in wrong order, to fix this this patch do the following: 1- make sure we are calling iwl3945_apm_reset and iwl3945_apm_stop in the right order. 2- make sure we set CSR_GP_CNTRL_REG_FLAG_INIT_DONE in apm_reset before poll on CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY. 3- set correct polling counter. This fixes bug http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1834 Signed-off-by: mohamed abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
c0af96a6e6
commit
e9414b6b3f
@ -165,7 +165,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
|
||||
ret = _iwl_poll_bit(priv, CSR_GP_CNTRL,
|
||||
CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
|
||||
(CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
|
||||
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 50);
|
||||
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
|
||||
if (ret < 0) {
|
||||
IWL_ERR(priv, "MAC is in deep sleep!\n");
|
||||
return -EIO;
|
||||
|
Reference in New Issue
Block a user