lkml.org 
[lkml]   [2009]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] libata-sff: fix 32-bit PIO regression
Hello

Mikael Pettersson wrote:
> Sergei Shtylyov writes:
> > Hello.
> >
> > Hugh Dickins wrote:
> >
> > >> Commit 871af1210f13966ab911ed2166e4ab2ce775b99d (libata: Add 32bit PIO support)
> > >> caused all kind of errors on the ATAPI devices, so it's been empirically proven
> > >> that one shouldn't read/write an extra data word when a device isn't expecting
> > >> it already. "Don't do it then"; however still taking a chance to use 32-bit I/O
> > >> one last time when there are exactly 3 trailing bytes. Oh, and stop pointless
> > >> swapping bytes to and fro as well by using io*_rep() which shouldn't byte-swap.
> > >>
> > >> This should fix the kernel.org bug #12609.
> > >>
> > >> ---
> > >> This is hopefully better replacement for Hugh Dickins most recent patch
> > >> (http://marc.info/?l=linux-ide&m=123352294619281)...
> > >>
> > >
> > > Yes, looks nice, and works for me. My only criticism would be,
> > > minor issue unchanged by your patch, that actually "slop" isn't
> > > unlikely enough to deserve an "unlikely" - slop of 1 or 3 is
> > > unlikely, but slop of 2 is quite common.
> > >
> >
> > I guess that's the case only for the ATAPI devices, so I'm going to
> > keep it.
>
> I really don't think it's a good idea to play micro-optimisation
> unlikely() tricks when the likelihood depends on what kind of device
> the driver is talking to. In this case unlikely() is clearly wrong.
>

Clearly?! :-O
Do you really think that the transfers having lengths non-divisible
by 4 make any *significant* percentage even on the ATAPI devices? I
think it's you who is really wrong.

MBR, Sergei




\
 
 \ /
  Last update: 2009-02-09 01:05    [from the cache]
©2003-2011 Jasper Spaans