diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-13 19:23:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-13 19:23:11 -0400 |
commit | 182ad468e70fc7e8ff2e5d64344c690beaa00ddd (patch) | |
tree | af0b9b8da89ed03629c71f6829845c301485d289 /drivers/net/wireless/iwlwifi/pcie/trans.c | |
parent | e8fed985d7bd6cda695e196028b54a5f3d2d91bb (diff) | |
parent | 5b3e2e14eaa2a98232a4f292341fb88438685734 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/cavium/Kconfig
The cavium conflict was overlapping dependency
changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/trans.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 6203c4ad9bba..9e144e71da0b 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -478,10 +478,16 @@ static void iwl_pcie_apm_stop(struct iwl_trans *trans, bool op_mode_leave) | |||
478 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) | 478 | if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) |
479 | iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG, | 479 | iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG, |
480 | APMG_PCIDEV_STT_VAL_WAKE_ME); | 480 | APMG_PCIDEV_STT_VAL_WAKE_ME); |
481 | else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) | 481 | else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) { |
482 | iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, | ||
483 | CSR_RESET_LINK_PWR_MGMT_DISABLED); | ||
482 | iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, | 484 | iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, |
483 | CSR_HW_IF_CONFIG_REG_PREPARE | | 485 | CSR_HW_IF_CONFIG_REG_PREPARE | |
484 | CSR_HW_IF_CONFIG_REG_ENABLE_PME); | 486 | CSR_HW_IF_CONFIG_REG_ENABLE_PME); |
487 | mdelay(1); | ||
488 | iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, | ||
489 | CSR_RESET_LINK_PWR_MGMT_DISABLED); | ||
490 | } | ||
485 | mdelay(5); | 491 | mdelay(5); |
486 | } | 492 | } |
487 | 493 | ||
@@ -575,6 +581,10 @@ static int iwl_pcie_prepare_card_hw(struct iwl_trans *trans) | |||
575 | if (ret >= 0) | 581 | if (ret >= 0) |
576 | return 0; | 582 | return 0; |
577 | 583 | ||
584 | iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, | ||
585 | CSR_RESET_LINK_PWR_MGMT_DISABLED); | ||
586 | msleep(1); | ||
587 | |||
578 | for (iter = 0; iter < 10; iter++) { | 588 | for (iter = 0; iter < 10; iter++) { |
579 | /* If HW is not ready, prepare the conditions to check again */ | 589 | /* If HW is not ready, prepare the conditions to check again */ |
580 | iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, | 590 | iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, |
@@ -582,8 +592,10 @@ static int iwl_pcie_prepare_card_hw(struct iwl_trans *trans) | |||
582 | 592 | ||
583 | do { | 593 | do { |
584 | ret = iwl_pcie_set_hw_ready(trans); | 594 | ret = iwl_pcie_set_hw_ready(trans); |
585 | if (ret >= 0) | 595 | if (ret >= 0) { |
586 | return 0; | 596 | ret = 0; |
597 | goto out; | ||
598 | } | ||
587 | 599 | ||
588 | usleep_range(200, 1000); | 600 | usleep_range(200, 1000); |
589 | t += 200; | 601 | t += 200; |
@@ -593,6 +605,10 @@ static int iwl_pcie_prepare_card_hw(struct iwl_trans *trans) | |||
593 | 605 | ||
594 | IWL_ERR(trans, "Couldn't prepare the card\n"); | 606 | IWL_ERR(trans, "Couldn't prepare the card\n"); |
595 | 607 | ||
608 | out: | ||
609 | iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, | ||
610 | CSR_RESET_LINK_PWR_MGMT_DISABLED); | ||
611 | |||
596 | return ret; | 612 | return ret; |
597 | } | 613 | } |
598 | 614 | ||