scsi: target: cxgbit: Remove tx flow control code

Firmware does tx flow control so remove tx flow control code from the
driver.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Varun Prakash 2020-07-01 22:17:12 +05:30 committed by Martin K. Petersen
parent f178842224
commit b53293fa66
3 changed files with 4 additions and 23 deletions

View file

@ -207,7 +207,6 @@ struct cxgbit_sock {
/* socket lock */ /* socket lock */
spinlock_t lock; spinlock_t lock;
wait_queue_head_t waitq; wait_queue_head_t waitq;
wait_queue_head_t ack_waitq;
bool lock_owner; bool lock_owner;
struct kref kref; struct kref kref;
u32 max_iso_npdu; u32 max_iso_npdu;

View file

@ -1360,7 +1360,6 @@ cxgbit_pass_accept_req(struct cxgbit_device *cdev, struct sk_buff *skb)
cxgbit_sock_reset_wr_list(csk); cxgbit_sock_reset_wr_list(csk);
spin_lock_init(&csk->lock); spin_lock_init(&csk->lock);
init_waitqueue_head(&csk->waitq); init_waitqueue_head(&csk->waitq);
init_waitqueue_head(&csk->ack_waitq);
csk->lock_owner = false; csk->lock_owner = false;
if (cxgbit_alloc_csk_skb(csk)) { if (cxgbit_alloc_csk_skb(csk)) {
@ -1887,7 +1886,6 @@ static void cxgbit_fw4_ack(struct cxgbit_sock *csk, struct sk_buff *skb)
if (csk->snd_una != snd_una) { if (csk->snd_una != snd_una) {
csk->snd_una = snd_una; csk->snd_una = snd_una;
dst_confirm(csk->dst); dst_confirm(csk->dst);
wake_up(&csk->ack_waitq);
} }
} }

View file

@ -284,18 +284,6 @@ void cxgbit_push_tx_frames(struct cxgbit_sock *csk)
} }
} }
static bool cxgbit_lock_sock(struct cxgbit_sock *csk)
{
spin_lock_bh(&csk->lock);
if (before(csk->write_seq, csk->snd_una + csk->snd_win))
csk->lock_owner = true;
spin_unlock_bh(&csk->lock);
return csk->lock_owner;
}
static void cxgbit_unlock_sock(struct cxgbit_sock *csk) static void cxgbit_unlock_sock(struct cxgbit_sock *csk)
{ {
struct sk_buff_head backlogq; struct sk_buff_head backlogq;
@ -325,20 +313,16 @@ static int cxgbit_queue_skb(struct cxgbit_sock *csk, struct sk_buff *skb)
{ {
int ret = 0; int ret = 0;
wait_event_interruptible(csk->ack_waitq, cxgbit_lock_sock(csk)); spin_lock_bh(&csk->lock);
csk->lock_owner = true;
spin_unlock_bh(&csk->lock);
if (unlikely((csk->com.state != CSK_STATE_ESTABLISHED) || if (unlikely((csk->com.state != CSK_STATE_ESTABLISHED) ||
signal_pending(current))) { signal_pending(current))) {
__kfree_skb(skb); __kfree_skb(skb);
__skb_queue_purge(&csk->ppodq); __skb_queue_purge(&csk->ppodq);
ret = -1; ret = -1;
spin_lock_bh(&csk->lock); goto unlock;
if (csk->lock_owner) {
spin_unlock_bh(&csk->lock);
goto unlock;
}
spin_unlock_bh(&csk->lock);
return ret;
} }
csk->write_seq += skb->len + csk->write_seq += skb->len +