crypto: chtls - Corrected function call context

corrected function call context and moved t4_defer_reply
to apropriate location.

Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Vinay Kumar Yadav 2020-01-14 17:58:47 +05:30 committed by Herbert Xu
parent 53146d1525
commit c9f0d33c36

View file

@ -1829,6 +1829,20 @@ static void send_defer_abort_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
kfree_skb(skb);
}
/*
* Add an skb to the deferred skb queue for processing from process context.
*/
static void t4_defer_reply(struct sk_buff *skb, struct chtls_dev *cdev,
defer_handler_t handler)
{
DEFERRED_SKB_CB(skb)->handler = handler;
spin_lock_bh(&cdev->deferq.lock);
__skb_queue_tail(&cdev->deferq, skb);
if (skb_queue_len(&cdev->deferq) == 1)
schedule_work(&cdev->deferq_task);
spin_unlock_bh(&cdev->deferq.lock);
}
static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
struct chtls_dev *cdev, int status, int queue)
{
@ -1843,7 +1857,7 @@ static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
if (!reply_skb) {
req->status = (queue << 1);
send_defer_abort_rpl(cdev, skb);
t4_defer_reply(skb, cdev, send_defer_abort_rpl);
return;
}
@ -1862,20 +1876,6 @@ static void send_abort_rpl(struct sock *sk, struct sk_buff *skb,
cxgb4_ofld_send(cdev->lldi->ports[0], reply_skb);
}
/*
* Add an skb to the deferred skb queue for processing from process context.
*/
static void t4_defer_reply(struct sk_buff *skb, struct chtls_dev *cdev,
defer_handler_t handler)
{
DEFERRED_SKB_CB(skb)->handler = handler;
spin_lock_bh(&cdev->deferq.lock);
__skb_queue_tail(&cdev->deferq, skb);
if (skb_queue_len(&cdev->deferq) == 1)
schedule_work(&cdev->deferq_task);
spin_unlock_bh(&cdev->deferq.lock);
}
static void chtls_send_abort_rpl(struct sock *sk, struct sk_buff *skb,
struct chtls_dev *cdev,
int status, int queue)