ata: libata-eh: Increase STANDBY IMMEDIATE timeout
authorMatt Vollrath <tactii@gmail.com>
Fri, 24 Jul 2026 07:39:42 +0000 (03:39 -0400)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 28 Jul 2026 03:04:17 +0000 (12:04 +0900)
commit1e024d2b41ee32bc06818f7f09a3562c58842cf9
tree631b9781c4f6cf1081fb9a758dc05a2814dc5cf9
parentaec49a34d928a0ecdea85bd9f6b4114b668b68b8
ata: libata-eh: Increase STANDBY IMMEDIATE timeout

Correct a previous change (see Fixes) which reduced the standby timeout
from 30 to 5 seconds. Increase it to 15 seconds.

I was troubleshooting an error spotted during system suspend:

    [ 1217.152867] ata1.00: Entering standby power mode
    [ 1222.322948] ata1.00: qc timeout after 5000 msecs (cmd 0xe0)
    [ 1222.324010] ata1.00: STANDBY IMMEDIATE failed (err_mask=0x4)

This drive is a Samsung 870 EVO SSD in good SMART standing, and I wasn't
aware of any reason it should be taking so long to standby. The issue is
intermittent, but I observed it sometimes taking 7 seconds to manually
standby. I assume this was interruption of background maintenance after
a power outage.

As a desktop user, I would prefer to wait the extra 2 seconds at suspend
to let the drive finish its business rather than drop the rails from
under it.

The change from 30 to 5 seconds was implicit when switching suspend
from START STOP UNIT to an internal command with no timeout table entry.
No reason was stated for the change.

Fixes: aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop")
Cc: stable@vger.kernel.org
Signed-off-by: Matt Vollrath <tactii@gmail.com>
Assisted-by: Claude:claude-5-fable
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
drivers/ata/libata-eh.c
include/linux/libata.h