From: Brian Norris <computersforpeace@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Cyrille Pitchen <cyrille.pitchen@atmel.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Boris BREZILLON <boris.brezillon@free-electrons.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
David Woodhouse <dwmw2@infradead.org>,
MTD Maling List <linux-mtd@lists.infradead.org>,
Richard Weinberger <richard@nod.at>
Subject: Re: [GIT PULL] mtd: spi-nor: Changes for 4.11
Date: Wed, 8 Feb 2017 12:39:22 -0800 [thread overview]
Message-ID: <20170208203922.GA105912@google.com> (raw)
In-Reply-To: <20170208192236.muenymk6s36hrn42@sirena.org.uk>
On Wed, Feb 08, 2017 at 07:22:36PM +0000, Mark Brown wrote:
> On Wed, Feb 08, 2017 at 11:09:39AM -0800, Brian Norris wrote:
>
> > But one question: *why* exactly is the transfer or message limit so
> > fixed? If a SPI controller allows manual control over the CS line, then
> > why would anybody care if a sequence of data gets split up into multiple
> > HW sequences (e.g., for a long spi_transfer, why can't we split it into
> > 2 sub-transfers, while keeping the CS asserted?).
>
> Not every device will provide software control of the chip select line
> so it's possible you might hit limits there. If a device does allow
> software control then yes, we should be handling this transparently in
> the core and splitting up longer transfers into chunks the device can
> handle
Thanks for the info. Then it sounds like that really should be the
dividing line; driver-visible limitations ideally should only happen
when CS is not software-controllable. (As Heiner points out, it seems
FSL ESPI is one such case.) All other cases can be handled by some form
of splitting, in the SPI core.
So that actually sounds like drivers like m25p80 should never have to
account for spi_max_transfer_size(), but instead should have to account
for only spi_max_message_size().
But that's all only a "should" -- nobody has done the work to do this
properly, and so right now, we need to check for both.
> and in fact this is already done in spi_split_transfers_maxsize().
>
> We're missing masking that out in spi_max_transfer_size() though so
> clients won't know if we can handle things, it's overly conservative.
Huh, I've never noticed spi_split_transfers_maxsize(). That looks like
work for it got dropped on the floor somewhere though; nobody is using
it yet, and it's over a year since its introduction.
Brian
next prev parent reply other threads:[~2017-02-08 20:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 15:31 [GIT PULL] mtd: spi-nor: Changes for 4.11 Cyrille Pitchen
2017-02-08 1:09 ` Marek Vasut
2017-02-08 5:52 ` Heiner Kallweit
2017-02-08 10:36 ` Cyrille Pitchen
2017-02-08 19:09 ` Brian Norris
2017-02-08 19:22 ` Mark Brown
2017-02-08 20:39 ` Brian Norris [this message]
2017-02-09 1:33 ` Mark Brown
2017-02-08 19:40 ` Michal Suchanek
2017-02-08 20:03 ` Heiner Kallweit
2017-02-08 20:05 ` Mark Brown
2017-02-08 19:53 ` Heiner Kallweit
2017-02-10 2:46 ` Brian Norris
2017-02-10 6:39 ` Heiner Kallweit
2017-02-10 13:07 ` Marek Vasut
2017-02-10 17:56 ` Heiner Kallweit
2017-02-15 22:24 ` Marek Vasut
2017-02-10 13:00 ` 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=20170208203922.GA105912@google.com \
--to=computersforpeace@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=broonie@kernel.org \
--cc=cyrille.pitchen@atmel.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=hkallweit1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.