From patchwork Wed Aug 3 20:43:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: engineering@keppy.com X-Patchwork-Id: 9262289 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8E866048B for ; Wed, 3 Aug 2016 22:53:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB49E27FA8 for ; Wed, 3 Aug 2016 22:53:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFFE328066; Wed, 3 Aug 2016 22:53:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05C5A27FA8 for ; Wed, 3 Aug 2016 22:53:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932976AbcHCWx2 (ORCPT ); Wed, 3 Aug 2016 18:53:28 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:35130 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932959AbcHCWx0 (ORCPT ); Wed, 3 Aug 2016 18:53:26 -0400 Received: by mail-it0-f67.google.com with SMTP id f6so17061992ith.2 for ; Wed, 03 Aug 2016 15:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=keppy-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=ZuLcIqHv8hcY1hRM7iUsJzmLUnI81Cmh1yEVx18rQPk=; b=1Cub6Eb8BU61CZtJSdYEsaZHkWK88/xS+92IdM0WjYYgikQMIeaINEdekl6w4kDKlY exK9A/4xAgpeI49qd3i7bT8Cux9EGAdizRu+Ghs380IIHra4fDRH5j4CPQJnRfXBsqat FZzcqgsBAnHWpyC7XZVq8Qe8BKj6E+LosQZjuYRetNii5GTAlg/vBNGNF+296J+YDmk/ LY3f4OgwAyF5vA0PoUmDtpKXOETTDqj1BCbnjj+8A2Ywj9WDCdjPemoHgprBmmabXBtg t9E6s1H0NAvR1KFfQAK0NC4O25Fbp3akajIrYKR+2To0bX37ZaNcievQDsgDCA+fiE18 HcaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZuLcIqHv8hcY1hRM7iUsJzmLUnI81Cmh1yEVx18rQPk=; b=lYPlMOnfd9WDi9nrf2ra8r7kQGbhf6GpgIONmm8hJwZcXYzQFhQCne6B6e4LS1xuI/ LXGKwrQXfF3UAD13T51KEwhKShYeu/dKiamx1qTeg2cGG91HBle164NL7y7pXuiw6mCV vcmwt0QfaGqABTAiUXYlorJ1KCI9VYo5vIYVbzE+mzxgU2KJ/1gqwU43C7Q2TtHadU7j Cgv+99u0QNSeqqrzEGx2YX0f0paJaLpmc01x7Be1QpO9p/DtBs+IppL1cy1U+whTkzT4 1bd2ka5mFtN/vfBxCRnLKkmBo2PS8jAW1Vj7pAw3N6aalSd+m2QQbqXNWBJCrthwpx2R /b9w== X-Gm-Message-State: AEkoouttYKwYM7+OnSmjqCr/v8czJJLQ4E8RBB8mSV4+MWHfoEVAmRNcgzOUHCorFDbM9A== X-Received: by 10.36.200.134 with SMTP id w128mr73651588itf.92.1470256866483; Wed, 03 Aug 2016 13:41:06 -0700 (PDT) Received: from danke-desktop.test.summit.com ([12.219.245.219]) by smtp.gmail.com with ESMTPSA id k99sm4249618iod.25.2016.08.03.13.41.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 13:41:05 -0700 (PDT) From: engineering@keppy.com X-Google-Original-From: dan.kephart@lairdtech.com To: kvalo@qca.qualcomm.com Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH] ath6kl: enable firmware crash dumps on the AR6004 Date: Wed, 3 Aug 2016 16:43:43 -0400 Message-Id: <1470257023-6747-1-git-send-email-dan.kephart@lairdtech.com> X-Mailer: git-send-email 2.4.10 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dan Kephart 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 Reviewed-by: Steve deRosier --- 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 *)®dump_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]),