iwlwifi: pcie: remove some more d0i3 code from the transport
CMD_SEND_IN_IDLE, CMD_MAKE_TRANS_IDLE and CMD_WAKE_UP_TRANS are not used. Remove them. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
0d52497ac8
commit
043fa90173
@ -159,10 +159,6 @@ static inline u32 iwl_rx_packet_payload_len(const struct iwl_rx_packet *pkt)
|
||||
* @CMD_ASYNC: Return right away and don't wait for the response
|
||||
* @CMD_WANT_SKB: Not valid with CMD_ASYNC. The caller needs the buffer of
|
||||
* the response. The caller needs to call iwl_free_resp when done.
|
||||
* @CMD_SEND_IN_IDLE: The command should be sent even when the trans is idle.
|
||||
* @CMD_MAKE_TRANS_IDLE: The command response should mark the trans as idle.
|
||||
* @CMD_WAKE_UP_TRANS: The command response should wake up the trans
|
||||
* (i.e. mark it as non-idle).
|
||||
* @CMD_WANT_ASYNC_CALLBACK: the op_mode's async callback function must be
|
||||
* called after this command completes. Valid only with CMD_ASYNC.
|
||||
*/
|
||||
@ -170,10 +166,7 @@ enum CMD_MODE {
|
||||
CMD_ASYNC = BIT(0),
|
||||
CMD_WANT_SKB = BIT(1),
|
||||
CMD_SEND_IN_RFKILL = BIT(2),
|
||||
CMD_SEND_IN_IDLE = BIT(3),
|
||||
CMD_MAKE_TRANS_IDLE = BIT(4),
|
||||
CMD_WAKE_UP_TRANS = BIT(5),
|
||||
CMD_WANT_ASYNC_CALLBACK = BIT(6),
|
||||
CMD_WANT_ASYNC_CALLBACK = BIT(3),
|
||||
};
|
||||
|
||||
#define DEF_CMD_PAYLOAD_SIZE 320
|
||||
@ -659,11 +652,6 @@ enum iwl_plat_pm_mode {
|
||||
IWL_PLAT_PM_MODE_D3,
|
||||
};
|
||||
|
||||
/* Max time to wait for trans to become idle/non-idle on d0i3
|
||||
* enter/exit (in msecs).
|
||||
*/
|
||||
#define IWL_TRANS_IDLE_TIMEOUT 2000
|
||||
|
||||
/* Max time to wait for nmi interrupt */
|
||||
#define IWL_TRANS_NMI_TIMEOUT (HZ / 4)
|
||||
|
||||
|
@ -558,7 +558,6 @@ struct iwl_trans_pcie {
|
||||
bool ucode_write_complete;
|
||||
wait_queue_head_t ucode_write_waitq;
|
||||
wait_queue_head_t wait_command_queue;
|
||||
wait_queue_head_t d0i3_waitq;
|
||||
|
||||
u8 page_offs, dev_cmd_offs;
|
||||
|
||||
@ -581,7 +580,6 @@ struct iwl_trans_pcie {
|
||||
/*protect hw register */
|
||||
spinlock_t reg_lock;
|
||||
bool cmd_hold_nic_awake;
|
||||
bool ref_cmd_in_flight;
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
struct cont_rec fw_mon_data;
|
||||
|
@ -3590,8 +3590,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
|
||||
/* Initialize the wait queue for commands */
|
||||
init_waitqueue_head(&trans_pcie->wait_command_queue);
|
||||
|
||||
init_waitqueue_head(&trans_pcie->d0i3_waitq);
|
||||
|
||||
if (trans_pcie->msix_enabled) {
|
||||
ret = iwl_pcie_init_msix_handler(pdev, trans_pcie);
|
||||
if (ret)
|
||||
|
@ -926,16 +926,6 @@ static int iwl_pcie_gen2_send_hcmd_sync(struct iwl_trans *trans,
|
||||
|
||||
IWL_DEBUG_INFO(trans, "Setting HCMD_ACTIVE for command %s\n", cmd_str);
|
||||
|
||||
if (pm_runtime_suspended(&trans_pcie->pci_dev->dev)) {
|
||||
ret = wait_event_timeout(trans_pcie->d0i3_waitq,
|
||||
pm_runtime_active(&trans_pcie->pci_dev->dev),
|
||||
msecs_to_jiffies(IWL_TRANS_IDLE_TIMEOUT));
|
||||
if (!ret) {
|
||||
IWL_ERR(trans, "Timeout exiting D0i3 before hcmd\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
|
||||
cmd_idx = iwl_pcie_gen2_enqueue_hcmd(trans, cmd);
|
||||
if (cmd_idx < 0) {
|
||||
ret = cmd_idx;
|
||||
|
@ -1858,20 +1858,6 @@ void iwl_pcie_hcmd_complete(struct iwl_trans *trans,
|
||||
wake_up(&trans_pcie->wait_command_queue);
|
||||
}
|
||||
|
||||
if (meta->flags & CMD_MAKE_TRANS_IDLE) {
|
||||
IWL_DEBUG_INFO(trans, "complete %s - mark trans as idle\n",
|
||||
iwl_get_cmd_string(trans, cmd->hdr.cmd));
|
||||
set_bit(STATUS_TRANS_IDLE, &trans->status);
|
||||
wake_up(&trans_pcie->d0i3_waitq);
|
||||
}
|
||||
|
||||
if (meta->flags & CMD_WAKE_UP_TRANS) {
|
||||
IWL_DEBUG_INFO(trans, "complete %s - clear trans idle flag\n",
|
||||
iwl_get_cmd_string(trans, cmd->hdr.cmd));
|
||||
clear_bit(STATUS_TRANS_IDLE, &trans->status);
|
||||
wake_up(&trans_pcie->d0i3_waitq);
|
||||
}
|
||||
|
||||
meta->flags = 0;
|
||||
|
||||
spin_unlock_bh(&txq->lock);
|
||||
@ -1918,16 +1904,6 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
|
||||
IWL_DEBUG_INFO(trans, "Setting HCMD_ACTIVE for command %s\n",
|
||||
iwl_get_cmd_string(trans, cmd->id));
|
||||
|
||||
if (pm_runtime_suspended(&trans_pcie->pci_dev->dev)) {
|
||||
ret = wait_event_timeout(trans_pcie->d0i3_waitq,
|
||||
pm_runtime_active(&trans_pcie->pci_dev->dev),
|
||||
msecs_to_jiffies(IWL_TRANS_IDLE_TIMEOUT));
|
||||
if (!ret) {
|
||||
IWL_ERR(trans, "Timeout exiting D0i3 before hcmd\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
|
||||
cmd_idx = iwl_pcie_enqueue_hcmd(trans, cmd);
|
||||
if (cmd_idx < 0) {
|
||||
ret = cmd_idx;
|
||||
|
Loading…
Reference in New Issue
Block a user