diff options
Diffstat (limited to 'drivers/scsi/cxgb3i/cxgb3i_offload.c')
-rw-r--r-- | drivers/scsi/cxgb3i/cxgb3i_offload.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.c b/drivers/scsi/cxgb3i/cxgb3i_offload.c index c1d5be4adf9c..26ffdcd5a437 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_offload.c +++ b/drivers/scsi/cxgb3i/cxgb3i_offload.c | |||
@@ -291,7 +291,7 @@ static void act_open_req_arp_failure(struct t3cdev *dev, struct sk_buff *skb) | |||
291 | c3cn_hold(c3cn); | 291 | c3cn_hold(c3cn); |
292 | spin_lock_bh(&c3cn->lock); | 292 | spin_lock_bh(&c3cn->lock); |
293 | if (c3cn->state == C3CN_STATE_CONNECTING) | 293 | if (c3cn->state == C3CN_STATE_CONNECTING) |
294 | fail_act_open(c3cn, EHOSTUNREACH); | 294 | fail_act_open(c3cn, -EHOSTUNREACH); |
295 | spin_unlock_bh(&c3cn->lock); | 295 | spin_unlock_bh(&c3cn->lock); |
296 | c3cn_put(c3cn); | 296 | c3cn_put(c3cn); |
297 | __kfree_skb(skb); | 297 | __kfree_skb(skb); |
@@ -792,18 +792,18 @@ static int act_open_rpl_status_to_errno(int status) | |||
792 | { | 792 | { |
793 | switch (status) { | 793 | switch (status) { |
794 | case CPL_ERR_CONN_RESET: | 794 | case CPL_ERR_CONN_RESET: |
795 | return ECONNREFUSED; | 795 | return -ECONNREFUSED; |
796 | case CPL_ERR_ARP_MISS: | 796 | case CPL_ERR_ARP_MISS: |
797 | return EHOSTUNREACH; | 797 | return -EHOSTUNREACH; |
798 | case CPL_ERR_CONN_TIMEDOUT: | 798 | case CPL_ERR_CONN_TIMEDOUT: |
799 | return ETIMEDOUT; | 799 | return -ETIMEDOUT; |
800 | case CPL_ERR_TCAM_FULL: | 800 | case CPL_ERR_TCAM_FULL: |
801 | return ENOMEM; | 801 | return -ENOMEM; |
802 | case CPL_ERR_CONN_EXIST: | 802 | case CPL_ERR_CONN_EXIST: |
803 | cxgb3i_log_error("ACTIVE_OPEN_RPL: 4-tuple in use\n"); | 803 | cxgb3i_log_error("ACTIVE_OPEN_RPL: 4-tuple in use\n"); |
804 | return EADDRINUSE; | 804 | return -EADDRINUSE; |
805 | default: | 805 | default: |
806 | return EIO; | 806 | return -EIO; |
807 | } | 807 | } |
808 | } | 808 | } |
809 | 809 | ||
@@ -817,7 +817,7 @@ static void act_open_retry_timer(unsigned long data) | |||
817 | spin_lock_bh(&c3cn->lock); | 817 | spin_lock_bh(&c3cn->lock); |
818 | skb = alloc_skb(sizeof(struct cpl_act_open_req), GFP_ATOMIC); | 818 | skb = alloc_skb(sizeof(struct cpl_act_open_req), GFP_ATOMIC); |
819 | if (!skb) | 819 | if (!skb) |
820 | fail_act_open(c3cn, ENOMEM); | 820 | fail_act_open(c3cn, -ENOMEM); |
821 | else { | 821 | else { |
822 | skb->sk = (struct sock *)c3cn; | 822 | skb->sk = (struct sock *)c3cn; |
823 | set_arp_failure_handler(skb, act_open_req_arp_failure); | 823 | set_arp_failure_handler(skb, act_open_req_arp_failure); |
@@ -966,14 +966,14 @@ static int abort_status_to_errno(struct s3_conn *c3cn, int abort_reason, | |||
966 | case CPL_ERR_BAD_SYN: /* fall through */ | 966 | case CPL_ERR_BAD_SYN: /* fall through */ |
967 | case CPL_ERR_CONN_RESET: | 967 | case CPL_ERR_CONN_RESET: |
968 | return c3cn->state > C3CN_STATE_ESTABLISHED ? | 968 | return c3cn->state > C3CN_STATE_ESTABLISHED ? |
969 | EPIPE : ECONNRESET; | 969 | -EPIPE : -ECONNRESET; |
970 | case CPL_ERR_XMIT_TIMEDOUT: | 970 | case CPL_ERR_XMIT_TIMEDOUT: |
971 | case CPL_ERR_PERSIST_TIMEDOUT: | 971 | case CPL_ERR_PERSIST_TIMEDOUT: |
972 | case CPL_ERR_FINWAIT2_TIMEDOUT: | 972 | case CPL_ERR_FINWAIT2_TIMEDOUT: |
973 | case CPL_ERR_KEEPALIVE_TIMEDOUT: | 973 | case CPL_ERR_KEEPALIVE_TIMEDOUT: |
974 | return ETIMEDOUT; | 974 | return -ETIMEDOUT; |
975 | default: | 975 | default: |
976 | return EIO; | 976 | return -EIO; |
977 | } | 977 | } |
978 | } | 978 | } |
979 | 979 | ||
@@ -1563,7 +1563,7 @@ free_tid: | |||
1563 | s3_free_atid(cdev, c3cn->tid); | 1563 | s3_free_atid(cdev, c3cn->tid); |
1564 | c3cn->tid = 0; | 1564 | c3cn->tid = 0; |
1565 | out_err: | 1565 | out_err: |
1566 | return -1; | 1566 | return -EINVAL; |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | 1569 | ||