<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/ata, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ata_piix: parallel scanning on PATA needs an extra locking</title>
<updated>2009-09-01T03:25:00+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-08-30T12:56:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=60c3be387bb6cd39707d3ec0ebc324a0c96181f8'/>
<id>60c3be387bb6cd39707d3ec0ebc324a0c96181f8</id>
<content type='text'>
Commit log for commit 517d3cc15b36392e518abab6bacbb72089658313
("[libata] ata_piix: Enable parallel scan") says:

    This patch turns on parallel scanning for the ata_piix driver.
    This driver is used on most netbooks (no AHCI for cheap storage it seems).
    The scan is the dominating time factor in the kernel boot for these
    devices; with this flag it gets cut in half for the device I used
    for testing (eeepc).
    Alan took a look at the driver source and concluded that it ought to be safe
    to do for this driver.  Alan has also checked with the hardware team.

and it is all true but once we put all things together additional
constraints for PATA controllers show up (some hardware registers
have per-host not per-port atomicity) and we risk misprogramming
the controller.

I used the following test to check whether the issue is real:

  @@ -736,8 +736,20 @@ static void piix_set_piomode(struct ata_
   			(timings[pio][1] &lt;&lt; 8);
   	}
   	pci_write_config_word(dev, master_port, master_data);
  -	if (is_slave)
  +	if (is_slave) {
  +		if (ap-&gt;port_no == 0) {
  +			u8 tmp = slave_data;
  +
  +			while (slave_data == tmp) {
  +				pci_read_config_byte(dev, slave_port, &amp;tmp);
  +				msleep(50);
  +			}
  +
  +			dev_printk(KERN_ERR, &amp;dev-&gt;dev, "PATA parallel scan "
  +				   "race detected\n");
  +		}
   		pci_write_config_byte(dev, slave_port, slave_data);
  +	}

   	/* Ensure the UDMA bit is off - it will be turned back on if
   	   UDMA is selected */

and it indeed triggered the error message.

Lets fix all such races by adding an extra locking to -&gt;set_piomode
and -&gt;set_dmamode methods for PATA controllers.

[ Alan: would be better to take the host lock in libata-core for these
  cases so that we fix all the adapters in one swoop.  "Looks fine as a
  temproary quickfix tho" ]

Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit log for commit 517d3cc15b36392e518abab6bacbb72089658313
("[libata] ata_piix: Enable parallel scan") says:

    This patch turns on parallel scanning for the ata_piix driver.
    This driver is used on most netbooks (no AHCI for cheap storage it seems).
    The scan is the dominating time factor in the kernel boot for these
    devices; with this flag it gets cut in half for the device I used
    for testing (eeepc).
    Alan took a look at the driver source and concluded that it ought to be safe
    to do for this driver.  Alan has also checked with the hardware team.

and it is all true but once we put all things together additional
constraints for PATA controllers show up (some hardware registers
have per-host not per-port atomicity) and we risk misprogramming
the controller.

I used the following test to check whether the issue is real:

  @@ -736,8 +736,20 @@ static void piix_set_piomode(struct ata_
   			(timings[pio][1] &lt;&lt; 8);
   	}
   	pci_write_config_word(dev, master_port, master_data);
  -	if (is_slave)
  +	if (is_slave) {
  +		if (ap-&gt;port_no == 0) {
  +			u8 tmp = slave_data;
  +
  +			while (slave_data == tmp) {
  +				pci_read_config_byte(dev, slave_port, &amp;tmp);
  +				msleep(50);
  +			}
  +
  +			dev_printk(KERN_ERR, &amp;dev-&gt;dev, "PATA parallel scan "
  +				   "race detected\n");
  +		}
   		pci_write_config_byte(dev, slave_port, slave_data);
  +	}

   	/* Ensure the UDMA bit is off - it will be turned back on if
   	   UDMA is selected */

and it indeed triggered the error message.

Lets fix all such races by adding an extra locking to -&gt;set_piomode
and -&gt;set_dmamode methods for PATA controllers.

[ Alan: would be better to take the host lock in libata-core for these
  cases so that we fix all the adapters in one swoop.  "Looks fine as a
  temproary quickfix tho" ]

Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ahci: add workaround for on-board 5723s on some gigabyte boards</title>
<updated>2009-08-12T10:21:32+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-08-04T05:30:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5594639aab8b5614cb27a3e5b2b627505cbcd137'/>
<id>5594639aab8b5614cb27a3e5b2b627505cbcd137</id>
<content type='text'>
Some gigabytes have on-board SIMG5723s connected to JMB ahcis.  These
are used to implement hardware raid.  Unfortunately some firmware
revisions on these 5723s don't bring the link down when all the
downstream ports are unoccupied while not responding to reset protocol
which makes libata think that there's device attached to the port but
is not responding and retry.  This results in painfully wrong boot
detection time for these ports when they're empty.

This patch quirks those boards such that ahci gives up after the
initial timeout.  Combined with parallel probing, this gives quick
enough probing and also is safe because SIMG5723 will respond to the
first try if any of the downstream ports is occupied.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Marc Bowes &lt;marcbowes@gmail.com&gt;
Reported-by: Nicolas Mailhot &lt;Nicolas.Mailhot@LaPoste.net&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some gigabytes have on-board SIMG5723s connected to JMB ahcis.  These
are used to implement hardware raid.  Unfortunately some firmware
revisions on these 5723s don't bring the link down when all the
downstream ports are unoccupied while not responding to reset protocol
which makes libata think that there's device attached to the port but
is not responding and retry.  This results in painfully wrong boot
detection time for these ports when they're empty.

This patch quirks those boards such that ahci gives up after the
initial timeout.  Combined with parallel probing, this gives quick
enough probing and also is safe because SIMG5723 will respond to the
first try if any of the downstream ports is occupied.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Marc Bowes &lt;marcbowes@gmail.com&gt;
Reported-by: Nicolas Mailhot &lt;Nicolas.Mailhot@LaPoste.net&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ahci: Soften up the dmesg on SB600 PMP softreset failure recovery</title>
<updated>2009-08-12T10:21:24+00:00</updated>
<author>
<name>Shane Huang</name>
<email>shane.huang@amd.com</email>
</author>
<published>2009-08-05T02:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b6931c1fbaf7fda9ea7f120228a96600d7090049'/>
<id>b6931c1fbaf7fda9ea7f120228a96600d7090049</id>
<content type='text'>
Too strong words led to spurious bug reports: Novell bugzilla #527748,
RedHat bugzilla #468800. This patch is used to soften up the dmesg on
SB600 PMP softreset failure recovery, so as to remove the scariness and
concern from community.

Reported-by: pgnet Dev &lt;pgnet.dev@gmail.com&gt;
Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Cc: 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>
Too strong words led to spurious bug reports: Novell bugzilla #527748,
RedHat bugzilla #468800. This patch is used to soften up the dmesg on
SB600 PMP softreset failure recovery, so as to remove the scariness and
concern from community.

Reported-by: pgnet Dev &lt;pgnet.dev@gmail.com&gt;
Signed-off-by: Shane Huang &lt;shane.huang@amd.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sata_nv: MSI support, disabled by default</title>
<updated>2009-08-12T10:20:29+00:00</updated>
<author>
<name>Tony Vroon</name>
<email>tony@linx.net</email>
</author>
<published>2009-08-05T23:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=51c8949950647afeeb897e08dd75ad99078adb50'/>
<id>51c8949950647afeeb897e08dd75ad99078adb50</id>
<content type='text'>
At least the nVidia MCP55 controller quite happily supports MSI.
This adds an option to use it. It is disabled by default.
As per feedback by Robert Hancock, it will honour the user
request as the kernel will not enable MSI where the controller
or the specific system configuration do not support it.

Signed-off-by: Tony Vroon &lt;tony@linx.net&gt;
Cc: Robert Hancock &lt;hancockrwd@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>
At least the nVidia MCP55 controller quite happily supports MSI.
This adds an option to use it. It is disabled by default.
As per feedback by Robert Hancock, it will honour the user
request as the kernel will not enable MSI where the controller
or the specific system configuration do not support it.

Signed-off-by: Tony Vroon &lt;tony@linx.net&gt;
Cc: Robert Hancock &lt;hancockrwd@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: OCZ Vertex can't do HPA</title>
<updated>2009-08-12T10:17:33+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-08-06T16:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7831387bda72af3059be48d39846d3eb6d8ce2f6'/>
<id>7831387bda72af3059be48d39846d3eb6d8ce2f6</id>
<content type='text'>
OCZ Vertex SSD can't do HPA and not in a usual way.  It reports HPA,
allows unlocking but then fails all IOs which fall in the unlocked
area.  Quirk it so that HPA unlocking is not used for the device.

Reported by Daniel Perup in bnc#522414.

 https://bugzilla.novell.com/show_bug.cgi?id=522414

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Daniel Perup &lt;probe@spray.se&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OCZ Vertex SSD can't do HPA and not in a usual way.  It reports HPA,
allows unlocking but then fails all IOs which fall in the unlocked
area.  Quirk it so that HPA unlocking is not used for the device.

Reported by Daniel Perup in bnc#522414.

 https://bugzilla.novell.com/show_bug.cgi?id=522414

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Daniel Perup &lt;probe@spray.se&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pata_atiixp: fix second channel support</title>
<updated>2009-08-12T10:17:29+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>bzolnier@gmail.com</email>
</author>
<published>2009-08-06T15:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1fd4bbec8c0d6db96b02141f324066afa2e77e89'/>
<id>1fd4bbec8c0d6db96b02141f324066afa2e77e89</id>
<content type='text'>
PIO and MWDMA timings are never programmed for the second channel
because timing registers are treated as 16-bit long ones.

The bug is an attixp -&gt; pata_atiixp regression and goes back to:

	commit 669a5db411d85a14f86cd92bc16bf7ab5b8aa235
	Author: Jeff Garzik &lt;jeff@garzik.org&gt;
	Date:   Tue Aug 29 18:12:40 2006 -0400

	    [libata] Add a bunch of PATA drivers.

Cc: Krystian Juskowiak &lt;jusko@tlen.pl&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Borislav Petkov &lt;bbpetkov@yahoo.de&gt;
Cc: Robert Hancock &lt;hancockrwd@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@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>
PIO and MWDMA timings are never programmed for the second channel
because timing registers are treated as 16-bit long ones.

The bug is an attixp -&gt; pata_atiixp regression and goes back to:

	commit 669a5db411d85a14f86cd92bc16bf7ab5b8aa235
	Author: Jeff Garzik &lt;jeff@garzik.org&gt;
	Date:   Tue Aug 29 18:12:40 2006 -0400

	    [libata] Add a bunch of PATA drivers.

Cc: Krystian Juskowiak &lt;jusko@tlen.pl&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Borislav Petkov &lt;bbpetkov@yahoo.de&gt;
Cc: Robert Hancock &lt;hancockrwd@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;bzolnier@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pata_at91: fix resource release</title>
<updated>2009-08-12T10:16:47+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-08-07T02:15:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=df9eba8c9febf53782ef896518e7177999d98188'/>
<id>df9eba8c9febf53782ef896518e7177999d98188</id>
<content type='text'>
Julias Lawall discovered that pata_at91 wasn't freeing a memory region
allocated with kzalloc() on init failure paths.  Upon review,
pata_at91 also seems to be doing unnecessary explicit resource
releases for managed resources too.  Convert memory allocation to
managed one and drop unnecessary explicit resource releases.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Julia Lawall &lt;julia@diku.dk&gt;
Cc: Sergey Matyukevich &lt;geomatsi@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>
Julias Lawall discovered that pata_at91 wasn't freeing a memory region
allocated with kzalloc() on init failure paths.  Upon review,
pata_at91 also seems to be doing unnecessary explicit resource
releases for managed resources too.  Convert memory allocation to
managed one and drop unnecessary explicit resource releases.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Julia Lawall &lt;julia@diku.dk&gt;
Cc: Sergey Matyukevich &lt;geomatsi@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: accept late unlocking of HPA</title>
<updated>2009-07-29T01:07:09+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-07-15T08:11:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5920dadfb4aec6c1372c5570e71bcd3b4837e63c'/>
<id>5920dadfb4aec6c1372c5570e71bcd3b4837e63c</id>
<content type='text'>
On certain configurations, HPA isn't or can't be unlocked during
probing but it somehow ends up unlocked afterwards.  In the following
thread, the problem can be reliably reproduced after resuming from
STR.  The BIOS turns on HPA during boot but forgets to do it during
resume.

  http://thread.gmane.org/gmane.linux.kernel/858310

This patch updates libata revalidation such that it considers native
n_sectors.  If the device size has increased to match native
n_sectors, it's assumed that HPA has been unlocked involuntarily and
the device is recognized as the same one.  This should be fairly safe
while nicely working around the problem.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Christof Warlich &lt;christof@warlich.name&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On certain configurations, HPA isn't or can't be unlocked during
probing but it somehow ends up unlocked afterwards.  In the following
thread, the problem can be reliably reproduced after resuming from
STR.  The BIOS turns on HPA during boot but forgets to do it during
resume.

  http://thread.gmane.org/gmane.linux.kernel/858310

This patch updates libata revalidation such that it considers native
n_sectors.  If the device size has increased to match native
n_sectors, it's assumed that HPA has been unlocked involuntarily and
the device is recognized as the same one.  This should be fairly safe
while nicely working around the problem.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Christof Warlich &lt;christof@warlich.name&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libata: Updates and fixes for pata_at91 driver</title>
<updated>2009-07-29T01:07:05+00:00</updated>
<author>
<name>Sergey Matyukevich</name>
<email>geomatsi@gmail.com</email>
</author>
<published>2009-07-16T18:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7d084d96fdf1d791cb171da57efc1ca89d68dd6c'/>
<id>7d084d96fdf1d791cb171da57efc1ca89d68dd6c</id>
<content type='text'>
Please consider the following updates and fixes for pata_at91 driver.

* Removed extra headers
	Here we need only static memory controller properties, which are
	contained in generic header at91sam9_smc.h.
	No need to include any specific headers for at91sam9260 SoC.

* No harsh BUG_ON for get_clk in set_smc_timing function
        get_clk is now performed in driver probing function,
	        probing fails if master clock is not available

* Fixed uint/ulong mess in calc_mck_cycles function

Signed-off-by: Sergey Matyukevich &lt;geomatsi@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>
Please consider the following updates and fixes for pata_at91 driver.

* Removed extra headers
	Here we need only static memory controller properties, which are
	contained in generic header at91sam9_smc.h.
	No need to include any specific headers for at91sam9260 SoC.

* No harsh BUG_ON for get_clk in set_smc_timing function
        get_clk is now performed in driver probing function,
	        probing fails if master clock is not available

* Fixed uint/ulong mess in calc_mck_cycles function

Signed-off-by: Sergey Matyukevich &lt;geomatsi@gmail.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ata_piix: Add new short cable ID</title>
<updated>2009-07-29T01:06:53+00:00</updated>
<author>
<name>Steve Conklin</name>
<email>sconklin@canonical.com</email>
</author>
<published>2009-07-16T21:31:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=760cdb7760be928e85a021552253eb1b39acdf37'/>
<id>760cdb7760be928e85a021552253eb1b39acdf37</id>
<content type='text'>
OriginalAuthor: Tony Espy &lt;espy@canonical.com&gt;
Signed-off-by: Steve Conklin &lt;sconklin@canonical.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>
OriginalAuthor: Tony Espy &lt;espy@canonical.com&gt;
Signed-off-by: Steve Conklin &lt;sconklin@canonical.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
