@@ -2406,7 +2406,7 @@ EXPORT_SYMBOL(iwl_trans_pcie_reset);
24062406 * This version doesn't disable BHs but rather assumes they're
24072407 * already disabled.
24082408 */
2409- bool __iwl_trans_pcie_grab_nic_access (struct iwl_trans * trans )
2409+ bool __iwl_trans_pcie_grab_nic_access (struct iwl_trans * trans , bool silent )
24102410{
24112411 int ret ;
24122412 struct iwl_trans_pcie * trans_pcie = IWL_TRANS_GET_PCIE_TRANS (trans );
@@ -2458,6 +2458,11 @@ bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans)
24582458 if (unlikely (ret < 0 )) {
24592459 u32 cntrl = iwl_read32 (trans , CSR_GP_CNTRL );
24602460
2461+ if (silent ) {
2462+ spin_unlock (& trans_pcie -> reg_lock );
2463+ return false;
2464+ }
2465+
24612466 WARN_ONCE (1 ,
24622467 "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n" ,
24632468 cntrl );
@@ -2489,7 +2494,7 @@ bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans)
24892494 bool ret ;
24902495
24912496 local_bh_disable ();
2492- ret = __iwl_trans_pcie_grab_nic_access (trans );
2497+ ret = __iwl_trans_pcie_grab_nic_access (trans , false );
24932498 if (ret ) {
24942499 /* keep BHs disabled until iwl_trans_pcie_release_nic_access */
24952500 return ret ;
@@ -2498,7 +2503,8 @@ bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans)
24982503 return false;
24992504}
25002505
2501- void iwl_trans_pcie_release_nic_access (struct iwl_trans * trans )
2506+ void __releases (nic_access_nobh )
2507+ iwl_trans_pcie_release_nic_access (struct iwl_trans * trans )
25022508{
25032509 struct iwl_trans_pcie * trans_pcie = IWL_TRANS_GET_PCIE_TRANS (trans );
25042510
@@ -2525,6 +2531,7 @@ void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans)
25252531 * scheduled on different CPUs (after we drop reg_lock).
25262532 */
25272533out :
2534+ __release (nic_access_nobh );
25282535 spin_unlock_bh (& trans_pcie -> reg_lock );
25292536}
25302537
0 commit comments