From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Tim Harvey <tharvey@gateworks.com>
Cc: "open list" <linux-kernel@vger.kernel.org>,
linux-can@vger.kernel.org,
"Wolfgang Grandegger" <wg@grandegger.com>,
"Timo Schlüßler" <schluessler@krause.de>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] can: mcp251x: convert to half-duplex SPI
Date: Wed, 26 Feb 2020 11:19:26 +0100 [thread overview]
Message-ID: <7b85e098-b9a9-dd14-203f-100cdf2e703e@pengutronix.de> (raw)
In-Reply-To: <0b351fe3-8fe9-572f-fd85-e2aed22873e3@pengutronix.de>
On 2/26/20 8:37 AM, Marc Kleine-Budde wrote:
>> Your right... there is the mcp251x_hw_rx_frame() call that also uses
>> spi_rx_buf after a synchronous transfer (I didn't see any others).
>> I'll look at this again.
>
> Have you hardware to test your changes? I think the SPI framework would
> return an -EINVAL in that case....though the return value is sometimes
> not checked by the driver :/
See https://elixir.bootlin.com/linux/v5.5.6/source/drivers/spi/spi.c#L3413
If you have really have HW with SPI_CONTROLLER_HALF_DUPLEX (a.k.a
SPI_MASTER_HALF_DUPLEX) restrictions, you need to convert _every_
mcp251x_spi_trans() call in the driver, as _always_ both rx_buf _and_
tx_buf are used.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2020-02-26 10:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 18:35 Tim Harvey
2020-02-25 21:43 ` Marc Kleine-Budde
2020-02-25 22:25 ` Tim Harvey
2020-02-26 7:37 ` Marc Kleine-Budde
2020-02-26 10:19 ` Marc Kleine-Budde [this message]
2020-05-21 20:19 ` Tim Harvey
2020-05-21 21:08 ` Mark Brown
2020-05-25 11:17 ` Marc Kleine-Budde
2020-05-25 11:31 ` Mark Brown
2020-05-25 12:41 ` Marc Kleine-Budde
2020-05-25 12:57 ` Mark Brown
2020-05-25 13:12 ` Marc Kleine-Budde
2020-05-25 13:27 ` Mark Brown
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=7b85e098-b9a9-dd14-203f-100cdf2e703e@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schluessler@krause.de \
--cc=tharvey@gateworks.com \
--cc=wg@grandegger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®