aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/libata.tmpl
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-04-18 18:19:55 -0400
committerDave Jones <davej@redhat.com>2006-04-18 18:19:55 -0400
commitf1f76afd71e0f17af9a35fcb649f4bab53304a4d (patch)
treea56257b13a0eda4a9b7e950c3b85adad16341b80 /Documentation/DocBook/libata.tmpl
parent530515a06f90c0831732709efee4a99497bd2b7c (diff)
parent385910f2b275a636238f70844f1b6da9fda6f2da (diff)
Merge ../linus
Diffstat (limited to 'Documentation/DocBook/libata.tmpl')
-rw-r--r--Documentation/DocBook/libata.tmpl49
1 files changed, 44 insertions, 5 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index d260d92089ad..f869b03929db 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -120,14 +120,27 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
120 <programlisting> 120 <programlisting>
121void (*set_piomode) (struct ata_port *, struct ata_device *); 121void (*set_piomode) (struct ata_port *, struct ata_device *);
122void (*set_dmamode) (struct ata_port *, struct ata_device *); 122void (*set_dmamode) (struct ata_port *, struct ata_device *);
123void (*post_set_mode) (struct ata_port *ap); 123void (*post_set_mode) (struct ata_port *);
124unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned int);
124 </programlisting> 125 </programlisting>
125 126
126 <para> 127 <para>
127 Hooks called prior to the issue of SET FEATURES - XFER MODE 128 Hooks called prior to the issue of SET FEATURES - XFER MODE
128 command. dev->pio_mode is guaranteed to be valid when 129 command. The optional ->mode_filter() hook is called when libata
129 ->set_piomode() is called, and dev->dma_mode is guaranteed to be 130 has built a mask of the possible modes. This is passed to the
130 valid when ->set_dmamode() is called. ->post_set_mode() is 131 ->mode_filter() function which should return a mask of valid modes
132 after filtering those unsuitable due to hardware limits. It is not
133 valid to use this interface to add modes.
134 </para>
135 <para>
136 dev->pio_mode and dev->dma_mode are guaranteed to be valid when
137 ->set_piomode() and when ->set_dmamode() is called. The timings for
138 any other drive sharing the cable will also be valid at this point.
139 That is the library records the decisions for the modes of each
140 drive on a channel before it attempts to set any of them.
141 </para>
142 <para>
143 ->post_set_mode() is
131 called unconditionally, after the SET FEATURES - XFER MODE 144 called unconditionally, after the SET FEATURES - XFER MODE
132 command completes successfully. 145 command completes successfully.
133 </para> 146 </para>
@@ -230,6 +243,32 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
230 243
231 </sect2> 244 </sect2>
232 245
246 <sect2><title>Private tuning method</title>
247 <programlisting>
248void (*set_mode) (struct ata_port *ap);
249 </programlisting>
250
251 <para>
252 By default libata performs drive and controller tuning in
253 accordance with the ATA timing rules and also applies blacklists
254 and cable limits. Some controllers need special handling and have
255 custom tuning rules, typically raid controllers that use ATA
256 commands but do not actually do drive timing.
257 </para>
258
259 <warning>
260 <para>
261 This hook should not be used to replace the standard controller
262 tuning logic when a controller has quirks. Replacing the default
263 tuning logic in that case would bypass handling for drive and
264 bridge quirks that may be important to data reliability. If a
265 controller needs to filter the mode selection it should use the
266 mode_filter hook instead.
267 </para>
268 </warning>
269
270 </sect2>
271
233 <sect2><title>Reset ATA bus</title> 272 <sect2><title>Reset ATA bus</title>
234 <programlisting> 273 <programlisting>
235void (*phy_reset) (struct ata_port *ap); 274void (*phy_reset) (struct ata_port *ap);
@@ -666,7 +705,7 @@ and other resources, etc.
666 705
667 <sect1><title>ata_scsi_error()</title> 706 <sect1><title>ata_scsi_error()</title>
668 <para> 707 <para>
669 ata_scsi_error() is the current hostt->eh_strategy_handler() 708 ata_scsi_error() is the current transportt->eh_strategy_handler()
670 for libata. As discussed above, this will be entered in two 709 for libata. As discussed above, this will be entered in two
671 cases - timeout and ATAPI error completion. This function 710 cases - timeout and ATAPI error completion. This function
672 calls low level libata driver's eng_timeout() callback, the 711 calls low level libata driver's eng_timeout() callback, the