All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
To: linux-scsi@vger.kernel.org, michaelc@cs.wisc.edu
Cc: Jitendra <jitendra.bhivare@avagotech.com>
Subject: [PATCH 06/15] be2iscsi: Added return value check for mgmt_get_all_if_id
Date: Tue, 15 Dec 2015 21:24:57 +0530	[thread overview]
Message-ID: <1450194906-12925-7-git-send-email-jitendra.bhivare@avagotech.com> (raw)
In-Reply-To: <1450194906-12925-1-git-send-email-jitendra.bhivare@avagotech.com>

From: Jitendra <jitendra.bhivare@avagotech.com>

Use of mutex_lock_interruptible can return -EINTR, handle and log
the error.

Signed-off-by: Jitendra <jitendra.bhivare@avagotech.com>
---
 drivers/scsi/be2iscsi/be_iscsi.c |    7 ++++---
 drivers/scsi/be2iscsi/be_mgmt.c  |   10 ++++++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index b7087ba..188d83f 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -367,13 +367,14 @@ beiscsi_set_vlan_tag(struct Scsi_Host *shost,
 		      struct iscsi_iface_param_info *iface_param)
 {
 	struct beiscsi_hba *phba = iscsi_host_priv(shost);
-	int ret = 0;
+	int ret;
 
 	/* Get the Interface Handle */
-	if (mgmt_get_all_if_id(phba)) {
+	ret = mgmt_get_all_if_id(phba);
+	if (ret) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG,
 			    "BS_%d : Getting Interface Handle Failed\n");
-		return -EIO;
+		return ret;
 	}
 
 	switch (iface_param->param) {
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index a41013e..a8a1670 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -1018,8 +1018,9 @@ int mgmt_set_ip(struct beiscsi_hba *phba,
 	uint32_t ip_type;
 	int rc;
 
-	if (mgmt_get_all_if_id(phba))
-		return -EIO;
+	rc = mgmt_get_all_if_id(phba);
+	if (rc)
+		return rc;
 
 	ip_type = (ip_param->param == ISCSI_NET_PARAM_IPV6_ADDR) ?
 		BE2_IPV6 : BE2_IPV4 ;
@@ -1188,8 +1189,9 @@ int mgmt_get_if_info(struct beiscsi_hba *phba, int ip_type,
 	uint32_t ioctl_size = sizeof(struct be_cmd_get_if_info_resp);
 	int rc;
 
-	if (mgmt_get_all_if_id(phba))
-		return -EIO;
+	rc = mgmt_get_all_if_id(phba);
+	if (rc)
+		return rc;
 
 	do {
 		rc = mgmt_alloc_cmd_data(phba, &nonemb_cmd,
-- 
1.7.1


  parent reply	other threads:[~2015-12-15 15:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 15:54 [PATCH 00/15] be2iscsi: driver update 11.0.0.0 Jitendra Bhivare
2015-12-15 15:54 ` [PATCH 01/15] be2iscsi: Fix soft lockup in mgmt_get_all_if_id path using bmbx Jitendra Bhivare
2015-12-18  8:58   ` Hannes Reinecke
2015-12-15 15:54 ` [PATCH 02/15] be2iscsi: Fix mbox synchronization replacing spinlock with mutex Jitendra Bhivare
2015-12-18  8:59   ` Hannes Reinecke
2015-12-20  7:35   ` Mike Christie
2015-12-20  7:47     ` Mike Christie
2015-12-15 15:54 ` [PATCH 03/15] be2iscsi: Fix to use atomic operations for tag_state Jitendra Bhivare
2015-12-18  8:59   ` Hannes Reinecke
2015-12-20  7:44   ` Mike Christie
2015-12-20  9:01     ` Mike Christie
2015-12-20 10:13       ` Mike Christie
2015-12-21  4:47         ` Jitendra Bhivare
2015-12-15 15:54 ` [PATCH 04/15] be2iscsi: Fix to synchronize tag allocation using spin_lock Jitendra Bhivare
2015-12-18  8:59   ` Hannes Reinecke
2015-12-15 15:54 ` [PATCH 05/15] be2iscsi: Set mbox timeout to 30s Jitendra Bhivare
2015-12-18  9:00   ` Hannes Reinecke
2015-12-15 15:54 ` Jitendra Bhivare [this message]
2015-12-18  9:00   ` [PATCH 06/15] be2iscsi: Added return value check for mgmt_get_all_if_id Hannes Reinecke
2015-12-15 15:54 ` [PATCH 07/15] be2iscsi: Fix to remove shutdown entry point Jitendra Bhivare
2015-12-18  9:01   ` Hannes Reinecke
2015-12-15 15:54 ` [PATCH 08/15] be2iscsi: Fix VLAN support for IPv6 network Jitendra Bhivare
2015-12-18  9:01   ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 09/15] be2iscsi: Fix to handle misconfigured optics events Jitendra Bhivare
2015-12-18  9:02   ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 10/15] be2iscsi: Add FW config validation Jitendra Bhivare
2015-12-18  9:03   ` Hannes Reinecke
2015-12-21  2:57     ` Jitendra Bhivare
2015-12-21  3:59     ` Jitendra Bhivare
2015-12-15 15:55 ` [PATCH 11/15] be2iscsi: Fix return value for MCC completion Jitendra Bhivare
2015-12-18  9:04   ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 12/15] be2iscsi: Fix IOPOLL implementation Jitendra Bhivare
2015-12-18  9:04   ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 13/15] be2iscsi: Fix to process 25G link speed info from FW Jitendra Bhivare
2015-12-18  9:07   ` Hannes Reinecke
     [not found]     ` <CAOA9gs36+ozeo=ZtqHYMvznwMSG6wKnG_zLOp__=wnKMkKv0CA@mail.gmail.com>
2015-12-21  7:13       ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 14/15] be2iscsi: Fix WRB leak in login/logout path Jitendra Bhivare
2015-12-18  9:08   ` Hannes Reinecke
2015-12-15 15:55 ` [PATCH 15/15] be2iscsi: Update the driver version Jitendra Bhivare
2015-12-18  9:08   ` Hannes Reinecke
2015-12-18  9:11 ` [PATCH 00/15] be2iscsi: driver update 11.0.0.0 Hannes Reinecke

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=1450194906-12925-7-git-send-email-jitendra.bhivare@avagotech.com \
    --to=jitendra.bhivare@avagotech.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.