Skip to content

Commit

Permalink
libertas: fix GSPI card event handling
Browse files Browse the repository at this point in the history
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>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
andrey@cozybit.com authored and John W. Linville committed May 22, 2009
1 parent 4ef699f commit ea2d063
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/wireless/libertas/if_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ea2d063

Please sign in to comment.