Skip to contentSkip to conversation

cxlflash: Protect TMF waitq with spinlock

PATCH Superseded Matthew R. Ochs 1 participant 1 message Sep 11, 2015 SCSI

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 2855b09..c8327ac 100644
@@ -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