Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8538823f7c692c98e8b7e19cb580faa56e25e89f
Commit:     8538823f7c692c98e8b7e19cb580faa56e25e89f
Parent:     7003b078c82d141216deecef4de154711a107aab
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 15:41:30 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:07:45 2008 -0800

    libertas: discard DEFER responses to commands; let the timeout trigger
    
    When the firmware returns 0x0004, it wants us to try again later. We can
    achieve that simply by throwing out the response and letting the command
    timeout code kick in.
    
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/cmdresp.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/libertas/cmdresp.c 
b/drivers/net/wireless/libertas/cmdresp.c
index 4d38461..0cd9662 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -665,6 +665,16 @@ int lbs_process_rx_command(struct lbs_private *priv)
                goto done;
        }
 
+       if (resp->result == cpu_to_le16(0x0004)) {
+               /* 0x0004 means -EAGAIN. Drop the response, let it time out
+                  and be resubmitted */
+               lbs_pr_info("Firmware returns DEFER to command %x. Will let it 
time out...\n",
+                           le16_to_cpu(resp->command));
+               spin_unlock_irqrestore(&priv->driver_lock, flags);
+               ret = -1;
+               goto done;
+       }
+
        /* Now we got response from FW, cancel the command timer */
        del_timer(&priv->command_timer);
        priv->cmd_timed_out = 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to