aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 93ae720e8264..8ca91fdfdc35 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -849,6 +849,13 @@ static void csk_act_open_retry_timer(unsigned long data)
849 849
850} 850}
851 851
852static inline bool is_neg_adv(unsigned int status)
853{
854 return status == CPL_ERR_RTX_NEG_ADVICE ||
855 status == CPL_ERR_KEEPALV_NEG_ADVICE ||
856 status == CPL_ERR_PERSIST_NEG_ADVICE;
857}
858
852static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) 859static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb)
853{ 860{
854 struct cxgbi_sock *csk; 861 struct cxgbi_sock *csk;
@@ -870,7 +877,7 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb)
870 "csk 0x%p,%u,0x%lx. ", (&csk->saddr), (&csk->daddr), 877 "csk 0x%p,%u,0x%lx. ", (&csk->saddr), (&csk->daddr),
871 atid, tid, status, csk, csk->state, csk->flags); 878 atid, tid, status, csk, csk->state, csk->flags);
872 879
873 if (status == CPL_ERR_RTX_NEG_ADVICE) 880 if (is_neg_adv(status))
874 goto rel_skb; 881 goto rel_skb;
875 882
876 module_put(THIS_MODULE); 883 module_put(THIS_MODULE);
@@ -976,8 +983,7 @@ static void do_abort_req_rss(struct cxgbi_device *cdev, struct sk_buff *skb)
976 (&csk->saddr), (&csk->daddr), 983 (&csk->saddr), (&csk->daddr),
977 csk, csk->state, csk->flags, csk->tid, req->status); 984 csk, csk->state, csk->flags, csk->tid, req->status);
978 985
979 if (req->status == CPL_ERR_RTX_NEG_ADVICE || 986 if (is_neg_adv(req->status))
980 req->status == CPL_ERR_PERSIST_NEG_ADVICE)
981 goto rel_skb; 987 goto rel_skb;
982 988
983 cxgbi_sock_get(csk); 989 cxgbi_sock_get(csk);