From patchwork Tue Jan 23 15:20:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Sander X-Patchwork-Id: 10180501 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 BE8C66037F for ; Tue, 23 Jan 2018 15:20:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEF2D287DA for ; Tue, 23 Jan 2018 15:20:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8114287C9; Tue, 23 Jan 2018 15:20:11 +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=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 3BF4228807 for ; Tue, 23 Jan 2018 15:20:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751224AbeAWPUF (ORCPT ); Tue, 23 Jan 2018 10:20:05 -0500 Received: from krieglstein.org ([176.28.13.145]:50948 "EHLO krieglstein.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbeAWPUE (ORCPT ); Tue, 23 Jan 2018 10:20:04 -0500 From: Tim Sander To: linux-wireless , shikha.singh@st.com Cc: Samuel Ortiz , "David S. Miller" , Johannes Berg Subject: PATCH for nfcst (out of tree stuff) was Re: [linux-nfc] st95hf driver not working with neard 0.16 Date: Tue, 23 Jan 2018 16:20:02 +0100 Message-ID: <3546776.J2PkCpDXvZ@dabox> Organization: Sander and Lightning User-Agent: KMail/5.1.3 (Linux/4.9.2; KDE/5.18.0; x86_64; ; ) In-Reply-To: <6803968.AFljYLBCnO@dabox> References: <6803968.AFljYLBCnO@dabox> MIME-Version: 1.0 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 Hi Am Montag, 22. Januar 2018, 17:51:51 CET schrieb Tim Sander: > When using the st,stnfc driver linked at the beginning it works with tags: > nfctool -d nfc0 -p initiate > Start polling on nfc0 as initiator > > Targets found for nfc0 > Tags: [ tag3 ] > Devices: [ ] > > But as soon as i put a X-NUCLEO-NFC04A1 board on the st95hf reader i get the > following output: > skbuff: skb_over_panic: text:7f05c48c len:514 put:514 head:9dd26e00 > data:9dd26e01 tail:0x9dd27003 end:0x9dd26f40 dev: ------------[ cut > here ]------------ At least for the out of tree nfcst driver there i was able to fix the error. The bugsplat shows that the needed space for the buffer is 514 byte, so by increasing the buffer size to that, the error went away. --- drivers/nfc/nfcst/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/nfcst/core.c b/drivers/nfc/nfcst/core.c index 1dba0aae5a97..732d7fd61929 100644 --- a/drivers/nfc/nfcst/core.c +++ b/drivers/nfc/nfcst/core.c @@ -63,7 +63,7 @@ #define DEVICE_TAILROOM_LEN 1 /* Command Response interface */ -#define MAX_RESPONSE_BUFFER_SIZE 280 +#define MAX_RESPONSE_BUFFER_SIZE 514 #define ECHORESPONSE 0x55 #define DEVICE_ERR_MASK 0xF #define DEVICE_TIMEOUT_ERROR 0x87