提交 bb71d01a 编写于 作者: A Avinash Patil 提交者: John W. Linville

mwifiex: restore current SDIO write port in failure cases

During SDIO MP aggregation, we at first acquire current write
port to write data onto and then proceed with using this port
for SDIO write. If error occurs later in mwifiex_write_data_sync
because device is suspended or SDIO write failure, we do not
restore current write port and write bitmap. This results into
leaking one port and hole in SDIO write port bitmap.
Restore current write port and reset bitmap accordingly in
failure cases to avoid this.
Reported-by: NJames Cameron <quozl@laptop.org>
Signed-off-by: NAvinash Patil <patila@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Reviewed-by: NJames Cameron <quozl@laptop.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 89ce4f65
......@@ -1678,8 +1678,12 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter,
if (ret) {
if (type == MWIFIEX_TYPE_CMD)
adapter->cmd_sent = false;
if (type == MWIFIEX_TYPE_DATA)
if (type == MWIFIEX_TYPE_DATA) {
adapter->data_sent = false;
/* restore curr_wr_port in error cases */
card->curr_wr_port = port;
card->mp_wr_bitmap |= (u32)(1 << card->curr_wr_port);
}
} else {
if (type == MWIFIEX_TYPE_DATA) {
if (!(card->mp_wr_bitmap & (1 << card->curr_wr_port)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册