linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Ben Hutchings <ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	CT kernel
	<linux-kernel-81qHHgoATdFT9dQujB1mzip2UmYkHbXO@public.gmane.org>
Subject: Re: [PATCH 2/2] spi: spi-ti-qspi: Handle truncated frames properly
Date: Wed, 13 Apr 2016 07:55:08 +0100	[thread overview]
Message-ID: <20160413065508.GL14664@sirena.org.uk> (raw)
In-Reply-To: <1460459364.32355.6.camel-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

On Tue, Apr 12, 2016 at 12:09:24PM +0100, Ben Hutchings wrote:
> On Tue, 2016-04-12 at 02:58 +0100, Mark Brown wrote:
> > On Tue, Apr 05, 2016 at 08:48:48PM +0100, Ben Hutchings wrote:

> > > We clamp frame_length to a maximum of 4096, but do not limit the
> > > number of words written or read properly.  This causes 4K reads (which
> > > some m25p80-like flash chips support) to return garbage for the last
> > > few bytes.

> > > Recalculate the length of each transfer, taking the frame length into
> > > account.  Use this length in qspi_{read,write}_msg(), and to increment
> > > spi_message::actual_length.

> > I'm having a hard time understanding what's actually wrong here or how
> > this change is intended to fix it,

> "4K reads...return garbage"  That's wrong, no?

It doesn't say what the driver is doing wrong which causes the garbage.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2016-04-13  6:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 19:45 [PATCH 1/2] spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden Ben Hutchings
     [not found] ` <1459885528.26669.5.camel-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2016-04-05 19:48   ` [PATCH 2/2] spi: spi-ti-qspi: Handle truncated frames properly Ben Hutchings
     [not found]     ` <1459885728.26669.7.camel-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2016-04-12  1:58       ` Mark Brown
     [not found]         ` <20160412015809.GS3351-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-12 11:09           ` Ben Hutchings
     [not found]             ` <1460459364.32355.6.camel-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2016-04-13  6:55               ` Mark Brown [this message]
2016-04-12  1:30   ` [PATCH 1/2] spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden Mark Brown
     [not found]     ` <20160412013014.GR3351-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-12 11:07       ` Ben Hutchings
     [not found]         ` <1460459249.32355.4.camel-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2016-04-13  6:59           ` Mark Brown

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=20160413065508.GL14664@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org \
    --cc=linux-kernel-81qHHgoATdFT9dQujB1mzip2UmYkHbXO@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).