* [PATCH 1/3] ath6kl: fix busreqs so they can be reused when sg is cleaned up
2016-10-03 18:00 ` [PATCH 0/3] Allow ath6kl to be restarted James Minor
@ 2016-10-03 18:00 ` James Minor
2016-10-06 7:15 ` [1/3] " Kalle Valo
2016-10-03 18:00 ` [PATCH 2/3] ath6kl: after cleanup properly reflect that sg is disabled James Minor
2016-10-03 18:00 ` [PATCH 3/3] ath6kl: configure SDIO when power is reapplied James Minor
2 siblings, 1 reply; 5+ messages in thread
From: James Minor @ 2016-10-03 18:00 UTC (permalink / raw)
To: linux-wireless, ath6kl
Cc: kvalo, julia.cartwright, steve.derosier, James Minor
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(-)
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);
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] ath6kl: after cleanup properly reflect that sg is disabled
2016-10-03 18:00 ` [PATCH 0/3] Allow ath6kl to be restarted James Minor
2016-10-03 18:00 ` [PATCH 1/3] ath6kl: fix busreqs so they can be reused when sg is cleaned up James Minor
@ 2016-10-03 18:00 ` James Minor
2016-10-03 18:00 ` [PATCH 3/3] ath6kl: configure SDIO when power is reapplied James Minor
2 siblings, 0 replies; 5+ messages in thread
From: James Minor @ 2016-10-03 18:00 UTC (permalink / raw)
To: linux-wireless, ath6kl
Cc: kvalo, julia.cartwright, steve.derosier, James Minor
This allows the hardware to be restarted, as it will cause the
sg to be reinitialized.
Signed-off-by: James Minor <james.minor@ni.com>
Reviewed-by: Steve deRosier <steve.derosier@lairdtech.com>
---
drivers/net/wireless/ath/ath6kl/sdio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 96ed060..8261e24 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -714,6 +714,8 @@ static void ath6kl_sdio_cleanup_scatter(struct ath6kl *ar)
spin_lock_bh(&ar_sdio->scat_lock);
}
spin_unlock_bh(&ar_sdio->scat_lock);
+
+ ar_sdio->scatter_enabled = false;
}
/* setup of HIF scatter resources */
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] ath6kl: configure SDIO when power is reapplied
2016-10-03 18:00 ` [PATCH 0/3] Allow ath6kl to be restarted James Minor
2016-10-03 18:00 ` [PATCH 1/3] ath6kl: fix busreqs so they can be reused when sg is cleaned up James Minor
2016-10-03 18:00 ` [PATCH 2/3] ath6kl: after cleanup properly reflect that sg is disabled James Minor
@ 2016-10-03 18:00 ` James Minor
2 siblings, 0 replies; 5+ messages in thread
From: James Minor @ 2016-10-03 18:00 UTC (permalink / raw)
To: linux-wireless, ath6kl
Cc: kvalo, julia.cartwright, steve.derosier, James Minor
When power is removed from the device, all of the SDIO settings
return to default. Fix that by reconfiguring after power is
applied.
Signed-off-by: James Minor <james.minor@ni.com>
Reviewed-by: Steve deRosier <steve.derosier@lairdtech.com>
---
drivers/net/wireless/ath/ath6kl/sdio.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 8261e24..c2df075 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -75,6 +75,8 @@ struct ath6kl_sdio {
#define CMD53_ARG_FIXED_ADDRESS 0
#define CMD53_ARG_INCR_ADDRESS 1
+static int ath6kl_sdio_config(struct ath6kl *ar);
+
static inline struct ath6kl_sdio *ath6kl_sdio_priv(struct ath6kl *ar)
{
return ar->hif_priv;
@@ -526,8 +528,15 @@ static int ath6kl_sdio_power_on(struct ath6kl *ar)
*/
msleep(10);
+ ret = ath6kl_sdio_config(ar);
+ if (ret) {
+ ath6kl_err("Failed to config sdio: %d\n", ret);
+ goto out;
+ }
+
ar_sdio->is_disabled = false;
+out:
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread