diff options
author | Sreekanth Reddy <sreekanth.reddy@broadcom.com> | 2019-09-13 15:04:43 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-10-01 04:32:47 +0200 |
commit | dd180e4eedfd85b80020a6fd566601f4765a9d69 (patch) | |
tree | ba2d5555414e885f88169e3c885bd0274dd087cd | |
parent | scsi: mpt3sas: Maintain owner of buffer through UniqueID (diff) | |
download | linux-dd180e4eedfd85b80020a6fd566601f4765a9d69.tar.xz linux-dd180e4eedfd85b80020a6fd566601f4765a9d69.zip |
scsi: mpt3sas: clear release bit when buffer reregistered
Clear MPT3_DIAG_BUFFER_IS_RELEASED bit once diag buffer is re-registered
after reading the buffer, else driver won't release the buffer and return
the 'diag release' command with -EINVAL status saying that buffer is
already released.
Link: https://lore.kernel.org/r/1568379890-18347-7-git-send-email-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index a14ff88db54b..504e035a90c4 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -2367,6 +2367,8 @@ _ctl_diag_read_buffer(struct MPT3SAS_ADAPTER *ioc, void __user *arg) if (ioc_status == MPI2_IOCSTATUS_SUCCESS) { ioc->diag_buffer_status[buffer_type] |= MPT3_DIAG_BUFFER_IS_REGISTERED; + ioc->diag_buffer_status[buffer_type] &= + ~MPT3_DIAG_BUFFER_IS_RELEASED; dctlprintk(ioc, ioc_info(ioc, "%s: success\n", __func__)); } else { ioc_info(ioc, "%s: ioc_status(0x%04x) log_info(0x%08x)\n", |