[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4968BECE.8070304@ru.mvista.com>
Date: Sat, 10 Jan 2009 18:29:18 +0300
From: Sergei Shtylyov <sshtylyov@...mvista.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
linux-ide@...r.kernel.org, Jeff Garzik <jgarzik@...hat.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: 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
> SCSI
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists