linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Cyrille Pitchen
	<cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Cc: Michael Walle <michael-QKn5cuLxLXY@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mtd-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: fsl-espi, m25p80 and max_transfer_size / max_message_size
Date: Wed, 21 Dec 2016 07:35:56 +0100	[thread overview]
Message-ID: <af987fb9-1229-2694-ad67-85e9f14de4e6@gmail.com> (raw)
In-Reply-To: <158a7129-52ca-79b3-69f9-d6de25483e01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Am 14.11.2016 um 20:06 schrieb Heiner Kallweit:
> Am 14.11.2016 um 15:22 schrieb Michael Walle:
>> Hi,
>>
>> since commit 02a595d5d6e4 (spi: fsl-espi: eliminate spi nor flash read loop) the fsl-espi is (partly?) broken. Reading 64k from the flash results in the following error:
>>   fsl_espi ffe110000.spi: message too long, size is 65540 bytes
>>   spi_master spi32766: failed to transfer one message from queue
>>
>> We are using the m25p80 driver which checks the max_transfer_size. The fsl-espi driver sets the max_message_size to 64k. As far as I understand it, a message can contain multiple transfers. The m25p80 uses two transfers (one 4 byte and one with max_transfer_size, that is 64k) and thus the message has a total length of 65540 bytes which is too long for the driver.
>>
>> I didn't find where the max_message_size is checked and I also don't know which part is resposible to handle the correct sizes. The m25p80 driver? Should it use spi_max_message_size() instead of spi_max_transfer_size() ?
>>
> Your mail actually doesn't come as a surprise. The patch addressing this scenario is waiting to be applied.
> See here: https://www.spinics.net/lists/linux-spi/msg08844.html
> 
> Rgds, Heiner
> 
This issue is still open. Can we get the patch at least into 4.10?

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-12-21  6:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 14:22 fsl-espi, m25p80 and max_transfer_size / max_message_size Michael Walle
     [not found] ` <17913d2dea0200f818af5f42a0b2ed42-QKn5cuLxLXY@public.gmane.org>
2016-11-14 19:06   ` Heiner Kallweit
     [not found]     ` <158a7129-52ca-79b3-69f9-d6de25483e01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-11-15 10:16       ` Michael Walle
2016-12-21  6:35       ` Heiner Kallweit [this message]
2016-12-23 15:09   ` Cyrille Pitchen

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=af987fb9-1229-2694-ad67-85e9f14de4e6@gmail.com \
    --to=hkallweit1-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
    --cc=linux-mtd-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=michael-QKn5cuLxLXY@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).