Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 301023
b: refs/heads/master
c: 74fda97
h: refs/heads/master
i:
  301021: 786bd9a
  301019: 4c260db
  301015: 0dbed28
  301007: 09c5642
  300991: 31b8895
v: v3
  • Loading branch information
Don Fry authored and Wey-Yi Guy committed Apr 16, 2012
1 parent 9dac7be commit 5f5f61d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a8bbdb4de0085b1e89eae33753c80299ab88ff6
refs/heads/master: 74fda9715cf611163cbe576a017e6bbaf53966ff
5 changes: 1 addition & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ static void iwl_dump_nic_error_log(struct iwl_priv *priv)
if (ERROR_START_OFFSET <= table.valid * ERROR_ELEM_SIZE) {
IWL_ERR(trans, "Start IWL Error Log Dump:\n");
IWL_ERR(trans, "Status: 0x%08lX, count: %d\n",
priv->shrd->status, table.valid);
priv->status, table.valid);
}

trace_iwlwifi_dev_ucode_error(trans->dev, table.error_id, table.tsf_low,
Expand Down Expand Up @@ -2177,9 +2177,6 @@ static void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
/* Set the FW error flag -- cleared on iwl_down */
set_bit(STATUS_FW_ERROR, &priv->status);

/* Cancel currently queued command. */
clear_bit(STATUS_HCMD_ACTIVE, &priv->shrd->status);

iwl_abort_notification_waits(&priv->notif_wait);

/* Keep the restart process from trying to send host
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ static ssize_t iwl_dbgfs_status_read(struct file *file,
int pos = 0;
const size_t bufsz = sizeof(buf);

pos += scnprintf(buf + pos, bufsz - pos, "STATUS_HCMD_ACTIVE:\t %d\n",
test_bit(STATUS_HCMD_ACTIVE, &priv->shrd->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_RF_KILL_HW:\t %d\n",
test_bit(STATUS_RF_KILL_HW, &priv->status));
pos += scnprintf(buf + pos, bufsz - pos, "STATUS_CT_KILL:\t\t %d\n",
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ struct iwl_mod_params {
/**
* struct iwl_shared - shared fields for all the layers of the driver
*
* @status: STATUS_*
* @wowlan: are we running wowlan uCode
* @bus: pointer to the bus layer data
* @cfg: see struct iwl_cfg
Expand All @@ -161,8 +160,6 @@ struct iwl_mod_params {
* @eeprom: pointer to the eeprom/OTP image
*/
struct iwl_shared {
unsigned long status;

const struct iwl_cfg *cfg;
struct iwl_trans *trans;
void *drv;
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,10 @@ static void iwl_irq_handle_error(struct iwl_trans *trans)
APMS_CLK_VAL_MRB_FUNC_MODE) ||
(iwl_read_prph(trans, APMG_PS_CTRL_REG) &
APMG_PS_CTRL_VAL_RESET_REQ))) {
clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
struct iwl_trans_pcie *trans_pcie;

trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
iwl_op_mode_wimax_active(trans->op_mode);
wake_up(&trans->wait_command_queue);
return;
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,12 +792,12 @@ void iwl_tx_cmd_complete(struct iwl_trans *trans, struct iwl_rx_cmd_buffer *rxb,
iwl_hcmd_queue_reclaim(trans, txq_id, index);

if (!(meta->flags & CMD_ASYNC)) {
if (!test_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status)) {
if (!test_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status)) {
IWL_WARN(trans,
"HCMD_ACTIVE already clear for command %s\n",
get_cmd_string(cmd->hdr.cmd));
}
clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
IWL_DEBUG_INFO(trans, "Clearing HCMD_ACTIVE for command %s\n",
get_cmd_string(cmd->hdr.cmd));
wake_up(&trans->wait_command_queue);
Expand Down Expand Up @@ -839,7 +839,7 @@ static int iwl_send_cmd_sync(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
get_cmd_string(cmd->id));

if (WARN_ON(test_and_set_bit(STATUS_HCMD_ACTIVE,
&trans->shrd->status))) {
&trans_pcie->status))) {
IWL_ERR(trans, "Command %s: a command is already active!\n",
get_cmd_string(cmd->id));
return -EIO;
Expand All @@ -851,18 +851,18 @@ static int iwl_send_cmd_sync(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
cmd_idx = iwl_enqueue_hcmd(trans, cmd);
if (cmd_idx < 0) {
ret = cmd_idx;
clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
IWL_ERR(trans,
"Error sending %s: enqueue_hcmd failed: %d\n",
get_cmd_string(cmd->id), ret);
return ret;
}

ret = wait_event_timeout(trans->wait_command_queue,
!test_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status),
!test_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status),
HOST_COMPLETE_TIMEOUT);
if (!ret) {
if (test_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status)) {
if (test_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status)) {
struct iwl_tx_queue *txq =
&trans_pcie->txq[trans_pcie->cmd_queue];
struct iwl_queue *q = &txq->q;
Expand All @@ -876,7 +876,7 @@ static int iwl_send_cmd_sync(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
"Current CMD queue read_ptr %d write_ptr %d\n",
q->read_ptr, q->write_ptr);

clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
IWL_DEBUG_INFO(trans, "Clearing HCMD_ACTIVE for command"
"%s\n", get_cmd_string(cmd->id));
ret = -ETIMEDOUT;
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,12 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)

/* stop and reset the on-board processor */
iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_NEVO_RESET);

/* clear all status bits */
clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status);
clear_bit(STATUS_INT_ENABLED, &trans_pcie->status);
clear_bit(STATUS_DEVICE_ENABLED, &trans_pcie->status);
clear_bit(STATUS_POWER_PMI, &trans_pcie->status);
}

static void iwl_trans_pcie_wowlan_suspend(struct iwl_trans *trans)
Expand Down

0 comments on commit 5f5f61d

Please sign in to comment.