Skip to contentSkip to conversation

ata: libata-core: Print timeout value when internal command times

PATCH Applied Tomas Henzl 2 participants 2 messages Aug 10, 2022 – Aug 17, 2022 libata

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ata: libata-core: Print timeout value when internal command times

Printing the timeout value may help in troubleshooting failures.

---
V4: a whitespace change
a switch from an an infinitive to an -ing form in the body a fix to the title prefix
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..9478194740e0 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);
Signature · 1 line
2.37.1
#1 lore raw
Quoted 19 lines · Tomas Henzl

Printing the timeout value may help in troubleshooting failures.

---
V4: a whitespace change
a switch from an an infinitive to an -ing form in the body a fix to the title prefix
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..9478194740e0 100644

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

Quoted 10 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);
 		}
 
 		spin_unlock_irqrestore(ap->lock, flags);

Applied to for-6.1. Thanks !

Signature · 2 lines
Damien Le Moal
Western Digital Research