From patchwork Thu May 11 11:52:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9721269 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 2E2E36031B for ; Thu, 11 May 2017 11:53:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26C6628649 for ; Thu, 11 May 2017 11:53:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A3FF28653; Thu, 11 May 2017 11:53:32 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 D06B528649 for ; Thu, 11 May 2017 11:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932524AbdEKLxU (ORCPT ); Thu, 11 May 2017 07:53:20 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:58319 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932385AbdEKLxS (ORCPT ); Thu, 11 May 2017 07:53:18 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lxwwu-1e2yCg1m56-015Ixl; Thu, 11 May 2017 13:53:10 +0200 From: Arnd Bergmann To: Kalle Valo Cc: Arnd Bergmann , stable@vger.kernel.org, "Reizer, Eyal" , Tony Lindgren , Wei Yongjun , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wlcore: fix 64K page support Date: Thu, 11 May 2017 13:52:09 +0200 Message-Id: <20170511115307.3060650-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:kEF+9LlPTtfEQea305v9R9+9psnq/ZIDtfYRb66kjkHkoHEcxeR 626wV4aThXAwFVssknpx0ij7dfsj1yzcM9p/LNKCIuoob0qHSRkULEio5IefU5Ye7bCDsdd NVlehY3vWqY9hh1vq7sJo2t8NAnYN9VHbBb0rKQuB/yLaEssTVSHAlmwBHUrwq1ygYEyRFx 1TaFQZuS8CE23YEWK8fkQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:wpvhRVM39L0=:/QS6L5/+v5kW2PwtzDFl9H UwXiXwupzIBdOFTxIpHYGy+O/3L0KoRo2nIx57K1QhuJEb5kL4ZDhwo2SvxyDkBT3nIBeMSJq KR4FpfTpNb3C1J0AZYTj7o020klnb1ao/cNh5kJKNwunHf0tNxCkeL58KG+go+VkCCX5AuLDu EhBUlufm6BNYR4KEvZsS2JvgouC4BryYY2H43ArMndIFZiJ6RXmBviSaLT+eAoehVkVc6QWT/ bYrhxsYCMNenyYtSnd/n2iX3Xo9ya3hQZxR9VDX1nAPmi7puQ8j5nXk9ZCOwXjr8UWCj1XASS uxM1z53ZrazAUI28d2M4+n8j6oe8gI+2QAwItho9ghamLlvk7cw6P3xalMIOtn3zbxSXOcHnS pyi5kIjMdB9GKfZEbYTwtCR/kL4rScckgtc0wJtRiQksFn4hSqwS0fdNuEPBLlRSbGke4KPQB hkBn7BR+dN85Z9Cf05KGFA47EjqbtcLdwxVgvdFdGTlIQ1fiU3/cBwKmfe56nt7Nd9X5cs3DR Xo/1YPGoVuvnjlXRM0+soN8IKbqLpunK3WNrmrA7aGXTgzkaszs6xONEJpXpTGC8vfRccfW2i E3Cqim9H6+p55aEh+EkNtCST7wmgqOJHaad9VuqR2iIY9NqJbDwRy1RuavC3A8DmgFqRbsVCZ AlSLrBOrczQO9tKpOjrOuo2wM558q6LqDn/mDyrbUKb2FwmRJuw7NmvKqxAkXbazuhmQ= 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 In the stable linux-3.16 branch, I ran into a warning in the wlcore driver: drivers/net/wireless/ti/wlcore/spi.c: In function 'wl12xx_spi_raw_write': drivers/net/wireless/ti/wlcore/spi.c:315:1: error: the frame size of 12848 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Newer kernels no longer show the warning, but the bug is still there, as the allocation is based on the CPU page size rather than the actual capabilities of the hardware. This replaces the PAGE_SIZE macro with the SZ_4K macro, i.e. 4096 bytes per buffer. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ti/wlcore/spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index f949ad2bd898..fa3547e06424 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -70,10 +70,10 @@ #define WSPI_MAX_CHUNK_SIZE 4092 /* - * wl18xx driver aggregation buffer size is (13 * PAGE_SIZE) compared to - * (4 * PAGE_SIZE) for wl12xx, so use the larger buffer needed for wl18xx + * wl18xx driver aggregation buffer size is (13 * 4K) compared to + * (4 * 4K) for wl12xx, so use the larger buffer needed for wl18xx */ -#define SPI_AGGR_BUFFER_SIZE (13 * PAGE_SIZE) +#define SPI_AGGR_BUFFER_SIZE (13 * SZ_4K) /* Maximum number of SPI write chunks */ #define WSPI_MAX_NUM_OF_CHUNKS \