From: andrey@cozybit.com
To: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Cc: dcbw@redhat.com
Subject: libertas: fix GSPI card event handling
Date: Tue, 19 May 2009 17:20:13 -0700 (PDT) [thread overview]
Message-ID: <4a134cbd.1ebc720a.4cee.ffffc1c3@mx.google.com> (raw)
The GPSI interface driver does not re-enable the Card Event Interrupt, which
causes problems after a card event (for example: link-loss) comes in. This
can lead, for example, to the card failing to re-associate. This patch
ensures that we re-enable the Card Event Interrupt when we handle card events.
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index dccd01f..5fa55fe 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -814,6 +814,13 @@ static void if_spi_e2h(struct if_spi_card *card)
if (err)
goto out;
+ /* re-enable the card event interrupt */
+ spu_write_u16(card, IF_SPI_HOST_INT_STATUS_REG,
+ ~IF_SPI_HICU_CARD_EVENT);
+
+ /* generate a card interrupt */
+ spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_HOST_EVENT);
+
spin_lock_irqsave(&priv->driver_lock, flags);
lbs_queue_event(priv, cause & 0xff);
spin_unlock_irqrestore(&priv->driver_lock, flags);
next reply other threads:[~2009-05-20 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-20 0:20 andrey [this message]
2009-05-20 22:18 ` libertas: fix GSPI card event handling Dan Williams
2009-05-20 22:28 ` Andrey Yurovsky
2009-05-20 22:29 ` Dan Williams
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=4a134cbd.1ebc720a.4cee.ffffc1c3@mx.google.com \
--to=andrey@cozybit.com \
--cc=dcbw@redhat.com \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/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).