1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Problems with the current EH</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="ch03s05.html" title="ata_scsi_error()"><link rel="next" href="libataExt.html" title="Chapter&#160;4.&#160;libata Library"></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">Problems with the current EH</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s05.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="libataExt.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1120634092"></a>Problems with the current EH</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
2	Error representation is too crude.  Currently any and all
3	error conditions are represented with ATA STATUS and ERROR
4	registers.  Errors which aren't ATA device errors are treated
5	as ATA device errors by setting ATA_ERR bit.  Better error
6	descriptor which can properly represent ATA and other
7	errors/exceptions is needed.
8	</p></li><li class="listitem"><p>
9	When handling timeouts, no action is taken to make device
10	forget about the timed out command and ready for new commands.
11	</p></li><li class="listitem"><p>
12	EH handling via ata_scsi_error() is not properly protected
13	from usual command processing.  On EH entrance, the device is
14	not in quiescent state.  Timed out commands may succeed or
15	fail any time.  pio_task and atapi_task may still be running.
16	</p></li><li class="listitem"><p>
17	Too weak error recovery.  Devices / controllers causing HSM
18	mismatch errors and other errors quite often require reset to
19	return to known state.  Also, advanced error handling is
20	necessary to support features like NCQ and hotplug.
21	</p></li><li class="listitem"><p>
22	ATA errors are directly handled in the interrupt handler and
23	PIO errors in pio_task.  This is problematic for advanced
24	error handling for the following reasons.
25	</p><p>
26	First, advanced error handling often requires context and
27	internal qc execution.
28	</p><p>
29	Second, even a simple failure (say, CRC error) needs
30	information gathering and could trigger complex error handling
31	(say, resetting &amp; reconfiguring).  Having multiple code
32	paths to gather information, enter EH and trigger actions
33	makes life painful.
34	</p><p>
35	Third, scattered EH code makes implementing low level drivers
36	difficult.  Low level drivers override libata callbacks.  If
37	EH is scattered over several places, each affected callbacks
38	should perform its part of error handling.  This can be error
39	prone and painful.
40	</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s05.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="libataExt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ata_scsi_error()&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;4.&#160;libata Library</td></tr></table></div></body></html>
41