All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rafal Prylowski <prylowski@metasoft.pl>
To: Florian Zumbiehl <florz@florz.de>
Cc: linux-ide@vger.kernel.org
Subject: Re: DMA timeouts with JM20330 based SATA<->IDE bridge
Date: Thu, 04 Mar 2010 14:36:36 +0100	[thread overview]
Message-ID: <4B8FB764.5000108@metasoft.pl> (raw)
In-Reply-To: <20100304014558.GA8837@florz.florz.dyndns.org>

Hi,

I have similar problem with JM20330, but in my case it's connected
to arm board ide port (Cirrus Logic ep9315 SoC).
I'm using pata driver written long time ago by Alessandro Zumo
and Lennert Buytenhek, to which I added dma functionality (the driver
is not in mainline).

> At the other end, it's connected to a Seagate ST31500341AS
> SATA harddisk (well, that's kinda redundant ... ;-).
In my case, it's Seagate ST9120822AS.

> 
> Now, reading from the disk seems to work perfectly, but writing
> (dding /dev/zero to the block device) causes DMA timeouts every
> few hundred megabytes - in between the timeouts, though,
> throughput seems to be ok (~ 20 MB/s).
I can observe dma timeouts only when reading from disk, never when
writing.

> In the kernel log, the errors look something like this, with
> small variations (at least to my eyes ;-):
> 
> | ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
> | ata2.00: failed command: WRITE DMA EXT
> | ata2.00: cmd 35/00:00:67:19:4f/00:04:00:00:00/e0 tag 0 dma 524288 out
> |          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
> | ata2.00: status: { DRDY }
> | ata2: link is slow to respond, please be patient (ready=0)
> | ata2: device not ready (errno=-16), forcing hardreset
> | ata2: soft resetting link
> | ata2.00: configured for UDMA/66
> | ata2.00: device reported invalid CHS sector 0
> | ata2: EH complete
> 
> That's all happening with a vanilla 2.6.33 (plus tuxonice, in case that
> could have any effect on this). The legacy IDE drivers behave similarly.
> 

My kernel log:

ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: failed command: READ DMA
ata1.00: cmd c8/00:08:70:39:a3/00:00:00:00:00/e3 tag 0 dma 4096 in
         res 40/00:80:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: failed command: READ DMA EXT
ata1.00: cmd 25/00:00:d0:2e:27/00:02:04:00:00/e0 tag 0 dma 262144 in
         res 40/00:80:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: failed command: READ DMA EXT
ata1.00: cmd 25/00:00:d0:28:9b/00:02:04:00:00/e0 tag 0 dma 262144 in
         res 40/00:80:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }

Kernel version doesn't have any impact (it was first observed about
two years ago, and with 2.6.32.8 behaviour is the same, during this
time I've never had any problems with ide drives connected directly).
I also tested jm20330 connected to old Celeron box (with VIA VT82C596B) and
it works reliably.

I think that the problem is with ep93xx ide controller (maybe working
too close to ide specs or so..), or maybe between drive and jm20330
(however I don't have any non-Seagate sata drive to test it).
Reading is probably much faster in my configuration (the green led
on converter board is constantly turned on during read, then suddenly
turns off and timeout occurs, during write I can only observe fast blinking,
maybe this is normal).

If there is any interest, I can post ep93xx pata driver to the list,
but it depends on ep93xx-dma-m2m patch, which is not in mainline too.

Rafał



  reply	other threads:[~2010-03-04 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  1:45 DMA timeouts with JM20330 based SATA<->IDE bridge Florian Zumbiehl
2010-03-04 13:36 ` Rafal Prylowski [this message]
2010-03-04 21:42 ` Florian Zumbiehl
2010-03-04 23:02   ` Florian Zumbiehl
2013-06-28 12:16     ` Fontana Cristian
2013-07-21 14:53 ` Fontana Cristian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B8FB764.5000108@metasoft.pl \
    --to=prylowski@metasoft.pl \
    --cc=florz@florz.de \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.