<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/ata/libata-eh.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-08-25T09:09:28Z</updated>
<entry>
<title>ata: libata-eh: Add missing command name</title>
<updated>2022-08-25T09:09:28Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2022-08-11T17:29:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e303213d48fd6622bce82b3d22918422fa3cd0f4'/>
<id>urn:sha1:e303213d48fd6622bce82b3d22918422fa3cd0f4</id>
<content type='text'>
commit d3122bf9aa4c974f5e2c0112f799757b3a2779da upstream.

Add the missing command name for ATA_CMD_NCQ_NON_DATA to
ata_get_cmd_name().

Fixes: 661ce1f0c4a6 ("libata/libsas: Define ATA_CMD_NCQ_NON_DATA")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libata: fix read log timeout value</title>
<updated>2021-11-26T10:48:18Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2021-11-04T08:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=985d5b3f2b3c8837431648a79bbee9fc9193dcb4'/>
<id>urn:sha1:985d5b3f2b3c8837431648a79bbee9fc9193dcb4</id>
<content type='text'>
commit 68dbbe7d5b4fde736d104cbbc9a2fce875562012 upstream.

Some ATA drives are very slow to respond to READ_LOG_EXT and
READ_LOG_DMA_EXT commands issued from ata_dev_configure() when the
device is revalidated right after resuming a system or inserting the
ATA adapter driver (e.g. ahci). The default 5s timeout
(ATA_EH_CMD_DFL_TIMEOUT) used for these commands is too short, causing
errors during the device configuration. Ex:

...
ata9: SATA max UDMA/133 abar m524288@0x9d200000 port 0x9d200400 irq 209
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata9.00: ATA-9: XXX  XXXXXXXXXXXXXXX, XXXXXXXX, max UDMA/133
ata9.00: qc timeout (cmd 0x2f)
ata9.00: Read log page 0x00 failed, Emask 0x4
ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: NCQ Send/Recv Log not supported
ata9.00: Read log page 0x08 failed, Emask 0x40
ata9.00: 27344764928 sectors, multi 16: LBA48 NCQ (depth 32), AA
ata9.00: Read log page 0x00 failed, Emask 0x40
ata9.00: ATA Identify Device Log not supported
ata9.00: failed to set xfermode (err_mask=0x40)
ata9: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
ata9.00: configured for UDMA/133
...

The timeout error causes a soft reset of the drive link, followed in
most cases by a successful revalidation as that give enough time to the
drive to become fully ready to quickly process the read log commands.
However, in some cases, this also fails resulting in the device being
dropped.

Fix this by using adding the ata_eh_revalidate_timeouts entries for the
READ_LOG_EXT and READ_LOG_DMA_EXT commands. This defines a timeout
increased to 15s, retriable one time.

Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal &lt;damien.lemoal@opensource.wdc.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>libata: don't request sense data on !ZAC ATA devices</title>
<updated>2019-08-04T07:33:22Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2019-06-24T16:32:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9496f98b1bb025cb07fd4b86af35046f36c73dc'/>
<id>urn:sha1:d9496f98b1bb025cb07fd4b86af35046f36c73dc</id>
<content type='text'>
[ Upstream commit ca156e006add67e4beea7896be395160735e09b0 ]

ZAC support added sense data requesting on error for both ZAC and ATA
devices. This seems to cause erratic error handling behaviors on some
SSDs where the device reports sense data availability and then
delivers the wrong content making EH take the wrong actions.  The
failure mode was sporadic on a LITE-ON ssd and couldn't be reliably
reproduced.

There is no value in requesting sense data from non-ZAC ATA devices
while there's a significant risk of introducing EH misbehaviors which
are difficult to reproduce and fix.  Let's do the sense data dancing
only for ZAC devices.

Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Masato Suzuki &lt;masato.suzuki@wdc.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>libata: Fix command retry decision</title>
<updated>2018-08-03T05:55:22Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2018-05-09T00:28:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbc0c24c9c9f51c5b4d429bbd6230a8660628462'/>
<id>urn:sha1:cbc0c24c9c9f51c5b4d429bbd6230a8660628462</id>
<content type='text'>
[ Upstream commit 804689ad2d9b66d0d3920b48cf05881049d44589 ]

For failed commands with valid sense data (e.g. NCQ commands),
scsi_check_sense() is used in ata_analyze_tf() to determine if the
command can be retried. In such case, rely on this decision and ignore
the command error mask based decision done in ata_worth_retry().

This fixes useless retries of commands such as unaligned writes on zoned
disks (TYPE_ZAC).

Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ata: fixes kernel crash while tracing ata_eh_link_autopsy event</title>
<updated>2017-11-30T08:39:04Z</updated>
<author>
<name>Rameshwar Prasad Sahu</name>
</author>
<published>2017-11-02T11:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2946ebe90ecf7f506e3e1fc49d41406bfaade551'/>
<id>urn:sha1:2946ebe90ecf7f506e3e1fc49d41406bfaade551</id>
<content type='text'>
commit f1601113ddc0339a745e702f4fb1ca37d4875e65 upstream.

When tracing ata link error event, the kernel crashes when the disk is
removed due to NULL pointer access by trace_ata_eh_link_autopsy API.
This occurs as the dev is NULL when the disk disappeared. This patch
fixes this crash by calling trace_ata_eh_link_autopsy only if "dev"
is not NULL.

v2 changes:
 Removed direct passing "link" pointer instead of "dev" in trace API.

Signed-off-by: Rameshwar Prasad Sahu &lt;rsahu@apm.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Fixes: 255c03d15a29 ("libata: Add tracepoints")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata</title>
<updated>2016-07-26T21:39:40Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2016-07-26T21:39:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75a442efb1ca613f8d1cc71a32c2c9b0aefae4a5'/>
<id>urn:sha1:75a442efb1ca613f8d1cc71a32c2c9b0aefae4a5</id>
<content type='text'>
Pull libata updates from Tejun Heo:
 "libata saw quite a bit of activities in this cycle:

   - SMR drive support still being worked on

   - bug fixes and improvements to misc SCSI command emulation

   - some low level driver updates"

* 'for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (39 commits)
  libata-scsi: better style in ata_msense_*()
  AHCI: Clear GHC.IS to prevent unexpectly asserting INTx
  ata: sata_dwc_460ex: remove redundant dev_err call
  ata: define ATA_PROT_* in terms of ATA_PROT_FLAG_*
  libata: remove ATA_PROT_FLAG_DATA
  libata: remove ata_is_nodata
  ata: make lba_{28,48}_ok() use ATA_MAX_SECTORS{,_LBA48}
  libata-scsi: minor cleanup for ata_scsi_zbc_out_xlat
  libata-scsi: Fix ZBC management out command translation
  libata-scsi: Fix translation of REPORT ZONES command
  ata: Handle ATA NCQ NO-DATA commands correctly
  libata-eh: decode all taskfile protocols
  ata: fixup ATA_PROT_NODATA
  libsas: use ata_is_ncq() and ata_has_dma() accessors
  libata: use ata_is_ncq() accessors
  libata: return boolean values from ata_is_*
  libata-scsi: avoid repeated calculation of number of TRIM ranges
  libata-scsi: reject WRITE SAME (16) with n_block that exceeds limit
  libata-scsi: rename ata_msense_ctl_mode() to ata_msense_control()
  libata-scsi: fix D_SENSE bit relection in control mode page
  ...
</content>
</entry>
<entry>
<title>ata: Handle ATA NCQ NO-DATA commands correctly</title>
<updated>2016-07-15T12:08:13Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2016-07-14T00:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b844b63ddfb65aef923eaabe0420196fd71dd13'/>
<id>urn:sha1:5b844b63ddfb65aef923eaabe0420196fd71dd13</id>
<content type='text'>
Add a new taskfile protocol ATA_PROT_NCQ_NODATA to handle
ATA NCQ NO-DATA commands correctly.
And fixup ata_scsi_zbc_out_xlat() to use it.

Signed-off-by: Hannes Reinecke &lt;hare@suse.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>libata-eh: decode all taskfile protocols</title>
<updated>2016-07-14T14:47:23Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2016-07-14T00:05:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b51ba6178f5502e6ab1bba75e91a365bc4c718b'/>
<id>urn:sha1:5b51ba6178f5502e6ab1bba75e91a365bc4c718b</id>
<content type='text'>
Some taskfile protocol values where missing in ata_eh_link_report().

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&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>ata: fixup ATA_PROT_NODATA</title>
<updated>2016-07-14T14:47:20Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2016-07-14T00:05:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd18bc04caeff361a4fff477224fa5b5fe5ce603'/>
<id>urn:sha1:bd18bc04caeff361a4fff477224fa5b5fe5ce603</id>
<content type='text'>
The taskfile protocol is a numeric value, and can not be ORed.  Currently
this is harmless as the protocol is always zeroed before, but if it ever
has a non-zero value the ORing would create incorrect results.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
[hch: updated patch description]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes</title>
<updated>2016-06-18T18:59:01Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2016-06-18T18:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=951d77fd5a541d68eeb7372e72cd4757e3058517'/>
<id>urn:sha1:951d77fd5a541d68eeb7372e72cd4757e3058517</id>
<content type='text'>
</content>
</entry>
</feed>
