lkml.org 
[lkml]   [2009]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: todays git: WARNING: at drivers/ata/libata-sff.c:1017 ata_sff_hsm_move+0x45e/0x750()
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
SCSI

> 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 block alignment is set to 4 bytes so the block code should be handing
down stuff which is safe. Some of the sense and other stuff is "adjusted"
by the libata-scsi conversion code which at this point I suspect is the
offender.

This is why libata uses the pad buffers we don't get to be quite so exact
about transfer sizes as SCSI is.

Alan


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