All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: enable firmware crash dumps on the AR6004
@ 2016-08-30 14:11 engineering
  2016-08-30 14:19 ` Valo, Kalle
  0 siblings, 1 reply; 5+ messages in thread
From: engineering @ 2016-08-30 14:11 UTC (permalink / raw)
  To: kvalo; +Cc: ath6kl, linux-wireless

From: Dan Kephart <dan.kephart@lairdtech.com>

The firmware crash dumps on the 6004 are the same as the 6003. Remove the
statement guarding it from dumping on the 6004.  Renamed the
REG_DUMP_COUNT_AR6003 to reflect support on both chips.

Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>
---
 drivers/net/wireless/ath/ath6kl/hif.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 18c0708..d194253 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -64,7 +64,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
 }
 EXPORT_SYMBOL(ath6kl_hif_rw_comp_handler);
 
-#define REG_DUMP_COUNT_AR6003   60
+#define REGISTER_DUMP_COUNT     60
 #define REGISTER_DUMP_LEN_MAX   60
 
 static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
@@ -73,9 +73,6 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 	u32 i, address, regdump_addr = 0;
 	int ret;
 
-	if (ar->target_type != TARGET_TYPE_AR6003)
-		return;
-
 	/* the reg dump pointer is copied to the host interest area */
 	address = ath6kl_get_hi_item_addr(ar, HI_ITEM(hi_failure_state));
 	address = TARG_VTOP(ar->target_type, address);
@@ -95,7 +92,7 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 
 	/* fetch register dump data */
 	ret = ath6kl_diag_read(ar, regdump_addr, (u8 *)&regdump_val[0],
-				  REG_DUMP_COUNT_AR6003 * (sizeof(u32)));
+				  REGISTER_DUMP_COUNT * (sizeof(u32)));
 	if (ret) {
 		ath6kl_warn("failed to get register dump: %d\n", ret);
 		return;
@@ -105,9 +102,9 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 	ath6kl_info("hw 0x%x fw %s\n", ar->wiphy->hw_version,
 		    ar->wiphy->fw_version);
 
-	BUILD_BUG_ON(REG_DUMP_COUNT_AR6003 % 4);
+	BUILD_BUG_ON(REGISTER_DUMP_COUNT % 4);
 
-	for (i = 0; i < REG_DUMP_COUNT_AR6003; i += 4) {
+	for (i = 0; i < REGISTER_DUMP_COUNT; i += 4) {
 		ath6kl_info("%d: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n",
 			    i,
 			    le32_to_cpu(regdump_val[i]),
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath6kl: enable firmware crash dumps on the AR6004
  2016-08-30 14:11 [PATCH] ath6kl: enable firmware crash dumps on the AR6004 engineering
@ 2016-08-30 14:19 ` Valo, Kalle
  2016-08-30 14:33   ` Dan Kephart
  0 siblings, 1 reply; 5+ messages in thread
From: Valo, Kalle @ 2016-08-30 14:19 UTC (permalink / raw)
  To: engineering; +Cc: ath6kl, linux-wireless

engineering@keppy.com writes:

> From: Dan Kephart <dan.kephart@lairdtech.com>
>
> The firmware crash dumps on the 6004 are the same as the 6003. Remove the
> statement guarding it from dumping on the 6004.  Renamed the
> REG_DUMP_COUNT_AR6003 to reflect support on both chips.
>
> Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>

I have a similar patch already on my queue:

https://patchwork.kernel.org/patch/9262289/

How does this differ from that? Please _always_ add a changelog so that
people know what has changed. Also remember to add "[PATCH v2]" to the
title.

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc=
hes#subject_name

--=20
Kalle Valo=

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath6kl: enable firmware crash dumps on the AR6004
  2016-08-30 14:19 ` Valo, Kalle
@ 2016-08-30 14:33   ` Dan Kephart
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Kephart @ 2016-08-30 14:33 UTC (permalink / raw)
  To: Valo, Kalle, engineering; +Cc: ath6kl, linux-wireless

U29ycnkgS2FsbGUsIEkgZGlkIG5vdCBpbnRlbmQgdG8gcmUtc2VuZCB0aGlzIHBhdGNoIHVwLCBp
dCBpcyB0aGUgc2FtZSBhcyB0aGUgcHJldmlvdXMgb25lLg0KDQoNCk9uIDgvMzAvMTYsIDEwOjE5
IEFNLCAibGludXgtd2lyZWxlc3Mtb3duZXJAdmdlci5rZXJuZWwub3JnIG9uIGJlaGFsZiBvZiBW
YWxvLCBLYWxsZSIgPGxpbnV4LXdpcmVsZXNzLW93bmVyQHZnZXIua2VybmVsLm9yZyBvbiBiZWhh
bGYgb2Yga3ZhbG9AcWNhLnF1YWxjb21tLmNvbT4gd3JvdGU6DQoNCiAgICBlbmdpbmVlcmluZ0Br
ZXBweS5jb20gd3JpdGVzOg0KICAgIA0KICAgID4gRnJvbTogRGFuIEtlcGhhcnQgPGRhbi5rZXBo
YXJ0QGxhaXJkdGVjaC5jb20+DQogICAgPg0KICAgID4gVGhlIGZpcm13YXJlIGNyYXNoIGR1bXBz
IG9uIHRoZSA2MDA0IGFyZSB0aGUgc2FtZSBhcyB0aGUgNjAwMy4gUmVtb3ZlIHRoZQ0KICAgID4g
c3RhdGVtZW50IGd1YXJkaW5nIGl0IGZyb20gZHVtcGluZyBvbiB0aGUgNjAwNC4gIFJlbmFtZWQg
dGhlDQogICAgPiBSRUdfRFVNUF9DT1VOVF9BUjYwMDMgdG8gcmVmbGVjdCBzdXBwb3J0IG9uIGJv
dGggY2hpcHMuDQogICAgPg0KICAgID4gU2lnbmVkLW9mZi1ieTogRGFuIEtlcGhhcnQgPGRhbi5r
ZXBoYXJ0QGxhaXJkdGVjaC5jb20+DQogICAgDQogICAgSSBoYXZlIGEgc2ltaWxhciBwYXRjaCBh
bHJlYWR5IG9uIG15IHF1ZXVlOg0KICAgIA0KICAgIGh0dHBzOi8vcGF0Y2h3b3JrLmtlcm5lbC5v
cmcvcGF0Y2gvOTI2MjI4OS8NCiAgICANCiAgICBIb3cgZG9lcyB0aGlzIGRpZmZlciBmcm9tIHRo
YXQ/IFBsZWFzZSBfYWx3YXlzXyBhZGQgYSBjaGFuZ2Vsb2cgc28gdGhhdA0KICAgIHBlb3BsZSBr
bm93IHdoYXQgaGFzIGNoYW5nZWQuIEFsc28gcmVtZW1iZXIgdG8gYWRkICJbUEFUQ0ggdjJdIiB0
byB0aGUNCiAgICB0aXRsZS4NCiAgICANCiAgICBodHRwczovL3dpcmVsZXNzLndpa2kua2VybmVs
Lm9yZy9lbi9kZXZlbG9wZXJzL2RvY3VtZW50YXRpb24vc3VibWl0dGluZ3BhdGNoZXMjc3ViamVj
dF9uYW1lDQogICAgDQogICAgLS0gDQogICAgS2FsbGUgVmFsbw0KDQoNCg==

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ath6kl: enable firmware crash dumps on the AR6004
  2016-08-03 20:43 engineering
@ 2016-08-03 23:18 ` Steve deRosier
  0 siblings, 0 replies; 5+ messages in thread
From: Steve deRosier @ 2016-08-03 23:18 UTC (permalink / raw)
  To: engineering; +Cc: Kalle Valo, ath6kl, linux-wireless

On Wed, Aug 3, 2016 at 1:43 PM,  <engineering@keppy.com> wrote:
> From: Dan Kephart <dan.kephart@lairdtech.com>
>
> The firmware crash dumps on the 6004 are the same as the 6003. Remove the
> statement guarding it from dumping on the 6004.  Renamed the
> REG_DUMP_COUNT_AR6003 to reflect support on both chips.
>
> Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>

Since ath6kl only supports the 6003 and 6004, this looks fine to me
and works OK on my platforms.

Reviewed-by: Steve deRosier <steve.derosier@lairdtech.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ath6kl: enable firmware crash dumps on the AR6004
@ 2016-08-03 20:43 engineering
  2016-08-03 23:18 ` Steve deRosier
  0 siblings, 1 reply; 5+ messages in thread
From: engineering @ 2016-08-03 20:43 UTC (permalink / raw)
  To: kvalo; +Cc: ath6kl, linux-wireless

From: Dan Kephart <dan.kephart@lairdtech.com>

The firmware crash dumps on the 6004 are the same as the 6003. Remove the
statement guarding it from dumping on the 6004.  Renamed the
REG_DUMP_COUNT_AR6003 to reflect support on both chips.

Signed-off-by: Dan Kephart <dan.kephart@lairdtech.com>
---
 drivers/net/wireless/ath/ath6kl/hif.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 18c0708..d194253 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -64,7 +64,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
 }
 EXPORT_SYMBOL(ath6kl_hif_rw_comp_handler);
 
-#define REG_DUMP_COUNT_AR6003   60
+#define REGISTER_DUMP_COUNT     60
 #define REGISTER_DUMP_LEN_MAX   60
 
 static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
@@ -73,9 +73,6 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 	u32 i, address, regdump_addr = 0;
 	int ret;
 
-	if (ar->target_type != TARGET_TYPE_AR6003)
-		return;
-
 	/* the reg dump pointer is copied to the host interest area */
 	address = ath6kl_get_hi_item_addr(ar, HI_ITEM(hi_failure_state));
 	address = TARG_VTOP(ar->target_type, address);
@@ -95,7 +92,7 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 
 	/* fetch register dump data */
 	ret = ath6kl_diag_read(ar, regdump_addr, (u8 *)&regdump_val[0],
-				  REG_DUMP_COUNT_AR6003 * (sizeof(u32)));
+				  REGISTER_DUMP_COUNT * (sizeof(u32)));
 	if (ret) {
 		ath6kl_warn("failed to get register dump: %d\n", ret);
 		return;
@@ -105,9 +102,9 @@ static void ath6kl_hif_dump_fw_crash(struct ath6kl *ar)
 	ath6kl_info("hw 0x%x fw %s\n", ar->wiphy->hw_version,
 		    ar->wiphy->fw_version);
 
-	BUILD_BUG_ON(REG_DUMP_COUNT_AR6003 % 4);
+	BUILD_BUG_ON(REGISTER_DUMP_COUNT % 4);
 
-	for (i = 0; i < REG_DUMP_COUNT_AR6003; i += 4) {
+	for (i = 0; i < REGISTER_DUMP_COUNT; i += 4) {
 		ath6kl_info("%d: 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x\n",
 			    i,
 			    le32_to_cpu(regdump_val[i]),
-- 
2.4.10


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-08-30 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 14:11 [PATCH] ath6kl: enable firmware crash dumps on the AR6004 engineering
2016-08-30 14:19 ` Valo, Kalle
2016-08-30 14:33   ` Dan Kephart
  -- strict thread matches above, loose matches on Subject: below --
2016-08-03 20:43 engineering
2016-08-03 23:18 ` Steve deRosier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.