<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/ata, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-07T21:29:09Z</updated>
<entry>
<title>libata-scsi: disable SCT Write Same for the moment</title>
<updated>2016-12-07T21:29:09Z</updated>
<author>
<name>Nicolai Stange</name>
<email>nicstange@gmail.com</email>
</author>
<published>2016-12-07T21:21:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e185934ff94466b4a449165e5f1c164a44d005f2'/>
<id>urn:sha1:e185934ff94466b4a449165e5f1c164a44d005f2</id>
<content type='text'>
SCT Write Same support had been introduced with
commit 7b2030942859 ("libata: Add support for SCT Write Same")

Some problems, namely excessive userspace segfaults, had been reported at

  http://lkml.kernel.org/r/20160908192736.GA4356@gmail.com

This lead to commit 0ce1b18c42a5 ("libata: Some drives failing on
SCT Write Same") which strived to disable SCT Write Same on !ZAC devices.
Due to the way this was done and to the logic in sd_config_write_same(),
this didn't work for those devices that have
-&gt;max_ws_blocks &gt; SD_MAX_WS10_BLOCKS: for these, -&gt;no_write_same and
-&gt;max_write_same_sectors would still be non-zero,
but -&gt;ws10 == -&gt;ws16 == 0. This would cause sd_setup_write_same_cmnd() to
demultiplex REQ_OP_WRITE_SAME requests to WRITE_SAME, and these in turn
aren't supported by libata-scsi:

  EXT4-fs (dm-1): Delayed block allocation failed for inode 2625094 at
                  logical offset 2032 with max blocks 2 with error 121
  EXT4-fs (dm-1): This should not happen!! Data will be lost

121 == EREMOTEIO is what scsi_io_completion() asserts in case of
invalid opcodes.

Back to the original problem of userspace segfaults: this can be tracked
down to ata_format_sct_write_same() overwriting the input page. Sometimes,
this page is ZERO_PAGE(0) which ceases to be filled with zeros from that
point on. Since ZERO_PAGE(0) is used for userspace .bss mappings, code of
the following is doomed:

  static char *a = NULL; /* .bss */
  ...
  if (a)
    *a = 'a';

This problem is not solved by disabling SCT Write Same for !ZAC devices
only.

It can certainly be fixed, but the final release is quite close -- so
disable SCT Write Same for all ATA devices rather than introducing some
SCT key buffer allocation schemes at this point.

Fixes: 7b2030942859 ("libata: Add support for SCT Write Same")
Signed-off-by: Nicolai Stange &lt;nicstange@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: sata_mv: check for errors when parsing nr-ports from dt</title>
<updated>2016-11-29T16:35:06Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2016-11-29T11:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c3ef39738f74a3759918cc1a1ad099504f9d1b7'/>
<id>urn:sha1:5c3ef39738f74a3759918cc1a1ad099504f9d1b7</id>
<content type='text'>
If the nr-ports property is missing ata_host_alloc_pinfo is called with
n_ports = 0. This results in host-&gt;ports[0] = NULL which later makes
mv_init_host() oops when dereferencing this pointer.

Instead be a bit more cooperative and fail the probing with an error
message.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: always fall back to single-MSI mode</title>
<updated>2016-11-21T16:06:57Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-11-18T13:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6929ef385e09c0065b87fda3e7b872a5070ac783'/>
<id>urn:sha1:6929ef385e09c0065b87fda3e7b872a5070ac783</id>
<content type='text'>
Don't try to guess what the errors from pci_irq_alloc_vectors mean, as
that's too fragile.  Instead always try allocating a single vector
when multi-MSI mode fails.  This makes various intel Desktop and
Laptop CPUs use MSI again.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Michael Marley &lt;michael@michaelmarley.com&gt;
Tested-by: Michael Marley &lt;michael@michaelmarley.com&gt;
Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata-scsi: Fixup ata_gen_passthru_sense()</title>
<updated>2016-11-01T17:30:15Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-10-31T20:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0029dcb5b6e1c23e68f578ce7a3d6c5caba0501'/>
<id>urn:sha1:e0029dcb5b6e1c23e68f578ce7a3d6c5caba0501</id>
<content type='text'>
There's a typo in ata_gen_passthru_sense(), where the first byte
would be overwritten incorrectly later on.

Reported-by: Charles Machalow &lt;csm10495@gmail.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Fixes: 11093cb1ef56 ("libata-scsi: generate correct ATA pass-through sense")
Cc: stable@vger.kernel.org # v4.7+
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: fix the single MSI-X case in ahci_init_one</title>
<updated>2016-10-25T15:43:07Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-10-25T12:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ce57f8af1782fd12d3a81872a4ab97244989802'/>
<id>urn:sha1:0ce57f8af1782fd12d3a81872a4ab97244989802</id>
<content type='text'>
We need to make sure hpriv-&gt;irq is set properly if we don't use per-port
vectors, so switch from blindly assigning pdev-&gt;irq to using
pci_irq_vector, which handles all interrupt types correctly.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Robert Richter &lt;robert.richter@cavium.com&gt;
Tested-by: Robert Richter &lt;robert.richter@cavium.com&gt;
Tested-by: David Daney &lt;ddaney.cavm@gmail.com&gt;
Fixes: 0b9e2988ab22 ("ahci: use pci_alloc_irq_vectors")
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: fix nvec check</title>
<updated>2016-10-20T17:40:14Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-10-20T15:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a478b097474cd9f2268ab1beaca74ff09e652b9b'/>
<id>urn:sha1:a478b097474cd9f2268ab1beaca74ff09e652b9b</id>
<content type='text'>
commit 17a51f12 ("ahci: only try to use multi-MSI mode if there is more
than 1 port") lead to a case where nvec isn't initialized before it's
used.  Fix this by moving the check into the n_ports conditional.

Reported-and-reviewed-by Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: only try to use multi-MSI mode if there is more than 1 port</title>
<updated>2016-10-19T17:18:16Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-10-18T07:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17a51f12cfbd2814fd35966a069b242569c53e27'/>
<id>urn:sha1:17a51f12cfbd2814fd35966a069b242569c53e27</id>
<content type='text'>
We should only try to allocate multiple MSI or MSI-X vectors if the device
actually has multiple ports.  Otherwise pci_alloc_irq_vectors will return
a single vector due to n_ports = 1, in which case we shouldn't set the
AHCI_HFLAG_MULTI_MSI flag.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Fixes: 0b9e2988 ("ahci: use pci_alloc_irq_vectors")
Reported-by: Emmanuel Benisty &lt;benisty.e@gmail.com&gt;
Tested-by: Emmanuel Benisty &lt;benisty.e@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ahci: qoriq: Revert "ahci: qoriq: Disable NCQ on ls2080a SoC"</title>
<updated>2016-09-30T08:28:51Z</updated>
<author>
<name>Tang Yuantian</name>
<email>Yuantian.Tang@nxp.com</email>
</author>
<published>2016-09-30T06:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ce788d24268a33513d832d9030ceab93f1c2ce2'/>
<id>urn:sha1:1ce788d24268a33513d832d9030ceab93f1c2ce2</id>
<content type='text'>
This reverts commit 640847298e2b7f19 ("ahci: qoriq: Disable NCQ
on ls2080a SoC")

The erratum has been fixed in ls2080a v2.0 and later soc.
In reality, customer will not get any ls2080a v1.0 soc. Neither apply
to any products. So reverting this commit won't create any side effect.

Blacklisting v2.0 could also be a option, but that needs to check the
soc version which is not suitable in the driver.

Signed-off-by: Tang Yuantian &lt;yuantian.tang@nxp.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>pata_at91: Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR</title>
<updated>2016-09-22T15:48:46Z</updated>
<author>
<name>Harman Kalra</name>
<email>harman4linux@gmail.com</email>
</author>
<published>2016-09-21T19:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70a19b7e406da9dc5cea20fedba443374a5cae70'/>
<id>urn:sha1:70a19b7e406da9dc5cea20fedba443374a5cae70</id>
<content type='text'>
Signed-off-by: Harman Kalra &lt;harman4linux@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>ata: Replace BUG() with BUG_ON().</title>
<updated>2016-09-22T15:46:52Z</updated>
<author>
<name>Harman Kalra</name>
<email>harman4linux@gmail.com</email>
</author>
<published>2016-09-21T19:59:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02d9d3cbac53bd59fe18fc32adc7bc7cde1037ae'/>
<id>urn:sha1:02d9d3cbac53bd59fe18fc32adc7bc7cde1037ae</id>
<content type='text'>
Replace BUG() with BUG_ON().
Caught by coccinelle.

Signed-off-by: Harman Kalra &lt;harman4linux@gmail.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
</feed>
