From: Vitaly Wool <vitalywool@gmail.com>
To: David Brownell <david-b@pacbell.net>
Cc: Kumar Gala <galak@kernel.crashing.org>, Greg KH <greg@kroah.com>,
linux-kernel@vger.kernel.org,
spi-devel-general@lists.sourceforge.net
Subject: Re: [spi-devel-general] Re: [PATCH] spi: Added spi master driver for Freescale MPC83xx SPI controller
Date: Fri, 07 Apr 2006 13:16:14 +0400 [thread overview]
Message-ID: <44362DDE.3010203@gmail.com> (raw)
In-Reply-To: <200604062222.05661.david-b@pacbell.net>
Hi,
> I guess I'm surprised you're not using txrx_buffers() and having
> that whole thing be IRQ driven, so the per-word cost eliminates
> the task scheduling. You already paid for IRQ handling ... why
> not have it store the rx byte into the buffer, and write the tx
> byte froom the other buffer? That'd be cheaper than what you're
> doing now ... in both time and code. Only wake up a task at
> the end of a given spi_transfer().
>
I might be completely wrong here, but I was asking myself this very
question, and it looks like that's the way to implement full duplex
transfers.
For txrx_buffers to be properly implemented, you need to take a lot of
things into account. The main idea is not to lose the data in the
receive buffer due to overflow, and thus you need to set up 'Rx buffer
not free' int or whatever similar which will actually trigger after the
first word is sent. So therefore implementing txrx_buffers within these
conditions doesn't make much sense IMHO, unless you meant having a
separate thread to read from the Rx buffer, which is woken up on, say,
half-full Rx buffer.
Vitaly
next prev parent reply other threads:[~2006-04-07 9:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-06 18:30 [PATCH] spi: Added spi master driver for Freescale MPC83xx SPI controller Kumar Gala
2006-04-07 5:22 ` David Brownell
2006-04-07 9:16 ` Vitaly Wool [this message]
2006-04-07 16:09 ` [spi-devel-general] " David Brownell
2006-04-07 17:04 ` Kumar Gala
2006-04-08 1:25 ` David Brownell
2006-04-07 14:04 ` Kumar Gala
2006-04-07 15:54 ` David Brownell
2006-04-07 16:44 ` Kumar Gala
2006-04-10 17:38 ` [PATCH][UPDATE] " Kumar Gala
2006-04-10 19:01 ` David Brownell
2006-04-10 19:05 ` Kumar Gala
2006-04-10 19:17 ` [PATCH][2.16.17-rc1-mm2] " Kumar Gala
2006-04-10 20:03 ` [spi-devel-general] " Vitaly Wool
2006-04-10 20:22 ` Kumar Gala
2006-04-10 21:06 ` David Brownell
2006-04-10 21:10 ` Kumar Gala
2006-04-11 14:39 ` [PATCH][2.16.17-rc1-mm2][UPDATE] " Kumar Gala
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=44362DDE.3010203@gmail.com \
--to=vitalywool@gmail.com \
--cc=david-b@pacbell.net \
--cc=galak@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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