diff options
author | Matthew R. Ochs <mrochs@linux.vnet.ibm.com> | 2015-10-21 16:15:14 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-10-30 04:18:53 -0400 |
commit | af10483e5e1201e1dcf5836207879e6eb5eb9fd5 (patch) | |
tree | 3c7d5d0950f353446762e1b4b097ab3d4905eb7e /drivers/scsi/cxlflash/main.c | |
parent | f15fbf8d4eb0c20b7c70096788161d69e23f1a9d (diff) |
cxlflash: Fix to prevent stale AFU RRQ
Following an adapter reset, the AFU RRQ that resides in host memory
holds stale data. This can lead to a condition where the RRQ interrupt
handler tries to process stale entries and/or endlessly loops due to an
out of sync generation bit.
To fix, the AFU RRQ in host memory needs to be cleared after each reset.
Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/cxlflash/main.c')
-rw-r--r-- | drivers/scsi/cxlflash/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index eeb1c4798207..c77cb929dacb 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c | |||
@@ -1598,6 +1598,9 @@ static int start_afu(struct cxlflash_cfg *cfg) | |||
1598 | 1598 | ||
1599 | init_pcr(cfg); | 1599 | init_pcr(cfg); |
1600 | 1600 | ||
1601 | /* After an AFU reset, RRQ entries are stale, clear them */ | ||
1602 | memset(&afu->rrq_entry, 0, sizeof(afu->rrq_entry)); | ||
1603 | |||
1601 | /* Initialize RRQ pointers */ | 1604 | /* Initialize RRQ pointers */ |
1602 | afu->hrrq_start = &afu->rrq_entry[0]; | 1605 | afu->hrrq_start = &afu->rrq_entry[0]; |
1603 | afu->hrrq_end = &afu->rrq_entry[NUM_RRQ_ENTRY - 1]; | 1606 | afu->hrrq_end = &afu->rrq_entry[NUM_RRQ_ENTRY - 1]; |