linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org,
	suganath-prabu.subramani@broadcom.com,
	sathya.prakash@broadcom.com,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Subject: [PATCH 06/13] mpt3sas: clear release bit when buffer reregistered
Date: Fri, 13 Sep 2019 09:04:43 -0400	[thread overview]
Message-ID: <1568379890-18347-7-git-send-email-sreekanth.reddy@broadcom.com> (raw)
In-Reply-To: <1568379890-18347-1-git-send-email-sreekanth.reddy@broadcom.com>

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.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index a14ff88..504e035 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",
-- 
1.8.3.1


  parent reply	other threads:[~2019-09-13 13:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 13:04 [PATCH 00/13] Enhancements w.r.t to diag buffer and few bug fixes Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 01/13] mpt3sas: Register trace buffer based on NVDATA settings Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 02/13] mpt3sas: Display message before releasing diag buffer Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 03/13] mpt3sas: Fix clear pending bit in ioctl status Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 04/13] mpt3sas: Free diag buffer without any status check Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 05/13] mpt3sas: Maintain owner of buffer through UniqueID Sreekanth Reddy
2019-09-13 13:04 ` Sreekanth Reddy [this message]
2019-09-13 13:04 ` [PATCH 07/13] mpt3sas: Reuse diag buffer allocated at load time Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 08/13] mpt3sas: Add app owned flag support for diag buffer Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 09/13] mpt3sas: Fail release cmnd if diag buffer is released Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 10/13] mpt3sas: Use Component img header to get Package ver Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 11/13] mpt3sas: Reject NVMe Encap cmnds to unsupported HBA Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 12/13] mpt3sas: Fix module parameter max_msix_vectors Sreekanth Reddy
2019-09-13 13:04 ` [PATCH 13/13] mpt3sas: Bump mpt3sas driver version to 32.100.00.00 Sreekanth Reddy
2019-10-01  2:34 ` [PATCH 00/13] Enhancements w.r.t to diag buffer and few bug fixes Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1568379890-18347-7-git-send-email-sreekanth.reddy@broadcom.com \
    --to=sreekanth.reddy@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).