Karan Tilak Kumar 15924b0503 scsi: fnic: Replace sgreset tag with max_tag_id
sgreset is issued with a SCSI command pointer. The device reset code
assumes that it was issued on a hardware queue, and calls block multiqueue
layer. However, the assumption is broken, and there is no hardware queue
associated with the sgreset, and this leads to a crash due to a null
pointer exception.

Fix the code to use the max_tag_id as a tag which does not overlap with the
other tags issued by mid layer.

Tested by running FC traffic for a few minutes, and by issuing sgreset on
the device in parallel.  Without the fix, the crash is observed right away.
With this fix, no crash is observed.

Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://lore.kernel.org/r/20230817182146.229059-1-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-08-25 17:15:09 -04:00
..
2023-04-26 16:07:23 -07:00
2023-04-27 11:53:57 -07:00
2023-04-27 16:36:55 -07:00
2023-05-31 19:59:26 -04:00
2023-05-26 13:52:19 -07:00
2023-04-18 23:01:23 -04:00
2022-06-27 22:56:21 -04:00
2022-02-22 21:11:02 -05:00
2022-05-08 14:28:18 -04:00
2023-04-27 11:53:57 -07:00
2023-06-30 11:57:07 -07:00
2021-12-22 23:41:13 -05:00
2023-06-30 11:57:07 -07:00
2023-05-31 11:36:40 -04:00