-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug-tag-collisions
36 lines (30 loc) · 1 KB
/
debug-tag-collisions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
debug tag collisions
From: Stephen M. Cameron <[email protected]>
---
drivers/scsi/hpsa.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e5718df..cc5fc8d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -5703,6 +5703,14 @@ static int hpsa_get_cmd_index(struct scsi_cmnd *scmd)
return idx;
}
+static void print_scsi_cmd(struct ctlr_info *h, struct scsi_cmnd *scmd, int idx)
+{
+ char format[50];
+
+ sprintf(format, "Tag %d: CDB: %dph\n", idx, scmd->cmd_len);
+ dev_warn(&h->pdev->dev, format, scmd->cmnd);
+}
+
/*
* For operations with an associated SCSI command, a command block is allocated
* at init, and managed by cmd_tagged_alloc() and cmd_tagged_free() using the
@@ -5737,6 +5745,7 @@ static struct CommandList *cmd_tagged_alloc(struct ctlr_info *h,
dev_warn(&h->pdev->dev,
"tag collision (tag=%d) in cmd_tagged_alloc().\n",
idx);
+ print_scsi_cmd(h, scmd, idx);
}
hpsa_cmd_partial_init(h, idx, c);