Commit 3fe5185
scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue
When issued LUN reset under heavy I/O we hit the qedi WARN_ON because of a
mismatch in firmware I/O cmd cleanup request count and I/O cmd cleanup
response count received. The mismatch is because of a race caused by the
postfix increment of cmd_cleanup_cmpl.
[qedi_clearsq:1295]:18: fatal error, need hard reset, cid=0x0
WARNING: CPU: 48 PID: 110963 at drivers/scsi/qedi/qedi_fw.c:1296 qedi_clearsq+0xa5/0xd0 [qedi]
CPU: 48 PID: 110963 Comm: kworker/u130:0 Kdump: loaded Tainted: G W
Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 04/15/2020
Workqueue: iscsi_conn_cleanup iscsi_cleanup_conn_work_fn [scsi_transport_iscsi]
RIP: 0010:qedi_clearsq+0xa5/0xd0 [qedi]
RSP: 0018:ffffac2162c7fd98 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff975213c40ab8 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff9761bf816858 RDI: ffff9761bf816858
RBP: ffff975247018628 R08: 000000000000522c R09: 000000000000005b
R10: 0000000000000000 R11: ffffac2162c7fbd8 R12: ffff97522e1b2be8
R13: 0000000000000000 R14: ffff97522e1b2800 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff9761bf800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1a34e3e1a0 CR3: 0000000108bb2000 CR4: 0000000000350ee0
Call Trace:
qedi_ep_disconnect+0x533/0x550 [qedi]
? iscsi_dbg_trace+0x63/0x80 [scsi_transport_iscsi]
? _cond_resched+0x15/0x30
? iscsi_suspend_queue+0x19/0x40 [libiscsi]
iscsi_ep_disconnect+0xb0/0x130 [scsi_transport_iscsi]
iscsi_cleanup_conn_work_fn+0x82/0x130 [scsi_transport_iscsi]
process_one_work+0x1a7/0x360
? create_worker+0x1a0/0x1a0
worker_thread+0x30/0x390
? create_worker+0x1a0/0x1a0
kthread+0x116/0x130
? kthread_flush_work_fn+0x10/0x10
ret_from_fork+0x22/0x40
---[ end trace 5f1441f59082235c ]---
Link: https://lore.kernel.org/r/20211203095218.5477-1-mrangankar@marvell.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent 6539262 commit 3fe5185
3 files changed
Lines changed: 17 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
736 | 735 | | |
737 | 736 | | |
738 | 737 | | |
| |||
812 | 811 | | |
813 | 812 | | |
814 | 813 | | |
815 | | - | |
816 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
820 | 819 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | 820 | | |
826 | 821 | | |
827 | 822 | | |
| |||
1163 | 1158 | | |
1164 | 1159 | | |
1165 | 1160 | | |
1166 | | - | |
| 1161 | + | |
1167 | 1162 | | |
1168 | 1163 | | |
1169 | 1164 | | |
| |||
1215 | 1210 | | |
1216 | 1211 | | |
1217 | 1212 | | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1223 | 1217 | | |
1224 | 1218 | | |
1225 | 1219 | | |
1226 | 1220 | | |
1227 | | - | |
| 1221 | + | |
1228 | 1222 | | |
1229 | 1223 | | |
1230 | 1224 | | |
| |||
1233 | 1227 | | |
1234 | 1228 | | |
1235 | 1229 | | |
1236 | | - | |
| 1230 | + | |
1237 | 1231 | | |
1238 | 1232 | | |
1239 | 1233 | | |
| |||
1242 | 1236 | | |
1243 | 1237 | | |
1244 | 1238 | | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1250 | 1243 | | |
1251 | 1244 | | |
1252 | 1245 | | |
| |||
1266 | 1259 | | |
1267 | 1260 | | |
1268 | 1261 | | |
1269 | | - | |
| 1262 | + | |
1270 | 1263 | | |
1271 | 1264 | | |
1272 | 1265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
0 commit comments