Skip to contentSkip to conversation

cxlflash: Clear AFU RRQ following reset

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 28/29 cxlflash: Clear AFU RRQ following reset

The AFU RRQ in host memory needs to be cleared after each reset to avoid stale entries from being processed by the AFU.

---
 drivers/scsi/cxlflash/main.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/scsi/cxlflash/main.c +3 -0
index a5b45ed..0487fac 100644
@@ -1609,6 +1609,9 @@ static int start_afu(struct cxlflash_cfg *cfg)
 
 	init_pcr(cfg);
 
+	/* After an AFU reset, RRQ entries are stale, clear them */
+	memset(&afu->rrq_entry, 0, sizeof(afu->rrq_entry));
+
 	/* Initialize RRQ pointers */
 	afu->hrrq_start = &afu->rrq_entry[0];
 	afu->hrrq_end = &afu->rrq_entry[NUM_RRQ_ENTRY - 1];
Signature · 1 line
2.1.0