linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tim Sander <tim@krieglstein.org>
To: linux-wireless <linux-wireless@vger.kernel.org>, shikha.singh@st.com
Cc: Samuel Ortiz <sameo@linux.intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Johannes Berg <johannes.berg@intel.com>
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	[thread overview]
Message-ID: <3546776.J2PkCpDXvZ@dabox> (raw)
In-Reply-To: <6803968.AFljYLBCnO@dabox>

Hi 

Am Montag, 22. Januar 2018, 17:51:51 CET schrieb Tim Sander:
<snip>
> 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:<NULL> ------------[ 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
-- 
2.7.4

Best regards
Tim

      reply	other threads:[~2018-01-23 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 16:51 [linux-nfc] st95hf driver not working with neard 0.16 Tim Sander
2018-01-23 15:20 ` Tim Sander [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3546776.J2PkCpDXvZ@dabox \
    --to=tim@krieglstein.org \
    --cc=davem@davemloft.net \
    --cc=johannes.berg@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=shikha.singh@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).