Commit 67c52a4d authored by Karun Eagalapati's avatar Karun Eagalapati Committed by Kalle Valo

rsi: buffer available interrupt handling

BUFFER_AVAILABLE interrupt is sent by firmware to indicate
change in buffer status. We should check buffer status while
handling this interrupt. Currently buffer status is checked
only while dequeueing packets. This patch fixes a data
traffic stuck problem observed occasionally.
Signed-off-by: default avatarKarun Eagalapati <karun256@gmail.com>
Signed-off-by: default avatarAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent d64dd2a1
...@@ -259,10 +259,12 @@ void rsi_interrupt_handler(struct rsi_hw *adapter) ...@@ -259,10 +259,12 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
switch (isr_type) { switch (isr_type) {
case BUFFER_AVAILABLE: case BUFFER_AVAILABLE:
dev->rx_info.watch_bufferfull_count = 0; status = rsi_sdio_check_buffer_status(adapter,
dev->rx_info.buffer_full = false; 0);
dev->rx_info.semi_buffer_full = false; if (status < 0)
dev->rx_info.mgmt_buffer_full = false; rsi_dbg(ERR_ZONE,
"%s: Failed to check buffer status\n",
__func__);
rsi_sdio_ack_intr(common->priv, rsi_sdio_ack_intr(common->priv,
(1 << PKT_BUFF_AVAILABLE)); (1 << PKT_BUFF_AVAILABLE));
rsi_set_event(&common->tx_thread.event); rsi_set_event(&common->tx_thread.event);
...@@ -270,7 +272,6 @@ void rsi_interrupt_handler(struct rsi_hw *adapter) ...@@ -270,7 +272,6 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
rsi_dbg(ISR_ZONE, rsi_dbg(ISR_ZONE,
"%s: ==> BUFFER_AVAILABLE <==\n", "%s: ==> BUFFER_AVAILABLE <==\n",
__func__); __func__);
dev->rx_info.buf_available_counter++;
dev->buff_status_updated = true; dev->buff_status_updated = true;
break; break;
......
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