1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>How commands are processed</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="libATA Developer's Guide"><link rel="up" href="libataEH.html" title="Chapter&#160;3.&#160;Error handling"><link rel="prev" href="ch03s02.html" title="How commands are issued"><link rel="next" href="ch03s04.html" title="How commands are completed"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">How commands are processed</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;3.&#160;Error handling</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch03s04.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1120618924"></a>How commands are processed</h2></div></div></div><p>
2	Depending on which protocol and which controller are used,
3	commands are processed differently.  For the purpose of
4	discussion, a controller which uses taskfile interface and all
5	standard callbacks is assumed.
6	</p><p>
7	Currently 6 ATA command protocols are used.  They can be
8	sorted into the following four categories according to how
9	they are processed.
10	</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">ATA NO DATA or DMA</span></dt><dd><p>
11	   ATA_PROT_NODATA and ATA_PROT_DMA fall into this category.
12	   These types of commands don't require any software
13	   intervention once issued.  Device will raise interrupt on
14	   completion.
15	   </p></dd><dt><span class="term">ATA PIO</span></dt><dd><p>
16	   ATA_PROT_PIO is in this category.  libata currently
17	   implements PIO with polling.  ATA_NIEN bit is set to turn
18	   off interrupt and pio_task on ata_wq performs polling and
19	   IO.
20	   </p></dd><dt><span class="term">ATAPI NODATA or DMA</span></dt><dd><p>
21	   ATA_PROT_ATAPI_NODATA and ATA_PROT_ATAPI_DMA are in this
22	   category.  packet_task is used to poll BSY bit after
23	   issuing PACKET command.  Once BSY is turned off by the
24	   device, packet_task transfers CDB and hands off processing
25	   to interrupt handler.
26	   </p></dd><dt><span class="term">ATAPI PIO</span></dt><dd><p>
27	   ATA_PROT_ATAPI is in this category.  ATA_NIEN bit is set
28	   and, as in ATAPI NODATA or DMA, packet_task submits cdb.
29	   However, after submitting cdb, further processing (data
30	   transfer) is handed off to pio_task.
31	   </p></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s02.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="libataEH.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch03s04.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">How commands are issued&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;How commands are completed</td></tr></table></div></body></html>
32