Re: [patch 3/4] sdio: extend sdio_readsb() and friends to handle any length of buffer

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Vrabel <david.vrabel@...>
Cc: <linux-kernel@...>, David Vrabel <david.vrabel@...>
Date: Wednesday, August 8, 2007 - 12:55 pm

On Wed, 08 Aug 2007 14:22:20 +0100
David Vrabel <david.vrabel@csr.com> wrote:


3 and 4 are subjective, and for 2, the performance penalty has to come
some place. The upside, as explained, is that drivers aren't penalized
for setting the block size and then failing to use it. Something that
gives us the flexibility to write cleaner code.

As for benefits, there are other issues. We might want to deal with
things like alignment problems in the future.


Agreed, we're doing a bit more guessing than one would like. But I
don't agree in keeping the core simple and flexible. Rather the
opposite. Any guarantee that we give drivers now and need to remove in
the future needs to be tested with all drivers that rely on it (a
difficult task as it often takes some effort to find people with
hardware and the ability to test patches).

As such, the guarantees should be kept at a minimum. Code is easily
changed, API is not.

IMO, the best way to achieve this is with an API that describes _what_
the drivers want to do, not _how_. Hence my insistence on allowing
drivers to specify the difference between "I want this data
transferred" and "I want this data transferred with an exact block size
of 32 bytes".


These looks good. The only part I'm really attached to is the blksz ==
0 case, which you have.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sdio: enhance IO_RW_EXTENDED support, David Vrabel, (Tue Jul 31, 11:36 am)
Re: sdio: enhance IO_RW_EXTENDED support, Pierre Ossman, (Sat Aug 4, 9:23 am)
Re: sdio: enhance IO_RW_EXTENDED support, David Vrabel, (Mon Aug 6, 6:31 am)
Re: sdio: enhance IO_RW_EXTENDED support, Pierre Ossman, (Mon Aug 6, 11:12 am)
Re: sdio: enhance IO_RW_EXTENDED support, David Vrabel, (Mon Aug 6, 11:32 am)
Re: sdio: enhance IO_RW_EXTENDED support, Pierre Ossman, (Mon Aug 6, 4:01 pm)
Re: sdio: enhance IO_RW_EXTENDED support, David Vrabel, (Tue Aug 7, 8:51 am)
Re: sdio: enhance IO_RW_EXTENDED support, Pierre Ossman, (Tue Aug 7, 9:33 am)
[patch 4/4] sdio: disable CD resistor, David Vrabel, (Tue Aug 7, 8:55 am)
Re: [patch 4/4] sdio: disable CD resistor, Pierre Ossman, (Tue Aug 7, 9:43 am)
Re: [patch 4/4] sdio: disable CD resistor, David Vrabel, (Tue Aug 7, 10:46 am)
Re: [patch 4/4] sdio: disable CD resistor, Pierre Ossman, (Tue Aug 7, 11:08 am)
Re: [patch 3/4] sdio: extend sdio_readsb() and friends to ha..., Pierre Ossman, (Wed Aug 8, 12:55 pm)
[patch 2/3] sdio: set the functions' block size, David Vrabel, (Wed Aug 8, 9:23 am)
[patch 1/3] sdio: add SDIO_FBR_BASE(f) macro, David Vrabel, (Wed Aug 8, 9:23 am)
[patch 2/4] sdio: set the functions' block size, David Vrabel, (Tue Aug 7, 8:54 am)
Re: [patch 2/4] sdio: set the functions' block size, Pierre Ossman, (Tue Aug 7, 9:38 am)
Re: [patch 2/4] sdio: set the functions' block size, David Vrabel, (Tue Aug 7, 1:20 pm)
Re: [patch 2/4] sdio: set the functions' block size, Pierre Ossman, (Tue Aug 7, 1:54 pm)
Re: [patch 2/4] sdio: set the functions' block size, David Vrabel, (Wed Aug 8, 5:46 am)
Re: [patch 2/4] sdio: set the functions' block size, Pierre Ossman, (Wed Aug 8, 6:06 am)
Re: [patch 2/4] sdio: set the functions' block size, David Vrabel, (Wed Aug 8, 6:19 am)
Re: sdio: enhance IO_RW_EXTENDED support, Pierre Ossman, (Mon Aug 6, 2:06 pm)
sdio: set the functions' block size, David Vrabel, (Tue Jul 31, 11:36 am)
Re: sdio: set the functions' block size, Pierre Ossman, (Sat Aug 4, 9:30 am)
Re: sdio: set the functions' block size, David Vrabel, (Mon Aug 6, 6:04 am)
sdio: parameterize SDIO FBR register defines, David Vrabel, (Tue Jul 31, 11:36 am)
Re: sdio: parameterize SDIO FBR register defines, Pierre Ossman, (Sat Aug 4, 9:26 am)
Re: sdio: parameterize SDIO FBR register defines, David Vrabel, (Mon Aug 6, 6:14 am)
Re: sdio: parameterize SDIO FBR register defines, Pierre Ossman, (Mon Aug 6, 10:58 am)