Skip to contentSkip to conversation

libata: Print timeout value when internal command times out

PATCH Superseded Tomas Henzl 2 participants 2 messages Aug 4, 2022 – Aug 8, 2022 libata

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 libata: Print timeout value when internal command times out

Print the timeout value may help in troubleshooting failures.

---
V3: rewording subject and description, no functional change
V2: timeout changed to unsigned int as in for-next

 drivers/ata/libata-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/libata-core.c +2 -2
index 826d41f341e4..0fc4782ef4f8 100644
@@ -1578,8 +1578,8 @@ static unsigned ata_exec_internal_sg(struct ata_device *dev,
 			else
 				ata_qc_complete(qc);
 
-			ata_dev_warn(dev, "qc timeout (cmd 0x%x)\n",
-				     command);
+			ata_dev_warn(dev, "qc timeout after %u msecs (cmd 0x%x)\n",
+				timeout, command);
 		}
 
 		spin_unlock_irqrestore(ap->lock, flags);
#1 lore raw
Quoted 1 line · Tomas Henzl

Print the timeout value may help in troubleshooting failures.

s/Print/Printing

Quoted 3 lines

You forgot to fix the patch title prefix. Please change it to "ata: libata-core:".

Quoted 12 lines

---
V3: rewording subject and description, no functional change
V2: timeout changed to unsigned int as in for-next

 drivers/ata/libata-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/libata-core.c +0 -0
index 826d41f341e4..0fc4782ef4f8 100644

drivers/ata/libata-core.c static unsigned ata_exec_internal_sg(struct ata_device *dev, · line 1582

Quoted 7 lines
drivers/ata/libata-core.c +2 -2
@@ -1578,8 +1578,8 @@ static unsigned ata_exec_internal_sg(struct ata_device *dev,
 			else
 				ata_qc_complete(qc);
 
-			ata_dev_warn(dev, "qc timeout (cmd 0x%x)\n",
-				     command);
+			ata_dev_warn(dev, "qc timeout after %u msecs (cmd 0x%x)\n",
+				timeout, command);

Please keep the argument indentation to align with "(".

Quoted 4 lines
drivers/ata/libata-core.c +0 -0
 		}
 
 		spin_unlock_irqrestore(ap->lock, flags);
Signature · 2 lines
Damien Le Moal
Western Digital Research