All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Martin Sperl <martin@sperl.org>
Cc: "Michal Suchanek" <hramrach@gmail.com>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Brian Norris" <computersforpeace@gmail.com>,
	"Han Xu" <han.xu@freescale.com>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Javier Martinez Canillas" <javier@osg.samsung.com>,
	"Stephen Warren" <swarren@nvidia.com>,
	"Andrew F. Davis" <afd@ti.com>, "Marek Vasut" <marex@denx.de>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Gabor Juhos" <juhosg@openwrt.org>,
	"Bean Huo 霍斌斌" <beanhuo@micron.com>,
	"Furquan Shaikh" <furquan@google.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-spi@vger.kernel.org
Subject: Re: [PATCH v5 08/10] spi: expose master transfer size limitation.
Date: Mon, 7 Dec 2015 20:18:04 +0000	[thread overview]
Message-ID: <20151207201804.GP5727@sirena.org.uk> (raw)
In-Reply-To: <5FC39638-EEE0-4CFA-B464-0B4743CB6AB6@sperl.org>

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

On Fri, Dec 04, 2015 at 03:30:50PM +0100, Martin Sperl wrote:
> > On 02.12.2015, at 00:12, Mark Brown <broonie@kernel.org> wrote:

> > Can we change this to return SIZE_MAX instead (ie, the maximum value for
> > a size_t)?  That way callers don't need to worry if there is a limit, if
> > they want to handle it they can just unconditionally assume that a limit
> > will be provided.

> As I just came across: spi_master.max_dma_len, so I wonder how this 
> value would differ from the proposed spi_master.max_transfer_size
> on specific HW?

> For all practical purposes I would assume both are identical.

Yeah, we should probably just remove the DMA specific one in time though
it may be useful for some devices with built in DMA engines if they're
oddly limited I'm not sure how practical their DMA would be if it
differed from the overall transfer length.

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

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Martin Sperl <martin-d5rIkyn9cnPYtjvyW6yDsg@public.gmane.org>
Cc: "Michal Suchanek"
	<hramrach-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Heiner Kallweit"
	<hkallweit1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"David Woodhouse" <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	"Brian Norris"
	<computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Han Xu" <han.xu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	"Boris Brezillon"
	<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	"Javier Martinez Canillas"
	<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	"Stephen Warren"
	<swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"Andrew F. Davis" <afd-l0cyMroinI0@public.gmane.org>,
	"Marek Vasut" <marex-ynQEQJNshbs@public.gmane.org>,
	"Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Mika Westerberg"
	<mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"Gabor Juhos" <juhosg-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>,
	"Bean Huo 霍斌斌" <beanhuo-AL4WhLSQfzjQT0dZR+AlfA@public.gmane.org>,
	"Furquan Shaikh"
	<furquan-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v5 08/10] spi: expose master transfer size limitation.
Date: Mon, 7 Dec 2015 20:18:04 +0000	[thread overview]
Message-ID: <20151207201804.GP5727@sirena.org.uk> (raw)
In-Reply-To: <5FC39638-EEE0-4CFA-B464-0B4743CB6AB6-d5rIkyn9cnPYtjvyW6yDsg@public.gmane.org>

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

On Fri, Dec 04, 2015 at 03:30:50PM +0100, Martin Sperl wrote:
> > On 02.12.2015, at 00:12, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:

> > Can we change this to return SIZE_MAX instead (ie, the maximum value for
> > a size_t)?  That way callers don't need to worry if there is a limit, if
> > they want to handle it they can just unconditionally assume that a limit
> > will be provided.

> As I just came across: spi_master.max_dma_len, so I wonder how this 
> value would differ from the proposed spi_master.max_transfer_size
> on specific HW?

> For all practical purposes I would assume both are identical.

Yeah, we should probably just remove the DMA specific one in time though
it may be useful for some devices with built in DMA engines if they're
oddly limited I'm not sure how practical their DMA would be if it
differed from the overall transfer length.

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

  parent reply	other threads:[~2015-12-07 20:19 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 16:51 [PATCH v5 00/10] add error checking to spi-nor read and write Michal Suchanek
2015-12-01 16:51 ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 01/10] mtd: spi-nor: change return value of read/write Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 03/10] mtd: fsl-quadspi: return amount of data read/written or error Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 04/10] mtd: spi-nor: check return value from read/write Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 02/10] mtd: m25p80: return amount of data transferred or error in read/write Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 06/10] mtd: spi-nor: simplify write loop Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 07/10] mtd: spi-nor: add read loop Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 05/10] mtd: spi-nor: stop passing around retlen Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 08/10] spi: expose master transfer size limitation Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 19:58   ` Mark Brown
2015-12-01 19:58     ` Mark Brown
2015-12-01 21:07     ` Heiner Kallweit
2015-12-01 21:07       ` Heiner Kallweit
2015-12-01 21:31       ` Mark Brown
2015-12-01 21:31         ` Mark Brown
2015-12-02  9:55     ` Michal Suchanek
2015-12-02  9:55       ` Michal Suchanek
2015-12-01 23:12   ` Mark Brown
2015-12-02  9:38     ` Michal Suchanek
2015-12-02  9:38       ` Michal Suchanek
2015-12-04 14:30     ` Martin Sperl
2015-12-04 14:30       ` Martin Sperl
2015-12-04 16:45       ` Michal Suchanek
2015-12-04 16:45         ` Michal Suchanek
2015-12-07 20:18       ` Mark Brown [this message]
2015-12-07 20:18         ` Mark Brown
2015-12-01 16:51 ` [PATCH v5 10/10] spi: m25p80: read in spi_max_transfer_size chunks Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek
2015-12-01 16:51 ` [PATCH v5 09/10] spi: fsl-espi: expose maximum transfer size limit Michal Suchanek
2015-12-01 16:51   ` Michal Suchanek

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=20151207201804.GP5727@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=afd@ti.com \
    --cc=beanhuo@micron.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=furquan@google.com \
    --cc=han.xu@freescale.com \
    --cc=hkallweit1@gmail.com \
    --cc=hramrach@gmail.com \
    --cc=javier@osg.samsung.com \
    --cc=juhosg@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=martin@sperl.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=swarren@nvidia.com \
    --cc=zajec5@gmail.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 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.