<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/ata/libata-core.c, branch v2.6.26</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>libata: don't check whether to use DMA or not for no data commands</title>
<updated>2008-06-19T00:27:49+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-06-17T03:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5895ef9a5b746e7cc9ebda50c87fbd11562da0a4'/>
<id>5895ef9a5b746e7cc9ebda50c87fbd11562da0a4</id>
<content type='text'>
There's no reason to check whether to use DMA or not for no data
commands.  Don't do it.  While at it, make local variable using_pio in
atapi_xlat() set iff ATAPI_PROT_PIO is going to be used and rename
ata_check_atapi_dma() to atapi_check_dma() for consistency.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason to check whether to use DMA or not for no data
commands.  Don't do it.  While at it, make local variable using_pio in
atapi_xlat() set iff ATAPI_PROT_PIO is going to be used and rename
ata_check_atapi_dma() to atapi_check_dma() for consistency.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ata: Convert to static DEFINE_SPINLOCK(lock)</title>
<updated>2008-05-30T16:37:43+00:00</updated>
<author>
<name>Pradeep Singh Rautela</name>
<email>rautelap@gmail.com</email>
</author>
<published>2008-05-29T17:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2da676594a73825f10d2a99358cc7465119684f9'/>
<id>2da676594a73825f10d2a99358cc7465119684f9</id>
<content type='text'>
Replace deprecated static spinlock_t instance to static DEFINE_SPINLOCK(lock).

Signed-off-by: Pradeep Singh &lt;rautelap@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace deprecated static spinlock_t instance to static DEFINE_SPINLOCK(lock).

Signed-off-by: Pradeep Singh &lt;rautelap@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: ignore SIMG4726 config pseudo device</title>
<updated>2008-05-19T21:51:48+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2008-05-18T16:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=50af2fa1e18d0ab411d06bf727ecadb7e01721e9'/>
<id>50af2fa1e18d0ab411d06bf727ecadb7e01721e9</id>
<content type='text'>
I was hoping ATA_HORKAGE_NODMA | ATA_HORKAGE_SKIP_PM could keep it
happy but no even this doesn't work under certain configurations and
it's not like we can do anything useful with the cofig device anyway.
Replace ATA_HORKAGE_SKIP_PM with ATA_HORKAGE_DISABLE and use it for
the config device.  This makes the device completely ignored by
libata.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was hoping ATA_HORKAGE_NODMA | ATA_HORKAGE_SKIP_PM could keep it
happy but no even this doesn't work under certain configurations and
it's not like we can do anything useful with the cofig device anyway.
Replace ATA_HORKAGE_SKIP_PM with ATA_HORKAGE_DISABLE and use it for
the config device.  This makes the device completely ignored by
libata.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: don't schedule LPM action seperately during probing</title>
<updated>2008-05-19T21:51:48+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2008-05-18T16:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=391191c116c088edc6794a6e5ace10a13928c2f6'/>
<id>391191c116c088edc6794a6e5ace10a13928c2f6</id>
<content type='text'>
There's no reason to schedule LPM action after probing is complete
causing another EH iteration.  Just schedule it together with probing
itself.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason to schedule LPM action after probing is complete
causing another EH iteration.  Just schedule it together with probing
itself.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: kill hotplug related race condition</title>
<updated>2008-05-19T21:51:47+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2008-05-18T16:15:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f046519fc85a8fdf6a058b4ac9d897cdee6f3e52'/>
<id>f046519fc85a8fdf6a058b4ac9d897cdee6f3e52</id>
<content type='text'>
Originally, whole reset processing was done while the port is frozen
and SError was cleared during @postreset().  This had two race
conditions.  1: hotplug could occur after reset but before SError is
cleared and libata won't know about it.  2: hotplug could occur after
all the reset is complete but before the port is thawed.  As all
events are cleared on thaw, the hotplug event would be lost.

Commit ac371987a81c61c2efbd6931245cdcaf43baad89 kills the first race
by clearing SError during link resume but before link onlineness test.
However, this doesn't fix race #2 and in some cases clearing SError
after SRST is a good idea.

This patch solves this problem by cross checking link onlineness with
classification result after SError is cleared and port is thawed.
Reset is retried if link is online but all devices attached to the
link are unknown.  As all devices will be revalidated, this one-way
check is enough to ensure that all devices are detected and
revalidated reliably.

This, luckily, also fixes the cases where host controller returns
bogus status while harddrive is spinning up after hotplug making
classification run before the device sends the first FIS and thus
causes misdetection.

Low level drivers can bypass the logic by setting class explicitly to
ATA_DEV_NONE if ever necessary (currently none requires this).

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally, whole reset processing was done while the port is frozen
and SError was cleared during @postreset().  This had two race
conditions.  1: hotplug could occur after reset but before SError is
cleared and libata won't know about it.  2: hotplug could occur after
all the reset is complete but before the port is thawed.  As all
events are cleared on thaw, the hotplug event would be lost.

Commit ac371987a81c61c2efbd6931245cdcaf43baad89 kills the first race
by clearing SError during link resume but before link onlineness test.
However, this doesn't fix race #2 and in some cases clearing SError
after SRST is a good idea.

This patch solves this problem by cross checking link onlineness with
classification result after SError is cleared and port is thawed.
Reset is retried if link is online but all devices attached to the
link are unknown.  As all devices will be revalidated, this one-way
check is enough to ensure that all devices are detected and
revalidated reliably.

This, luckily, also fixes the cases where host controller returns
bogus status while harddrive is spinning up after hotplug making
classification run before the device sends the first FIS and thus
causes misdetection.

Low level drivers can bypass the logic by setting class explicitly to
ATA_DEV_NONE if ever necessary (currently none requires this).

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: fix sata_link_hardreset() @online out parameter handling</title>
<updated>2008-05-19T21:51:47+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2008-05-18T16:15:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8'/>
<id>0cbf0711a1ebcc4d3aea8e11def684afc2c07ef8</id>
<content type='text'>
The @online out parameter is supposed to set to true iff link is
online and reset succeeded as advertised in the function description
and callers are coded expecting that.  However, sata_link_reset()
didn't behave this way on device readiness test failure.  Fix it.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The @online out parameter is supposed to set to true iff link is
online and reset succeeded as advertised in the function description
and callers are coded expecting that.  However, sata_link_reset()
didn't behave this way on device readiness test failure.  Fix it.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: export ata_eh_analyze_ncq_error</title>
<updated>2008-05-06T15:37:58+00:00</updated>
<author>
<name>Mark Lord</name>
<email>liml@rtr.ca</email>
</author>
<published>2008-05-02T06:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=10acf3b0d3b46c6ef5d6f0722f72ad9b743ea848'/>
<id>10acf3b0d3b46c6ef5d6f0722f72ad9b743ea848</id>
<content type='text'>
Export ata_eh_analyze_ncq_error() for subsequent use by sata_mv,
as suggested by Tejun.

Signed-off-by: Mark Lord &lt;mlord@pobox.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export ata_eh_analyze_ncq_error() for subsequent use by sata_mv,
as suggested by Tejun.

Signed-off-by: Mark Lord &lt;mlord@pobox.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: More TSSTcorp pain, keep in sync with legacy IDE</title>
<updated>2008-04-29T21:41:13+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@lxorguk.ukuu.org.uk</email>
</author>
<published>2008-04-29T13:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a79067e513c71733223e13a52aacc8dbd71e9f46'/>
<id>a79067e513c71733223e13a52aacc8dbd71e9f46</id>
<content type='text'>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>make sata_set_spd_needed() static</title>
<updated>2008-04-25T04:46:11+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-04-21T08:51:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1dc55e876182a13dcc5991c3aab893f38455d8a7'/>
<id>1dc55e876182a13dcc5991c3aab893f38455d8a7</id>
<content type='text'>
sata_set_spd_needed() can now become static.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sata_set_spd_needed() can now become static.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>make sata_print_link_status() static</title>
<updated>2008-04-25T04:46:09+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-04-21T08:51:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6bdb4fc9f9e5307012f6f2afb8642b52dad9c186'/>
<id>6bdb4fc9f9e5307012f6f2afb8642b52dad9c186</id>
<content type='text'>
sata_print_link_status() can now become static.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sata_print_link_status() can now become static.

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
