From: David Brownell <david-b@pacbell.net>
To: Marc Pignat <marc.pignat@hevs.ch>
Cc: anemo@mba.ocn.ne.jp, spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org, hskinnemoen@atmel.com
Subject: Re: [PATCH] atmel_spi: support zero length transfer
Date: Fri, 22 Feb 2008 18:55:25 -0800 [thread overview]
Message-ID: <200802221855.25892.david-b@pacbell.net> (raw)
In-Reply-To: <200802221030.32263.marc.pignat@hevs.ch>
> > > David, do you think writing 0 bytes is a valid use of this API?
> >
> > Just a zero byte transfer ... no, though it depends what you mean
> > by "valid". (I'm not sure I'd expect all controller drivers to
> > reject such requests.) That has no effect on bits-on-the-wire,
> > and would make trouble for various DMA engines.
>
> So, the behaviour is undefined, something between 'crash my dma engine',
> 'assert chip select and wait some time', or 'do_nothing'...
No, it's fully defined. "Crash my engine" is not OK. The delay
is controlled by transfer.delay_usecs ... possibly zero, which is
best viewed as a degenerate case.
> Is this kind of device so common that we need to do all that work? or can we
> leave it as is (verified to work only with atmel_spi)?
You can't avoid testing each combination of SPI protocol driver
and SPI master controller driver you rely on ... especially when
protocol tweaking options (cs_change, delay_usecs, bits_per_word,
etc) are used at the per-transfer level. This driver stack isn't
as readily tested as, say, USB.
However, protocol drivers should be able to rely on controller
drivers to reject requests that they don't even try to handle;
that's basic.
- Dave
next prev parent reply other threads:[~2008-02-23 2:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 15:54 [PATCH] atmel_spi: support zero length transfer Atsushi Nemoto
2008-02-20 17:55 ` Marc Pignat
2008-02-21 1:52 ` Atsushi Nemoto
2008-02-21 9:26 ` Marc Pignat
2008-02-21 19:23 ` David Brownell
2008-02-22 9:30 ` Marc Pignat
2008-02-22 14:15 ` Atsushi Nemoto
2008-02-22 14:28 ` [spi-devel-general] " Ned Forrester
2008-02-22 19:06 ` David Brownell
2008-02-22 19:52 ` Ned Forrester
2008-02-22 18:58 ` David Brownell
2008-02-23 2:55 ` David Brownell [this message]
2008-02-25 8:15 ` Marc Pignat
2008-02-22 14:07 ` [spi-devel-general] " Ned Forrester
2008-02-22 19:02 ` David Brownell
2008-02-22 19:36 ` Ned Forrester
2008-02-23 2:37 ` David Brownell
2008-02-25 0:25 ` Atsushi Nemoto
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=200802221855.25892.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=anemo@mba.ocn.ne.jp \
--cc=hskinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.pignat@hevs.ch \
--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