Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102734
b: refs/heads/master
c: 57962f0
h: refs/heads/master
v: v3
  • Loading branch information
Holger Schurig authored and John W. Linville committed May 22, 2008
1 parent 148ada2 commit a66219f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 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: bd9b448f4c0a514559bdae4ca18ca3e8cd999c6d
refs/heads/master: 57962f0b9d76487a660619f97c0aa811924274a0
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ static void lbs_submit_command(struct lbs_private *priv,
struct cmd_header *cmd;
uint16_t cmdsize;
uint16_t command;
int timeo = 5 * HZ;
int timeo = 3 * HZ;
int ret;

lbs_deb_enter(LBS_DEB_HOST);
Expand All @@ -1154,7 +1154,7 @@ static void lbs_submit_command(struct lbs_private *priv,
/* These commands take longer */
if (command == CMD_802_11_SCAN || command == CMD_802_11_ASSOCIATE ||
command == CMD_802_11_AUTHENTICATE)
timeo = 10 * HZ;
timeo = 5 * HZ;

lbs_deb_cmd("DNLD_CMD: command 0x%04x, seq %d, size %d\n",
command, le16_to_cpu(cmd->seqnum), cmdsize);
Expand All @@ -1166,7 +1166,7 @@ static void lbs_submit_command(struct lbs_private *priv,
lbs_pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret);
/* Let the timer kick in and retry, and potentially reset
the whole thing if the condition persists */
timeo = HZ;
timeo = HZ/4;
}

/* Setup the timer after transmit command */
Expand Down
20 changes: 11 additions & 9 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,10 @@ static int lbs_thread(void *data)
if (priv->cmd_timed_out && priv->cur_cmd) {
struct cmd_ctrl_node *cmdnode = priv->cur_cmd;

if (++priv->nr_retries > 10) {
lbs_pr_info("Excessive timeouts submitting command %x\n",
le16_to_cpu(cmdnode->cmdbuf->command));
if (++priv->nr_retries > 3) {
lbs_pr_info("Excessive timeouts submitting "
"command 0x%04x\n",
le16_to_cpu(cmdnode->cmdbuf->command));
lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
priv->nr_retries = 0;
if (priv->reset_card) {
Expand All @@ -794,8 +795,10 @@ static int lbs_thread(void *data)
}
} else {
priv->cur_cmd = NULL;
lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);
lbs_pr_info("requeueing command 0x%04x due "
"to timeout (#%d)\n",
le16_to_cpu(cmdnode->cmdbuf->command),
priv->nr_retries);

/* Stick it back at the _top_ of the pending queue
for immediate resubmission */
Expand Down Expand Up @@ -986,12 +989,11 @@ static void command_timer_fn(unsigned long data)
lbs_deb_enter(LBS_DEB_CMD);
spin_lock_irqsave(&priv->driver_lock, flags);

if (!priv->cur_cmd) {
lbs_pr_info("Command timer expired; no pending command\n");
if (!priv->cur_cmd)
goto out;
}

lbs_pr_info("Command %x timed out\n", le16_to_cpu(priv->cur_cmd->cmdbuf->command));
lbs_pr_info("command 0x%04x timed out\n",
le16_to_cpu(priv->cur_cmd->cmdbuf->command));

priv->cmd_timed_out = 1;
wake_up_interruptible(&priv->waitq);
Expand Down

0 comments on commit a66219f

Please sign in to comment.