From nobody Fri Jul 24 21:52:33 2026 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77F093AD501 for ; Fri, 24 Jul 2026 07:41:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784878878; cv=none; b=afEKvGroxB471QgT/J2KZ20azztPtcnsB/x2405Ymm6H78JiQXHF7bo+m8rAZ0M0JuoC/tojjMd4aZgZ2Avfhb8SCdrB7dlEOQzMlvCHa0QcXyZ967HP44DdrfcU73tXKvvTeprqLz/O/6Vcrev/ylp58oApHQeD55J+pUSkBXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784878878; c=relaxed/simple; bh=v7KytCFHT9shhvp5Rc09FYDEUjds27ni+ytJOXNzO/A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YJEaY/TnEWhU70iorsFcTdWtP9DhFHGDcNPC/sq7NETPfTHeg4EL4XeIz17ocoxWt7IMRLzauNLVPlJj0ATISRWNAt0gw06YujmzxI/ssW5KXHXTdVNPP4mE7+rURT53K5upu6MP36PWj/qWV2qFE6go5gb2FdcmzZ2tSLhuQzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=tBChoWxq; arc=none smtp.client-ip=209.85.215.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tBChoWxq" Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-cb5a6aa8760so97662a12.1 for ; Fri, 24 Jul 2026 00:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784878876; x=1785483676; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=2/zWtQhEGENWbHFCLZBJq7PVW34eGxTfKARUkU/qJyY=; b=tBChoWxqbSzMk4R8/+zuEuGcBa5sf6jg1HuoBAZESk60iAo43npXsh05MdWoDkWdCM U5UBwcp7yPVdF7hdtf7kkBLX44u2XgNqe1D9FnMeldvKTN63/pQTrZdpgs4I8eeyPE1L rW4imZJgtS7Ea+hcsu6YUBVRe33i+6ErEtQeG85tfFaktA22MLxkM/uiDHakYOYn5HrA vMr+g4Clo7porYLxsPHEzuNYp/jMmh7vG++iWNbP6VLD4Of6Axy8re1BytB/z8/tOnTT 2jN/MypPowVqN11lurkWBNCx/FLGJpBbvEUJFFEDrkY6fg1I3ZcZuCG/rZKANa27WSui tBMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784878876; x=1785483676; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2/zWtQhEGENWbHFCLZBJq7PVW34eGxTfKARUkU/qJyY=; b=Um8mzNFZi4b5VOIy29KV4IsAv7wClomCefDKpQznDpzd3Hhf6ZStQCuV4xnTh4u2YJ jL/TECM4UADVQHWdqZUro3yXTtxh9GH0sWRs5uXkaxRop0qcp+PGzwovT41TpqzUsoRF ORs0x7XjPjCH2OPEORxgch0Z0enPDjicB3gEzy1spB4m36RE00HEtoEEGP2Lq3J3ZiKz DczbP1dM8c/+0RiBP8mG/mlL++uLZjJg5eTFF3UJqgik7piz7G080pNqEl2YD6coDlG7 LMgBMfShzp5Sj7Exr21ibQcwEy4OnicztKpp7ZgSteJS28mIo8eoQzSxSLuNIIsHZEhX dv4g== X-Forwarded-Encrypted: i=1; AHgh+RqR1CJL6TsYLG77ykCvAEFw+Zj12U5u4ImRtGvB6tpyRdzS4Qp+mgEb3bCDCNqbPn80ah2s4J0RNWMAchs=@vger.kernel.org X-Gm-Message-State: AOJu0Ywa3fx0b+3HC0MhD6vwQ2k3XkKaZMtVVYiG6+iena/UAMb2xX9z kyLxNrWPt68dCvEVJQWP5LJkCz3xXij4pZ4hIoBZxpLMP5RGOIvuraxh X-Gm-Gg: AR+sD13dGue4xxSusgtTU0xg5Qs9NuluCThGMOaBBfjSMhz/+q70WaQ0V7vmp6EiDju 4vr2CvU16/C5sZI80noxdXt58hc1tae6Vg+1fjS5k/JTQ60/P0jad9bDkcY7A40frBfcxnP2uCy vdm8lEGY1BHmlPtBaB4zZduTIPd+tFV/gUUcAGyzwh+fXXZKHsx9LayMrly88BBgvTsYwE5H8yQ g6APeJMJnmuCZNdp0ztP47FXEpfAPcXWqpUcLb4fDqgvbLaYn97Jg5Ua4E3HxJeh5pZxsl5FhkD ee6HKljkYj/Ad85E540S5ILd4r0GejqxgkDpfzWcoSpZmHv3ENRQ0yn0ofnECfj5mmlr3vS9Yi6 FZNODvZDkF/6T7HViQyu5zk/z7bD9/LIIwsDRMVij5yHEclC6/S9h9AP9iU8NjPfHnHuq X-Received: by 2002:a05:6a20:da12:b0:3c3:6544:5eb2 with SMTP id adf61e73a8af0-3c44b245fb7mr7317352637.55.1784878875550; Fri, 24 Jul 2026 00:41:15 -0700 (PDT) Received: from devobuntu.lan ([2600:6c5c:6b00:ba4::23]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3147e1c7ff4sm29788271eec.27.2026.07.24.00.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 00:41:15 -0700 (PDT) From: Matt Vollrath To: Damien Le Moal , Niklas Cassel Cc: "Martin K . Petersen" , Hannes Reinecke , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Matt Vollrath , stable@vger.kernel.org Subject: [PATCH] ata: libata-eh: Increase STANDBY IMMEDIATE timeout Date: Fri, 24 Jul 2026 03:39:42 -0400 Message-ID: <20260724073942.1751381-1-tactii@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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=3D0x4) 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_s= tart_stop") Cc: stable@vger.kernel.org Signed-off-by: Matt Vollrath Assisted-by: Claude:claude-5-fable --- drivers/ata/libata-eh.c | 8 ++++++++ include/linux/libata.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 05df7ea6954a..46947ed0c657 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -106,6 +106,12 @@ static const unsigned int ata_eh_flush_timeouts[] =3D { UINT_MAX, }; =20 +static const unsigned int ata_eh_standby_timeouts[] =3D { + 15000, /* Some drives may be slow to standby */ + /* but don't hold up a suspend too long waiting for them */ + UINT_MAX, +}; + static const unsigned int ata_eh_other_timeouts[] =3D { 5000, /* same rationale as identify timeout */ 10000, /* ditto */ @@ -147,6 +153,8 @@ ata_eh_cmd_timeout_table[ATA_EH_CMD_TIMEOUT_TABLE_SIZE]= =3D { .timeouts =3D ata_eh_other_timeouts, }, { .commands =3D CMDS(ATA_CMD_FLUSH, ATA_CMD_FLUSH_EXT), .timeouts =3D ata_eh_flush_timeouts }, + { .commands =3D CMDS(ATA_CMD_STANDBYNOW1), + .timeouts =3D ata_eh_standby_timeouts }, { .commands =3D CMDS(ATA_CMD_VERIFY), .timeouts =3D ata_eh_reset_timeouts }, }; diff --git a/include/linux/libata.h b/include/linux/libata.h index 96e626d6a7ca..6c0d385b2cde 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -425,7 +425,7 @@ enum { /* This should match the actual table size of * ata_eh_cmd_timeout_table in libata-eh.c. */ - ATA_EH_CMD_TIMEOUT_TABLE_SIZE =3D 8, + ATA_EH_CMD_TIMEOUT_TABLE_SIZE =3D 9, =20 /* User visible DMA mask for DMA control. DO NOT renumber. */ ATA_DMA_MASK_ATA =3D (1 << 0), /* DMA on ATA Disk */ base-commit: 4d99a91574c420decab56cc880fad0dc15b8a7a3 --=20 2.43.0