diff options
author | Karen Xie <kxie@chelsio.com> | 2014-12-11 22:13:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-12 11:22:29 -0500 |
commit | 928567ada48b772505e5245267d616c7af97edf0 (patch) | |
tree | 0062b5ad7d9aaba97b8bd2c04d7d1185c0fd9ace | |
parent | 64bfead85dc3caff74964fae1d03a8ee060770a6 (diff) |
cxgb4i: additional types of negative advice
Treat both CPL_ERR_KEEPALV_NEG_ADVICE and CPL_ERR_PERSIST_NEG_ADVICE as
negative advice.
Signed-off-by: Karen Xie <kxie@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 12 |
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 | ||
852 | static 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 | |||
852 | static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) | 859 | static 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); |