linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* data_xfer too fast? - SATA PIO
@ 2005-02-28 23:39 Mat Loikkanen
  2005-03-01  3:06 ` Mark Lord
  2005-03-02  1:44 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Mat Loikkanen @ 2005-02-28 23:39 UTC (permalink / raw)
  To: 'Jeff Garzik'; +Cc: linux-ide

We've run into the issue of ata_mmio_data_xfer() reading our host
controller's data fifo too fast -- requesting a data word when the fifo was
empty, before the device had sent PIO data (in our observed case somewhere
in the middle of a 512 byte IDENTIFY DEVICE PIO data transfer).  I can't see
any provision in Libata for a case like ours where the processor and bus are
"too fast".  Has anyone run into this issue before?  Any ideas on what we
should do about it?  We can make our host controller to wait-state the bus
... but for how long, what if data never arrives ...  Thanks for any help.

-mat
 
Mat Loikkanen
Synopsys, Inc.


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

* Re: data_xfer too fast? - SATA PIO
  2005-02-28 23:39 data_xfer too fast? - SATA PIO Mat Loikkanen
@ 2005-03-01  3:06 ` Mark Lord
  2005-03-01 17:49   ` Mat Loikkanen
  2005-03-02  1:44 ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Lord @ 2005-03-01  3:06 UTC (permalink / raw)
  To: Mat.Loikkanen; +Cc: 'Jeff Garzik', linux-ide

Err.. PIO data transfer within a sector (or multiple sector block)
is supposed to be synchronous in hardware.  This means the chip/board
should be using IORDY to stretch the cycle until data can be supplied
within each 256-word interrupt group.

Right?

Mat Loikkanen wrote:
> We've run into the issue of ata_mmio_data_xfer() reading our host
> controller's data fifo too fast -- requesting a data word when the fifo was
> empty, before the device had sent PIO data (in our observed case somewhere
> in the middle of a 512 byte IDENTIFY DEVICE PIO data transfer).  I can't see
> any provision in Libata for a case like ours where the processor and bus are
> "too fast".  Has anyone run into this issue before?  Any ideas on what we
> should do about it?  We can make our host controller to wait-state the bus
> ... but for how long, what if data never arrives ...  Thanks for any help.
> 
> -mat
>  
> Mat Loikkanen
> Synopsys, Inc.

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

* RE: data_xfer too fast? - SATA PIO
  2005-03-01  3:06 ` Mark Lord
@ 2005-03-01 17:49   ` Mat Loikkanen
  0 siblings, 0 replies; 4+ messages in thread
From: Mat Loikkanen @ 2005-03-01 17:49 UTC (permalink / raw)
  To: 'Mark Lord'; +Cc: linux-ide

Thanks, Mark.  I think the hardware designer plans to do this -- add wait
states on the bus (we sell soft IP, so our controller is on an FPGA on our
test platform).  I wasn't sure if there were any PCI/ISA-isms that were at
play here.  We are ARM AMBA/AHB bus based, targeting embedded applications.

-----Original Message-----
From: Mark Lord

Err.. PIO data transfer within a sector (or multiple sector block)
is supposed to be synchronous in hardware.  This means the chip/board
should be using IORDY to stretch the cycle until data can be supplied
within each 256-word interrupt group.

Right?

Mat Loikkanen wrote:
> We've run into the issue of ata_mmio_data_xfer() reading our host
> controller's data fifo too fast -- requesting a data word when the fifo
was
> empty, before the device had sent PIO data (in our observed case somewhere
> in the middle of a 512 byte IDENTIFY DEVICE PIO data transfer).  I can't
see
> any provision in Libata for a case like ours where the processor and bus
are
> "too fast".  Has anyone run into this issue before?  Any ideas on what we
> should do about it?  We can make our host controller to wait-state the bus
> ... but for how long, what if data never arrives ...  Thanks for any help.
> 
> -mat
>  
> Mat Loikkanen
> Synopsys, Inc.


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

* Re: data_xfer too fast? - SATA PIO
  2005-02-28 23:39 data_xfer too fast? - SATA PIO Mat Loikkanen
  2005-03-01  3:06 ` Mark Lord
@ 2005-03-02  1:44 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2005-03-02  1:44 UTC (permalink / raw)
  To: Mat.Loikkanen; +Cc: 'Jeff Garzik', list linux-ide

On Mon, 2005-02-28 at 15:39 -0800, Mat Loikkanen wrote:
> We've run into the issue of ata_mmio_data_xfer() reading our host
> controller's data fifo too fast -- requesting a data word when the fifo was
> empty, before the device had sent PIO data (in our observed case somewhere
> in the middle of a 512 byte IDENTIFY DEVICE PIO data transfer).  I can't see
> any provision in Libata for a case like ours where the processor and bus are
> "too fast".  Has anyone run into this issue before?  Any ideas on what we
> should do about it?  We can make our host controller to wait-state the bus
> ... but for how long, what if data never arrives ...  Thanks for any help.
> 

You should waitstate the bus, with eventually some sanity limit built
into the HW.

Ben.



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

end of thread, other threads:[~2005-03-02  1:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 23:39 data_xfer too fast? - SATA PIO Mat Loikkanen
2005-03-01  3:06 ` Mark Lord
2005-03-01 17:49   ` Mat Loikkanen
2005-03-02  1:44 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).