From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] libertas: before sleeping, check for a command result
Date: Tue, 27 May 2008 16:08:52 -0400 [thread overview]
Message-ID: <1211918933.555.18.camel@localhost.localdomain> (raw)
In-Reply-To: <200805231604.13144.hs4233@mail.mn-solutions.de>
On Fri, 2008-05-23 at 16:04 +0200, Holger Schurig wrote:
> If we don't check for a command response early, but rather sleep,
> then we might sleep despite an already-received command response.
> This will lead to a command-timeout.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
> Index: wireless-testing/drivers/net/wireless/libertas/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/main.c 2008-05-23 14:25:16.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/main.c 2008-05-23 14:25:51.000000000 +0200
> @@ -722,14 +722,14 @@ static int lbs_thread(void *data)
> shouldsleep = 1; /* Something is en route to the device already */
> else if (priv->tx_pending_len > 0)
> shouldsleep = 0; /* We've a packet to send */
> + else if (priv->resp_len[priv->resp_idx])
> + shouldsleep = 0; /* We have a command response */
> else if (priv->cur_cmd)
> shouldsleep = 1; /* Can't send a command; one already running */
> else if (!list_empty(&priv->cmdpendingq))
> shouldsleep = 0; /* We have a command to send */
> else if (__kfifo_len(priv->event_fifo))
> shouldsleep = 0; /* We have an event to process */
> - else if (priv->resp_len[priv->resp_idx])
> - shouldsleep = 0; /* We have a command response */
> else
> shouldsleep = 1; /* No command */
>
prev parent reply other threads:[~2008-05-27 20:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 14:04 [PATCH] libertas: before sleeping, check for a command result Holger Schurig
2008-05-23 14:26 ` Johan Adolfsson
2008-05-23 14:32 ` Dan Williams
2008-05-25 20:28 ` Holger Schurig
2008-05-23 14:57 ` Holger Schurig
2008-05-26 16:14 ` Johan Adolfsson
2008-05-27 20:08 ` Dan Williams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1211918933.555.18.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=hs4233@mail.mn-solutions.de \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).