diff mbox

[1/3] ath6kl: fix busreqs so they can be reused when sg is cleaned up

Message ID 1475517604-17710-2-git-send-email-james.minor@ni.com (mailing list archive)
State Accepted
Commit 3605d751d5dd82ad1586bed72a0ebc84d81e20c7
Delegated to: Kalle Valo
Headers show

Commit Message

James Minor Oct. 3, 2016, 6 p.m. UTC
To reuse the busreqs in case of hardware restart, they must be
properly reinitialized.  If the scat_req pointer isn't reset to
0, __ath6kl_sdio_write_async() will assume there is sg work to be
done (causing a kernel OOPS).

Signed-off-by: James Minor <james.minor@ni.com>
Reviewed-by: Steve deRosier <steve.derosier@lairdtech.com>
---
 drivers/net/wireless/ath/ath6kl/sdio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kalle Valo Oct. 6, 2016, 7:15 a.m. UTC | #1
James Minor <james.minor@ni.com> wrote:
> To reuse the busreqs in case of hardware restart, they must be
> properly reinitialized.  If the scat_req pointer isn't reset to
> 0, __ath6kl_sdio_write_async() will assume there is sg work to be
> done (causing a kernel OOPS).
> 
> Signed-off-by: James Minor <james.minor@ni.com>
> Reviewed-by: Steve deRosier <steve.derosier@lairdtech.com>

3 patches applied to ath-next branch of ath.git, thanks.

3605d751d5dd ath6kl: fix busreqs so they can be reused when sg is cleaned up
db14b18a73a1 ath6kl: after cleanup properly reflect that sg is disabled
fdb6e4839e3a ath6kl: configure SDIO when power is reapplied
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index eab0ab9..96ed060 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -703,8 +703,10 @@  static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar)
 		 * ath6kl_hif_rw_comp_handler() with status -ECANCELED so
 		 * that the packet is properly freed?
 		 */
-		if (s_req->busrequest)
+		if (s_req->busrequest) {
+			s_req->busrequest->scat_req = 0;
 			ath6kl_sdio_free_bus_req(ar_sdio, s_req->busrequest);
+		}
 		kfree(s_req->virt_dma_buf);
 		kfree(s_req->sgentries);
 		kfree(s_req);