提交 b3781c74 编写于 作者: A Andrey Yurovsky 提交者: John W. Linville

libertas: fix IEEE PS mode in GSPI driver

The card firmware does not set the Command Download Ready interrupt bit
when IEEE PS mode is enabled, preventing the driver from sending
commands (such as the command to exit IEEE PS mode) since there is no
indication that the card is ready to accept commands.

This patch works around the problem by using the the TX Download Ready
bit in place of the Command Download Ready Bit while in IEEE PS mode.
TX Download Ready is set in IEEE PS mode.
Signed-off-by: NAndrey Yurovsky <andrey@cozybit.com>
Signed-off-by: NJavier Cardona <javier@cozybit.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 68f2d026
...@@ -875,7 +875,12 @@ static int lbs_spi_thread(void *data) ...@@ -875,7 +875,12 @@ static int lbs_spi_thread(void *data)
err = if_spi_c2h_data(card); err = if_spi_c2h_data(card);
if (err) if (err)
goto err; goto err;
if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY) {
/* workaround: in PS mode, the card does not set the Command
* Download Ready bit, but it sets TX Download Ready. */
if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
(card->priv->psstate != PS_STATE_FULL_POWER &&
(hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
/* This means two things. First of all, /* This means two things. First of all,
* if there was a previous command sent, the card has * if there was a previous command sent, the card has
* successfully received it. * successfully received it.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册