[lkml]   [2009]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: todays git: WARNING: at drivers/ata/libata-sff.c:1017 ata_sff_hsm_move+0x45e/0x750()
Alan Cox wrote:

> O> Your problem is that the *device* is wanting to transfer a set of bytes

>>not divisible by four. If you want to use word based PIO, you'll have
>>to fall back to collecting bytes for the last two. Alternatively, you

> Nope.. you can't do that with ATA block transfers - it isn't the same as

ATA block transfers are always mutliple of 512 bytes (except read/write
long), so this shouldn't be an issue... unless the code is trying to split a
sector between 2 pages on an arbitrary boundary -- in this case, even if the
both resulting byte counts divide by 2, you may be busted because of prefetch
that (as the Intel docs say), should have the initial (start of sector) and
all subsequent reads of the same size (either 16- or 32-bit). I don't know if
this situation is actually possible with libata -- but beware...

>>could just do byte PIO for all reply lengths like this ... they occur
>>all over the SCSI standard, but not usually in critical paths.

> The problem we have is that the sg list the drivers were given had a
> segment which was not divisible in length by four and was *NOT* the last
> segment in the sg list

> The logic in the ATA PIO code is basically

> for each sg entry

> compute the number of bytes to transfer staying within
> the page
> transfer that many bytes (but may be more)
> if and only if the transfer is NOT the last segment but is
> more than the bytes requested - WARN

The ATAPI logic is more complex since it has to take into account the
arbitrary byte count that a device want to transfer on each INTRQ (read from
the byte count low/high regs).

> Alan

MBR, Sergei

 \ /
  Last update: 2009-01-10 16:35    [W:0.059 / U:7.924 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site