Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbbDZMz4 (ORCPT ); Sun, 26 Apr 2015 08:55:56 -0400 Received: from down.free-electrons.com ([37.187.137.238]:33797 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751308AbbDZMzG (ORCPT ); Sun, 26 Apr 2015 08:55:06 -0400 Date: Sun, 26 Apr 2015 14:54:21 +0200 From: Maxime Ripard To: Michal Suchanek Cc: linux-sunxi , Mark Brown , linux-spi , "linux-arm-kernel@lists.infradead.org" , Linux Kernel Mailing List Subject: Re: [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long. Message-ID: <20150426125421.GH5627@lukather> References: <4c27d44b2bdd759424ce4a4b2e8f6abf5d5a6735.1430034797.git.hramrach@gmail.com> <20150426084221.GE5627@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNpeiK4tTqhYOExY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3425 Lines: 100 --PNpeiK4tTqhYOExY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 26, 2015 at 01:42:51PM +0200, Michal Suchanek wrote: > On 26 April 2015 at 10:42, Maxime Ripard > wrote: > > On Sat, Apr 25, 2015 at 09:21:07PM +0200, Michal Suchanek wrote: > >> Signed-off-by: Michal Suchanek > > > > No commit log? > > > >> --- > >> drivers/spi/spi-sun4i.c | 2 +- > >> drivers/spi/spi-sun6i.c | 2 +- > >> 2 files changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c > >> index fbb0a4d..8238b4e 100644 > >> --- a/drivers/spi/spi-sun4i.c > >> +++ b/drivers/spi/spi-sun4i.c > >> @@ -176,7 +176,7 @@ static int sun4i_spi_transfer_one(struct spi_maste= r *master, > >> > >> /* We don't support transfer larger than the FIFO */ > >> if (tfr->len > SUN4I_FIFO_DEPTH) > >> - return -EINVAL; > >> + return -EMSGSIZE; > > > > Is it still a thing? The patch to remove such limit hasn't been merged > > yet? >=20 > Yes, seems so unless the patches are queued somewhere but not merged yet. >=20 > > > >> reinit_completion(&sspi->done); > >> sspi->tx_buf =3D tfr->tx_buf; > >> diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c > >> index ac48f59..0f5dd91 100644 > >> --- a/drivers/spi/spi-sun6i.c > >> +++ b/drivers/spi/spi-sun6i.c > >> @@ -166,7 +166,7 @@ static int sun6i_spi_transfer_one(struct spi_maste= r *master, > >> > >> /* We don't support transfer larger than the FIFO */ > >> if (tfr->len > SUN6I_FIFO_DEPTH) > >> - return -EINVAL; > >> + return -EMSGSIZE; > > > > Eventually, we should move to using DMA for these messages longer than > > the FIFO. > > > > I should post these patches. > > >=20 > Do you have those in a branch somewhere? Not in a good shape, or at least, in a shape that have any chance to be merged. At the time I tried, I couldn't make the generic DMA work, so I had to bypass that for my tests. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --PNpeiK4tTqhYOExY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVPN/9AAoJEBx+YmzsjxAgVV0P/3llBgJURJd3QnJ3gDT9KGca NNPxnP1GVLDrNi2th6Q6wVEC/fNZilPnZ8dKl1uPgZ5CIPIEiONofygsDwjKg1tN kE7XnGIWQwBp9dX8kzHam9XBMjUD+ea55VPD2g1C78FDtDcm2YaCF25rkpvg8wSJ hjlbBziHDoWWyrXCuf8npghYT+HY91591CWNnp5szi8SiQLIyV3vj3VLSEbf9pQw qY2WfvmoHYY+DU2KZqtaUOKrDxbh7HEBwxMqhe54uvksFbzc6qaP3S3m7tcgydXq Dl0VuyO6c0uNc754vBf2Q/Z4FmuFNq/yEmiUhmlIlv/4yY8rxnk5WaSJk5xZ4LXb T68GBCN2YlEggsmSLf6NQZ4sXsBiPRLNOiXi/SGt5kPZLBZ0x/NFJut+snZiZRDR eV4eXX+BhexmbwWrVeRjD6VZaUCIfy2MgZmclb27UUew98t196Jf6j3WF/XHnmFE V7ExP8CF7tkGgJEooWVIIbldwkdRosUHW2rFpY8sjV8DVs3UwToFFhnsyWPURun/ wvRUjnTlGo3c+yv2Ns0dEz22SbWxpl5t/UUzCzUuUzo4mhdedB+7b20OdwZ6hCt0 4D+LAjEN+YgIkaXbml/REd8yOdIZ6NAbBH9JVKWp6gYSYHA8kzJPMmHRNjALVfKQ SczUZyOXuIhb3gwe6LJk =0Nc9 -----END PGP SIGNATURE----- --PNpeiK4tTqhYOExY-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/