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: 6688421 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 842B99F39B for ; Mon, 29 Jun 2015 11:21:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B78FF2044C for ; Mon, 29 Jun 2015 11:21:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C729E203DC for ; Mon, 29 Jun 2015 11:21:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752946AbbF2LVP (ORCPT ); Mon, 29 Jun 2015 07:21:15 -0400 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:32470 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752582AbbF2LVN (ORCPT ); Mon, 29 Jun 2015 07:21:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1435576874; x=1467112874; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=vCU74/mjavYC8fEwXPqAc0/P1KuIqsfKqR+AFGegwBk=; b=Y7S7EmIZiqfsc7odefVs5NLqENKr68gTJKUnVYsZ0caWey3TNtuma4Tq vsgc7vHbGf5kyBEEKbfm/7NAHbK7bfTLpTFGCfFOQFECqqPOc/mrU6bMx Qjm2Ut2A4gTwIom9yoPsn0DgjdBr9/A8HMsg0poFKIw44ROCWRELz0Dua E=; X-IronPort-AV: E=McAfee;i="5700,7163,7846"; a="91701905" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by sabertooth01.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 CC: , 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) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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; }