[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4F29F456.8090508@oracle.com>
Date: Thu, 02 Feb 2012 10:26:30 +0800
From: Joe Jin <joe.jin@...cle.com>
To: Venkata Siva Vijayendra Bhamidipati <vbhamidi@...co.com>,
Brian Uchino <buchino@...co.com>, torvalds@...ux-foundation.org
CC: Sriharsha <sriharsha.devdas@...cle.com>,
Joe Jin <joe.jin@...cle.com>, stable@...r.kernel.org,
linux-scsi@...r.kernel.org,
andrew thomas <andrew.thomas@...cle.com>,
Greg Marsden <greg.marsden@...cle.com>,
Guru Anbalagane <guru.anbalagane@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH-RESEND] [SCSI] fnic: return zero on fnic_reset() success
When issue LIP by sysfs found write("1") returned 8194, this caused by
fnic_reset() return SUCCESS to store_fc_private_host_issue_lip().
Return 0/-1 for fnic_reset() fix this issue.
Tested-by: Sriharsha <sriharsha.devdas@...cle.com>
Signed-off-by: Joe Jin <joe.jin@...cle.com>
Cc: Abhijeet Joglekar <abjoglek@...co.com>
Cc: Venkata Siva Vijayendra Bhamidipati <vbhamidi@...co.com>
Cc: Brian Uchino <buchino@...co.com>
CC: stable@...r.kernel.org
---
drivers/scsi/fnic/fnic_scsi.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index c40ce52..e705e5e 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1662,7 +1662,7 @@ int fnic_reset(struct Scsi_Host *shost)
{
struct fc_lport *lp;
struct fnic *fnic;
- int ret = SUCCESS;
+ int ret = 0;
lp = shost_priv(shost);
fnic = lport_priv(lp);
@@ -1675,11 +1675,11 @@ int fnic_reset(struct Scsi_Host *shost)
* reset remote port sessions, and if link is up, begin flogi
*/
if (lp->tt.lport_reset(lp))
- ret = FAILED;
+ ret = -1;
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
"Returning from fnic reset %s\n",
- (ret == SUCCESS) ?
+ (ret == 0) ?
"SUCCESS" : "FAILED");
return ret;
@@ -1706,7 +1706,7 @@ int fnic_host_reset(struct scsi_cmnd *sc)
* scsi-ml tries to send a TUR to every device if host reset is
* successful, so before returning to scsi, fabric should be up
*/
- ret = fnic_reset(shost);
+ ret = (fnic_reset(shost) == 0) ? SUCCESS : FAILED;
if (ret == SUCCESS) {
wait_host_tmo = jiffies + FNIC_HOST_RESET_SETTLE_TIME * HZ;
ret = FAILED;
--
1.7.7.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists