public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sata_svw data corruption, strange problems
@ 2008-06-17  9:36 Pavel Machek
  2008-06-23  0:37 ` Tejun Heo
  0 siblings, 1 reply; 15+ messages in thread
From: Pavel Machek @ 2008-06-17  9:36 UTC (permalink / raw)
  To: kernel list, benh, jgarzik


I see strange problems on machine with sata_svw. The machine seems to
corrupt data every few days (ext3 error, dir index corrupted), and has
some other very strange problems (keyboard misbehaves, pulling out
SATA disk cures it, see
https://bugzilla.novell.com/show_bug.cgi?id=400772 ).

Then I got to the comment 

        writeb(dmactl | ATA_DMA_START, mmio + ATA_DMA_CMD);
        /* There is a race condition in certain SATA controllers that
can
           be seen when the r/w command is given to the controller
before the
           host DMA is started. On a Read command, the controller
would initiate
           the command to the drive even before it sees the DMA
start. When there
           are very fast drives connected to the controller, or when
the data request
           hits in the drive cache, there is the possibility that the
drive returns a part
           or all of the requested data to the controller before the
DMA start is issued.
           In this case, the controller would become confused as to
what to do with the data.
           In the worst case when all the data is returned back to the
controller, the
           controller could hang. In other cases it could return
partial data returning
           in data corruption. This problem has been seen in PPC
systems and can also appear
           on an system with very fast disks, where the SATA
controller is sitting behind a
           number of bridges, and hence there is significant latency
between the r/w command
           and the start command. */
        /* issue r/w command if the access is to ATA*/
        if (qc->tf.protocol == ATA_PROT_DMA)

...and that would certainly explain what we are seeing. Are
serverworks controllers broken by design?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-06-27  6:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17  9:36 sata_svw data corruption, strange problems Pavel Machek
2008-06-23  0:37 ` Tejun Heo
2008-06-23  8:20   ` Pavel Machek
2008-06-23  8:22     ` Tejun Heo
2008-06-23  8:39     ` Andreas Schwab
2008-06-23  8:53       ` Pavel Machek
2008-06-23  8:56         ` Tejun Heo
2008-06-23  9:01           ` Pavel Machek
2008-06-23  9:04             ` Benjamin Herrenschmidt
2008-06-23  9:26               ` Pavel Machek
2008-06-23  9:48               ` Tejun Heo
2008-06-23  9:42                 ` Alan Cox
2008-06-23 10:23                   ` Benjamin Herrenschmidt
2008-06-23 13:05                   ` Tejun Heo
2008-06-27  6:41             ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox