From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101AbdKNMCR (ORCPT ); Tue, 14 Nov 2017 07:02:17 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:57508 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092AbdKNMCK (ORCPT ); Tue, 14 Nov 2017 07:02:10 -0500 Date: Tue, 14 Nov 2017 12:02:07 +0000 From: Mark Brown To: Tim Harvey Cc: Jan Glauber , linux-spi@vger.kernel.org, "linux-kernel@vger.kernel.org" , Wolfgang Grandegger , Marc Kleine-Budde Subject: Re: MCP251x SPI CAN controller on Cavium ThunderX Message-ID: <20171114120207.xbee2cgsai4qka46@sirena.org.uk> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e4xxopltkrz4zvbu" Content-Disposition: inline In-Reply-To: X-Cookie: He who laughs, lasts. User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --e4xxopltkrz4zvbu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 13, 2017 at 01:17:42PM -0800, Tim Harvey wrote: > When a register is read from the mcp251x driver the > octeon_spi_do_transfer() gets a spi_message with a single spi_xfer of > len=3, a tx_buf, and an rx_buf which I believe is supposed to shift > out 3 bytes out MOSI and shift in 3 bytes from MISO where the last > byte shifted in would be the response. No, that will simultaneously transmit and recieve three bytes. If you want to transmit two bytes and then recieve one byte you need two xfers, one with a len of 2 and a tx_buf, the other with a len of 1 and a rx_buf. --e4xxopltkrz4zvbu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAloK2z4ACgkQJNaLcl1U h9CCvgf/QzTbKo9PUto0ftJpgRcHYPszjJFYWDP56teG68kzEVo3giNAsEsRIPif Hmwc0/JkFErxFwok9N7KB4n8+oK4DTofLd8bphNNP0GR3tfYE5O1hnahn0sSzOp9 fcoQflAbt3b+/qt54DTkL7Pzo4srhyrtHOEk6nHoCHChTK7klcV0C2PCBlvHAa8B uurozNzTiFIpsMaUFWFO7UGwsXc9yGDxd71ADFGrAS9Z6tcTZY8qyXp4AXIbYAnD 7z7Zh0lRdvU9kpC1CzHL4goRj4XzAnLW2V6iaVuibt57GvcNvr5oCYqQDxv2J0vt NtpCOpnchYirLbEz6DCBsgiUW6Zh8g== =N4XA -----END PGP SIGNATURE----- --e4xxopltkrz4zvbu--