All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata DMADIR support
Date: 17 May 2004 12:48:41 -0600	[thread overview]
Message-ID: <1084819720.4328.86.camel@patibmrh9> (raw)
In-Reply-To: <40A7F641.3070809@pobox.com>

I remember I promised cross-references into the t13.org theories.  Over
time I hope to walk back thru ATA/PI 7, 6, 5, and 4.  Here first is most
of a DMADIR grep in ATA/PI 7, quoted below.

I think I see that text:

(a) requires a DMADIR device to tell legacy hosts that the device talks
PIO only

(b) requires a DMADIR device to tell new hosts that the device does not
talk SWDMA/ MWDMA

(c) claims a DMADIR device should reward a host confused over direction
with nothing more violent than SK 5 "ILLEGAL REQUEST", and

(d) lets a not-DMADIR device choose to rudely fail classic UDMA Data In
commands, when a host chooses to help by setting the Features & x04
DMADIR bit.

Pat LaVarre

----- d1532v1r4b ATA-ATAPI-7.pdf
...

21 April 2004 
...

[page 169 of 390]

6.18 IDENTIFY PACKET DEVICE [xA1]

...

6.18.18  Word 49: Capabilities

...

Bit 15 of word 49 is used to indicate that the device supports
interleaved DMA data transfer for overlapped  DMA commands. Devices
which require the DMADIR bit in the Packet command shall clear this bit
to 0.

...

Bit 8 of word 49 indicates that DMA is supported. Devices which require
the DMADIR bit in the Packet  command shall clear this bit to 0 

...

6.18.24  Word 62: DMADIR

ATAPI devices that use a serial ATA bridge chip for connection to a
serial ATA host may require use of the  DMADIR bit to indicate transfer
direction for Packet DMA commands.  Word 62 is used to indicate if such 
support is required. 

If bit 15 of word 62 is set to one, then DMADIR bit in the Packet
Command  is required by the device for  Packet DMA and Bits 2:0 of word
63, bits 15 and 8 in word 49, and bits 6:0 of word 88 shall be cleared
to 0,.

If bit 15 of word 62 is cleared to 0, DMADIR bit in the PACKET command
is not required. If bit 15 of word 62  is cleared to zero, then all bits
of word 62 shall be cleared to zero.

Bits (14:11) are reserved.

Bits (10:1) indicate DMA mode support.  Since the DMADIR bit is only
used for a Serial ATAPI device, all of  these bits are set to 1.

...

6.18.25  Word 63: Multiword DMA transfer

...

If the serial interface is implemented, this bit  shall be set to one
except this bit shall be cleared 0 for Serial ATAPI devices requiring
the DMADIR bit in the  PACKET command.   

...

6.18.41  Word 88:Ultra DMA modes

Word 88 shall have the content described for word 88 of the IDENTIFY
DEVICE command, except  bits 6:0 shall be cleared to 0 for Serial ATAPI
devices which require the DMADIR bit in the Packet command. 
...

[page 186 of 390]

6.25 PACKET [xA0]

...

6.25.4 Inputs

...

Features register -

DMADIR -

This bit indicates Packet DMA direction and is used only for devices
that implement the  Packet Command feature set with a Serial ATA bridge
that require direction indication from the  host. Support for this bit
is determined by reading bit 15 of word 62 in the IDENTIFY PACKET 
DEVICE data.  If bit 15 of word 62 is set to 1, the device requires the
use of the DMADIR bit for  Packet DMA commands.

If the device requires the DMADIR bit to be set for Packet DMA
operations and the current  operations is DMA (i.e. bit 0, the DMA bit,
is set), this bit indicates the direction of data transfer  (0 =
transfer to the device; 1 = transfer to the host). If the device
requires the DMADIR bit to be  set for Packet DMA operations but the
current operations is PIO (i.e. bit 0, the DMA bit, is  cleared), this
bit is ignored.

Since the data transfer direction will be set by the host as the command
is constructed, the  DMADIR bit should not conflict with the data
transfer direction of the command.  If a conflict  between the command
transfer direction and the DMADIR bit occurs, the device should return 
with an ABORTED command, and the sense key set to ILLEGAL REQUEST.

If the device does not require the DMADIR bit for Packet DMA operations,
this bit should be  cleared to 0.

A device that does not support the DMADIR feature may abort a command if
the DMADIR bit is  set to 1. 

...

----



  reply	other threads:[~2004-05-17 18:48 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-16 14:19 [PATCH] libata DMADIR support Pat LaVarre
2004-05-16 23:16 ` Jeff Garzik
2004-05-17 18:48   ` Pat LaVarre [this message]
2004-05-17 19:08     ` Jeff Garzik
2004-05-17 21:06       ` Pat LaVarre
2004-05-17 21:40         ` Jeff Garzik
2004-05-17 21:20       ` Pat LaVarre
2004-05-17 21:32         ` Jeff Garzik
2004-05-17 21:34           ` Jeff Garzik
2004-05-17 22:05           ` Pat LaVarre
2004-05-17 22:36             ` Jeff Garzik
2004-05-17 23:04               ` Pat LaVarre
2004-05-18 22:40               ` Pat LaVarre
2004-05-18 23:07                 ` Pat LaVarre
2004-05-18 23:50                   ` Jeff Garzik
2004-05-19 22:47                     ` Pat LaVarre
2004-05-18 23:48                 ` [PATCH] atapi request sense work Jeff Garzik
2004-05-19 20:35                   ` Pat LaVarre
2004-05-19 22:19                     ` Jeff Garzik
2004-05-19 22:24                   ` Pat LaVarre
2004-05-19 22:27                     ` Pat LaVarre
2004-05-19 22:54                   ` Pat LaVarre
2004-05-21  1:58                     ` Pat LaVarre
     [not found]                       ` <6 E36A 11B-AACB-11D8-8B8A-003065635034@ieee.org>
2004-05-21  2:06                       ` Pat LaVarre
2004-05-21  3:05                         ` Pat LaVarre
2004-05-21  4:04                           ` Jeff Garzik
     [not found]                             ` <1 085153750.6103.33.camel@patibmrh9>
2004-05-21 15:35                             ` Pat LaVarre
2004-05-21 15:46                               ` Bartlomiej Zolnierkiewicz
2004-05-21 17:59                                 ` Pat LaVarre
2004-05-21 20:07                                   ` Pat LaVarre
2004-05-21 21:51                                     ` Jeff Garzik
2004-05-21 23:12                                       ` Pat LaVarre
2004-05-21 23:24                                       ` Pat LaVarre
2004-05-21 23:55                                         ` Jeff Garzik
2004-05-21 23:57                                           ` Pat LaVarre
2004-05-21 23:39                                       ` Pat LaVarre
2004-05-21 23:45                                         ` Jeff Garzik
2004-05-22  0:06                                           ` Pat LaVarre
2004-05-22  0:12                                             ` Pat LaVarre
2004-05-22  0:33                                           ` Pat LaVarre
2004-05-22  1:11                                             ` Pat LaVarre
2004-05-26 21:49                                               ` Pat LaVarre
2004-05-27 23:12                                                 ` Pat LaVarre
2004-05-27 23:32                                                   ` Jeff Garzik
2004-05-27 23:38                                                     ` Pat LaVarre
2004-05-27 23:41                                                       ` Jeff Garzik
2004-05-28  0:13                                                     ` Pat LaVarre
2004-05-28  1:28                                                   ` Pat LaVarre
2004-05-24 15:27                                             ` Pat LaVarre
2004-05-21 21:59                                   ` Pat LaVarre
2004-05-21 18:23                                 ` Danny Cox
2004-05-21 18:39                                   ` Bartlomiej Zolnierkiewicz
2004-05-21 18:55                                     ` [PATCH] kmalloc old_hwif Danny Cox
2004-05-21 19:00                                     ` [PATCH] atapi request sense work Danny Cox
2004-05-21 19:08                                       ` Bartlomiej Zolnierkiewicz
  -- strict thread matches above, loose matches on Subject: below --
2004-05-15 21:46 [PATCH] libata DMADIR support Jeff Garzik

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=1084819720.4328.86.camel@patibmrh9 \
    --to=p.lavarre@ieee.org \
    --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.