cxlflash: Protect TMF waitq with spinlock
PATCH 14/29 cxlflash: Protect TMF waitq with spinlock
Use a spinlock to protect the TMF waitq instead of borrowing the internal waitq lock. Also introduce a timeout for when the TMF fails to complete so the appropriate status can be sent back to the stack.
Signed-off-by Matthew R. Ochs <[email protected]>
Signed-off-by Manoj N. Kumar <[email protected]>
--- drivers/scsi/cxlflash/common.h | 1 + drivers/scsi/cxlflash/main.c | 55 +++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 22 deletions(-)
drivers/scsi/cxlflash/common.h +1 -0
@@ -126,6 +126,7 @@ struct cxlflash_cfg {struct list_head lluns;/* list of llun_info structs */ wait_queue_head_t tmf_waitq; +spinlock_t tmf_slock;bool tmf_active;wait_queue_head_t reset_waitq;enum cxlflash_state state;
drivers/scsi/cxlflash/main.c +33 -22
107 lines not on this page · raw message
Signature · 1 line
2.1.0