aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_iscsi.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@serverengines.com>2010-07-21 18:46:38 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:29 -0400
commitd3ad2bb31c26d7314fad98da8abb04f4fa24ed16 (patch)
treecf2ccd6434cddce6e6c52df040b032384a52875a /drivers/scsi/be2iscsi/be_iscsi.c
parent457ff3b7dc3796d8778286217ad304ff122e948f (diff)
[SCSI] be2iscsi: Fixing return values
This patch fixes the return values as per comment from Mike Christie Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r--drivers/scsi/be2iscsi/be_iscsi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index d9321ee01534..cd1b8301036d 100644
--- a/drivers/scsi/be2iscsi/be_iscsi.c
+++ b/drivers/scsi/be2iscsi/be_iscsi.c
@@ -230,7 +230,7 @@ int beiscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
230 if (!beiscsi_ep) { 230 if (!beiscsi_ep) {
231 SE_DEBUG(DBG_LVL_1, 231 SE_DEBUG(DBG_LVL_1,
232 "In beiscsi_conn_get_param , no beiscsi_ep\n"); 232 "In beiscsi_conn_get_param , no beiscsi_ep\n");
233 return -1; 233 return -ENODEV;
234 } 234 }
235 235
236 switch (param) { 236 switch (param) {
@@ -309,7 +309,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
309 tag = be_cmd_get_mac_addr(phba); 309 tag = be_cmd_get_mac_addr(phba);
310 if (!tag) { 310 if (!tag) {
311 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed\n"); 311 SE_DEBUG(DBG_LVL_1, "be_cmd_get_mac_addr Failed\n");
312 return -1; 312 return -EAGAIN;
313 } else 313 } else
314 wait_event_interruptible(phba->ctrl.mcc_wait[tag], 314 wait_event_interruptible(phba->ctrl.mcc_wait[tag],
315 phba->ctrl.mcc_numtag[tag]); 315 phba->ctrl.mcc_numtag[tag]);
@@ -322,7 +322,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
322 " status = %d extd_status = %d\n", 322 " status = %d extd_status = %d\n",
323 status, extd_status); 323 status, extd_status);
324 free_mcc_tag(&phba->ctrl, tag); 324 free_mcc_tag(&phba->ctrl, tag);
325 return -1; 325 return -EAGAIN;
326 } else { 326 } else {
327 wrb = queue_get_wrb(mccq, wrb_num); 327 wrb = queue_get_wrb(mccq, wrb_num);
328 free_mcc_tag(&phba->ctrl, tag); 328 free_mcc_tag(&phba->ctrl, tag);
@@ -485,7 +485,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
485 struct tcp_connect_and_offload_out *ptcpcnct_out; 485 struct tcp_connect_and_offload_out *ptcpcnct_out;
486 unsigned short status, extd_status; 486 unsigned short status, extd_status;
487 unsigned int tag, wrb_num; 487 unsigned int tag, wrb_num;
488 int ret = -1; 488 int ret = -ENOMEM;
489 489
490 SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn\n"); 490 SE_DEBUG(DBG_LVL_8, "In beiscsi_open_conn\n");
491 beiscsi_ep->ep_cid = beiscsi_get_cid(phba); 491 beiscsi_ep->ep_cid = beiscsi_get_cid(phba);
@@ -536,7 +536,7 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,
536 536
537free_ep: 537free_ep:
538 beiscsi_free_ep(beiscsi_ep); 538 beiscsi_free_ep(beiscsi_ep);
539 return -1; 539 return -EBUSY;
540} 540}
541 541
542/** 542/**
@@ -626,7 +626,7 @@ static int beiscsi_close_conn(struct beiscsi_endpoint *beiscsi_ep, int flag)
626 if (!tag) { 626 if (!tag) {
627 SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x\n", 627 SE_DEBUG(DBG_LVL_8, "upload failed for cid 0x%x\n",
628 beiscsi_ep->ep_cid); 628 beiscsi_ep->ep_cid);
629 ret = -1; 629 ret = -EAGAIN;
630 } else { 630 } else {
631 wait_event_interruptible(phba->ctrl.mcc_wait[tag], 631 wait_event_interruptible(phba->ctrl.mcc_wait[tag],
632 phba->ctrl.mcc_numtag[tag]); 632 phba->ctrl.mcc_numtag[tag]);