Commit ea2d0639 authored by andrey@cozybit.com's avatar andrey@cozybit.com Committed by John W. Linville

libertas: fix GSPI card event handling

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: default avatarAndrey Yurovsky <andrey@cozybit.com>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4ef699fb
...@@ -814,6 +814,13 @@ static void if_spi_e2h(struct if_spi_card *card) ...@@ -814,6 +814,13 @@ static void if_spi_e2h(struct if_spi_card *card)
if (err) if (err)
goto out; 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); spin_lock_irqsave(&priv->driver_lock, flags);
lbs_queue_event(priv, cause & 0xff); lbs_queue_event(priv, cause & 0xff);
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment