1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter&#160;4.&#160;libata Library</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="index.html" title="libATA Developer's Guide"><link rel="prev" href="ch03s06.html" title="Problems with the current EH"><link rel="next" href="API-ata-link-next.html" title="ata_link_next"></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">Chapter&#160;4.&#160;libata Library</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s06.html">Prev</a>&#160;</td><th width="60%" align="center">&#160;</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-ata-link-next.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="libataExt"></a>Chapter&#160;4.&#160;libata Library</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="refentrytitle"><a href="API-ata-link-next.html"><span class="phrase">ata_link_next</span></a></span><span class="refpurpose"> &#8212; 
2  link iteration helper
3 </span></dt><dt><span class="refentrytitle"><a href="API-ata-dev-next.html"><span class="phrase">ata_dev_next</span></a></span><span class="refpurpose"> &#8212; 
4     device iteration helper
5 </span></dt><dt><span class="refentrytitle"><a href="API-atapi-cmd-type.html"><span class="phrase">atapi_cmd_type</span></a></span><span class="refpurpose"> &#8212; 
6     Determine ATAPI command type from SCSI opcode
7 </span></dt><dt><span class="refentrytitle"><a href="API-ata-tf-to-fis.html"><span class="phrase">ata_tf_to_fis</span></a></span><span class="refpurpose"> &#8212; 
8     Convert ATA taskfile to SATA FIS structure
9 </span></dt><dt><span class="refentrytitle"><a href="API-ata-tf-from-fis.html"><span class="phrase">ata_tf_from_fis</span></a></span><span class="refpurpose"> &#8212; 
10     Convert SATA FIS to ATA taskfile
11 </span></dt><dt><span class="refentrytitle"><a href="API-ata-pack-xfermask.html"><span class="phrase">ata_pack_xfermask</span></a></span><span class="refpurpose"> &#8212; 
12     Pack pio, mwdma and udma masks into xfer_mask
13 </span></dt><dt><span class="refentrytitle"><a href="API-ata-unpack-xfermask.html"><span class="phrase">ata_unpack_xfermask</span></a></span><span class="refpurpose"> &#8212; 
14     Unpack xfer_mask into pio, mwdma and udma masks
15 </span></dt><dt><span class="refentrytitle"><a href="API-ata-xfer-mask2mode.html"><span class="phrase">ata_xfer_mask2mode</span></a></span><span class="refpurpose"> &#8212; 
16     Find matching XFER_* for the given xfer_mask
17 </span></dt><dt><span class="refentrytitle"><a href="API-ata-xfer-mode2mask.html"><span class="phrase">ata_xfer_mode2mask</span></a></span><span class="refpurpose"> &#8212; 
18     Find matching xfer_mask for XFER_*
19 </span></dt><dt><span class="refentrytitle"><a href="API-ata-xfer-mode2shift.html"><span class="phrase">ata_xfer_mode2shift</span></a></span><span class="refpurpose"> &#8212; 
20     Find matching xfer_shift for XFER_*
21 </span></dt><dt><span class="refentrytitle"><a href="API-ata-mode-string.html"><span class="phrase">ata_mode_string</span></a></span><span class="refpurpose"> &#8212; 
22     convert xfer_mask to string
23 </span></dt><dt><span class="refentrytitle"><a href="API-ata-dev-classify.html"><span class="phrase">ata_dev_classify</span></a></span><span class="refpurpose"> &#8212; 
24     determine device type based on ATA-spec signature
25 </span></dt><dt><span class="refentrytitle"><a href="API-ata-id-string.html"><span class="phrase">ata_id_string</span></a></span><span class="refpurpose"> &#8212; 
26     Convert IDENTIFY DEVICE page into string
27 </span></dt><dt><span class="refentrytitle"><a href="API-ata-id-c-string.html"><span class="phrase">ata_id_c_string</span></a></span><span class="refpurpose"> &#8212; 
28     Convert IDENTIFY DEVICE page into C string
29 </span></dt><dt><span class="refentrytitle"><a href="API-ata-id-xfermask.html"><span class="phrase">ata_id_xfermask</span></a></span><span class="refpurpose"> &#8212; 
30     Compute xfermask from the given IDENTIFY data
31 </span></dt><dt><span class="refentrytitle"><a href="API-ata-pio-need-iordy.html"><span class="phrase">ata_pio_need_iordy</span></a></span><span class="refpurpose"> &#8212; 
32     check if iordy needed
33 </span></dt><dt><span class="refentrytitle"><a href="API-ata-do-dev-read-id.html"><span class="phrase">ata_do_dev_read_id</span></a></span><span class="refpurpose"> &#8212; 
34     default ID read method
35 </span></dt><dt><span class="refentrytitle"><a href="API-ata-cable-40wire.html"><span class="phrase">ata_cable_40wire</span></a></span><span class="refpurpose"> &#8212; 
36     return 40 wire cable type
37 </span></dt><dt><span class="refentrytitle"><a href="API-ata-cable-80wire.html"><span class="phrase">ata_cable_80wire</span></a></span><span class="refpurpose"> &#8212; 
38     return 80 wire cable type
39 </span></dt><dt><span class="refentrytitle"><a href="API-ata-cable-unknown.html"><span class="phrase">ata_cable_unknown</span></a></span><span class="refpurpose"> &#8212; 
40     return unknown PATA cable.
41 </span></dt><dt><span class="refentrytitle"><a href="API-ata-cable-ignore.html"><span class="phrase">ata_cable_ignore</span></a></span><span class="refpurpose"> &#8212; 
42     return ignored PATA cable.
43 </span></dt><dt><span class="refentrytitle"><a href="API-ata-cable-sata.html"><span class="phrase">ata_cable_sata</span></a></span><span class="refpurpose"> &#8212; 
44     return SATA cable type
45 </span></dt><dt><span class="refentrytitle"><a href="API-ata-dev-pair.html"><span class="phrase">ata_dev_pair</span></a></span><span class="refpurpose"> &#8212; 
46     return other device on cable
47 </span></dt><dt><span class="refentrytitle"><a href="API-sata-set-spd.html"><span class="phrase">sata_set_spd</span></a></span><span class="refpurpose"> &#8212; 
48     set SATA spd according to spd limit
49 </span></dt><dt><span class="refentrytitle"><a href="API-ata-timing-cycle2mode.html"><span class="phrase">ata_timing_cycle2mode</span></a></span><span class="refpurpose"> &#8212; 
50     find xfer mode for the specified cycle duration
51 </span></dt><dt><span class="refentrytitle"><a href="API-ata-do-set-mode.html"><span class="phrase">ata_do_set_mode</span></a></span><span class="refpurpose"> &#8212; 
52     Program timings and issue SET FEATURES - XFER
53 </span></dt><dt><span class="refentrytitle"><a href="API-ata-wait-after-reset.html"><span class="phrase">ata_wait_after_reset</span></a></span><span class="refpurpose"> &#8212; 
54     wait for link to become ready after reset
55 </span></dt><dt><span class="refentrytitle"><a href="API-sata-link-debounce.html"><span class="phrase">sata_link_debounce</span></a></span><span class="refpurpose"> &#8212; 
56     debounce SATA phy status
57 </span></dt><dt><span class="refentrytitle"><a href="API-sata-link-resume.html"><span class="phrase">sata_link_resume</span></a></span><span class="refpurpose"> &#8212; 
58     resume SATA link
59 </span></dt><dt><span class="refentrytitle"><a href="API-sata-link-scr-lpm.html"><span class="phrase">sata_link_scr_lpm</span></a></span><span class="refpurpose"> &#8212; 
60     manipulate SControl IPM and SPM fields
61 </span></dt><dt><span class="refentrytitle"><a href="API-ata-std-prereset.html"><span class="phrase">ata_std_prereset</span></a></span><span class="refpurpose"> &#8212; 
62     prepare for reset
63 </span></dt><dt><span class="refentrytitle"><a href="API-sata-link-hardreset.html"><span class="phrase">sata_link_hardreset</span></a></span><span class="refpurpose"> &#8212; 
64     reset link via SATA phy reset
65 </span></dt><dt><span class="refentrytitle"><a href="API-sata-std-hardreset.html"><span class="phrase">sata_std_hardreset</span></a></span><span class="refpurpose"> &#8212; 
66     COMRESET w/o waiting or classification
67 </span></dt><dt><span class="refentrytitle"><a href="API-ata-std-postreset.html"><span class="phrase">ata_std_postreset</span></a></span><span class="refpurpose"> &#8212; 
68     standard postreset callback
69 </span></dt><dt><span class="refentrytitle"><a href="API-ata-dev-set-feature.html"><span class="phrase">ata_dev_set_feature</span></a></span><span class="refpurpose"> &#8212; 
70     Issue SET FEATURES - SATA FEATURES
71 </span></dt><dt><span class="refentrytitle"><a href="API-ata-std-qc-defer.html"><span class="phrase">ata_std_qc_defer</span></a></span><span class="refpurpose"> &#8212; 
72     Check whether a qc needs to be deferred
73 </span></dt><dt><span class="refentrytitle"><a href="API-ata-sg-init.html"><span class="phrase">ata_sg_init</span></a></span><span class="refpurpose"> &#8212; 
74     Associate command with scatter-gather table.
75 </span></dt><dt><span class="refentrytitle"><a href="API-ata-qc-complete.html"><span class="phrase">ata_qc_complete</span></a></span><span class="refpurpose"> &#8212; 
76     Complete an active ATA command
77 </span></dt><dt><span class="refentrytitle"><a href="API-ata-qc-complete-multiple.html"><span class="phrase">ata_qc_complete_multiple</span></a></span><span class="refpurpose"> &#8212; 
78     Complete multiple qcs successfully
79 </span></dt><dt><span class="refentrytitle"><a href="API-sata-scr-valid.html"><span class="phrase">sata_scr_valid</span></a></span><span class="refpurpose"> &#8212; 
80     test whether SCRs are accessible
81 </span></dt><dt><span class="refentrytitle"><a href="API-sata-scr-read.html"><span class="phrase">sata_scr_read</span></a></span><span class="refpurpose"> &#8212; 
82     read SCR register of the specified port
83 </span></dt><dt><span class="refentrytitle"><a href="API-sata-scr-write.html"><span class="phrase">sata_scr_write</span></a></span><span class="refpurpose"> &#8212; 
84     write SCR register of the specified port
85 </span></dt><dt><span class="refentrytitle"><a href="API-sata-scr-write-flush.html"><span class="phrase">sata_scr_write_flush</span></a></span><span class="refpurpose"> &#8212; 
86     write SCR register of the specified port and flush
87 </span></dt><dt><span class="refentrytitle"><a href="API-ata-link-online.html"><span class="phrase">ata_link_online</span></a></span><span class="refpurpose"> &#8212; 
88     test whether the given link is online
89 </span></dt><dt><span class="refentrytitle"><a href="API-ata-link-offline.html"><span class="phrase">ata_link_offline</span></a></span><span class="refpurpose"> &#8212; 
90     test whether the given link is offline
91 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-suspend.html"><span class="phrase">ata_host_suspend</span></a></span><span class="refpurpose"> &#8212; 
92     suspend host
93 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-resume.html"><span class="phrase">ata_host_resume</span></a></span><span class="refpurpose"> &#8212; 
94     resume host
95 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-alloc.html"><span class="phrase">ata_host_alloc</span></a></span><span class="refpurpose"> &#8212; 
96     allocate and init basic ATA host resources
97 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-alloc-pinfo.html"><span class="phrase">ata_host_alloc_pinfo</span></a></span><span class="refpurpose"> &#8212; 
98     alloc host and init with port_info array
99 </span></dt><dt><span class="refentrytitle"><a href="API-ata-slave-link-init.html"><span class="phrase">ata_slave_link_init</span></a></span><span class="refpurpose"> &#8212; 
100     initialize slave link
101 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-start.html"><span class="phrase">ata_host_start</span></a></span><span class="refpurpose"> &#8212; 
102     start and freeze ports of an ATA host
103 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-init.html"><span class="phrase">ata_host_init</span></a></span><span class="refpurpose"> &#8212; 
104     Initialize a host struct for sas (ipr, libsas)
105 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-register.html"><span class="phrase">ata_host_register</span></a></span><span class="refpurpose"> &#8212; 
106     register initialized ATA host
107 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-activate.html"><span class="phrase">ata_host_activate</span></a></span><span class="refpurpose"> &#8212; 
108     start host, request IRQ and register it
109 </span></dt><dt><span class="refentrytitle"><a href="API-ata-host-detach.html"><span class="phrase">ata_host_detach</span></a></span><span class="refpurpose"> &#8212; 
110     Detach all ports of an ATA host
111 </span></dt><dt><span class="refentrytitle"><a href="API-ata-pci-remove-one.html"><span class="phrase">ata_pci_remove_one</span></a></span><span class="refpurpose"> &#8212; 
112     PCI layer callback for device removal
113 </span></dt><dt><span class="refentrytitle"><a href="API-ata-platform-remove-one.html"><span class="phrase">ata_platform_remove_one</span></a></span><span class="refpurpose"> &#8212; 
114     Platform layer callback for device removal
115 </span></dt><dt><span class="refentrytitle"><a href="API-ata-msleep.html"><span class="phrase">ata_msleep</span></a></span><span class="refpurpose"> &#8212; 
116     ATA EH owner aware msleep
117 </span></dt><dt><span class="refentrytitle"><a href="API-ata-wait-register.html"><span class="phrase">ata_wait_register</span></a></span><span class="refpurpose"> &#8212; 
118     wait until register value changes
119 </span></dt><dt><span class="refentrytitle"><a href="API-sata-lpm-ignore-phy-events.html"><span class="phrase">sata_lpm_ignore_phy_events</span></a></span><span class="refpurpose"> &#8212; 
120     test if PHY event should be ignored
121 </span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s06.html">Prev</a>&#160;</td><td width="20%" align="center">&#160;</td><td width="40%" align="right">&#160;<a accesskey="n" href="API-ata-link-next.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Problems with the current EH&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">ata_link_next</span></td></tr></table></div></body></html>
122