From patchwork Mon Jun 29 11:21:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 6688431 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6FFD4C05AC for ; Mon, 29 Jun 2015 11:21:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A19D62045E for ; Mon, 29 Jun 2015 11:21:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AD632044C for ; Mon, 29 Jun 2015 11:21:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9X85-0005jO-3e; Mon, 29 Jun 2015 11:21:37 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9X82-0005WX-HL for ath10k@lists.infradead.org; Mon, 29 Jun 2015 11:21:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1435576895; x=1467112895; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=vCU74/mjavYC8fEwXPqAc0/P1KuIqsfKqR+AFGegwBk=; b=lb0o93W6MlFqnVQAw4OIL95EXyFGWCIx8t3S1SOpzBigv0a99pVsuf37 kpVwOkmGAXFWYS1ZDnV3MvtBys1OSNusswadidj3IMDcwR+7dWHU/Xu1W HqLq3bss+ML0CpdMSQcfvleZJ8eEkcqBengADR/RG8wYlEWRaPst15LE9 8=; X-IronPort-AV: E=McAfee;i="5700,7163,7846"; a="217943011" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Jun 2015 04:21:13 -0700 X-IronPort-AV: E=Sophos; i="5.13,698,1427785200"; d="scan'208"; a="1002730485" Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 29 Jun 2015 04:21:12 -0700 Received: from potku.adurom.net (10.80.80.8) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Mon, 29 Jun 2015 04:21:10 -0700 From: Kalle Valo To: Vasanthakumar Thiagarajan Subject: Re: [PATCH V2 09/10] ath10k: Add support for code swap References: <1434610870-5505-1-git-send-email-vthiagar@qti.qualcomm.com> <1434610870-5505-10-git-send-email-vthiagar@qti.qualcomm.com> Date: Mon, 29 Jun 2015 14:21:03 +0300 In-Reply-To: <1434610870-5505-10-git-send-email-vthiagar@qti.qualcomm.com> (Vasanthakumar Thiagarajan's message of "Thu, 18 Jun 2015 12:31:09 +0530") Message-ID: <87egku3gm8.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To NASANEXM01G.na.qualcomm.com (10.85.0.33) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150629_042134_687116_7C4F08DB X-CRM114-Status: GOOD ( 14.40 ) X-Spam-Score: -7.7 (-------) Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Vasanthakumar Thiagarajan writes: > Code swap is a mechanism to use host memory to store > some fw binary code segment. Ath10k host driver allocates > and loads the code swap binary into the host memory and > configures the target with the host allocated memory > information at the address taken from code swap binary. > This patch adds code swap support for firmware binary. > Code swap binary for firmware bin is available in > ATH10K_FW_IE_FW_CODE_SWAP_IMAGE. > > Signed-off-by: Vasanthakumar Thiagarajan [...] > +static struct ath10k_swap_code_seg_info * > +ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len) > +{ > + struct ath10k_swap_code_seg_info *seg_info; > + void *virt_addr; > + dma_addr_t paddr; > + > + swap_bin_len = roundup(swap_bin_len, 2); > + if (swap_bin_len > ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX) { > + ath10k_err(ar, "refusing code swap bin because it is too big %zd > %d\n", > + swap_bin_len, ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX); kbuild found a bug here, I fixed it with the patch below. Please review: --- a/drivers/net/wireless/ath/ath10k/swap.c +++ b/drivers/net/wireless/ath/ath10k/swap.c @@ -106,7 +106,7 @@ ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len) swap_bin_len = roundup(swap_bin_len, 2); if (swap_bin_len > ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX) { - ath10k_err(ar, "refusing code swap bin because it is too big %zd > %d\n", + ath10k_err(ar, "refusing code swap bin because it is too big %zu > %d\n", swap_bin_len, ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX); return NULL; }