diff options
author | Varun Prakash <varun@chelsio.com> | 2020-07-01 22:17:12 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-07-08 01:48:24 -0400 |
commit | b53293fa662e28ae0cdd40828dc641c09f133405 (patch) | |
tree | ead77ec44aa9a8ef365c27ddf129c09f6cb67077 /drivers/target/iscsi/cxgbit/cxgbit_target.c | |
parent | scsi: target: cxgbit: Check connection state before issuing hardware command (diff) | |
download | linux-dev-b53293fa662e28ae0cdd40828dc641c09f133405.tar.xz linux-dev-b53293fa662e28ae0cdd40828dc641c09f133405.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | drivers/target/iscsi/cxgbit/cxgbit_target.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/target/iscsi/cxgbit/cxgbit_target.c b/drivers/target/iscsi/cxgbit/cxgbit_target.c index fcdc4211e3c2..9b3eb2e8c92a 100644 --- a/drivers/target/iscsi/cxgbit/cxgbit_target.c +++ b/drivers/target/iscsi/cxgbit/cxgbit_target.c @@ -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) { 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; - 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) || signal_pending(current))) { __kfree_skb(skb); __skb_queue_purge(&csk->ppodq); ret = -1; - spin_lock_bh(&csk->lock); - if (csk->lock_owner) { - spin_unlock_bh(&csk->lock); - goto unlock; - } - spin_unlock_bh(&csk->lock); - return ret; + goto unlock; } csk->write_seq += skb->len + |