Skip to content

Commit

Permalink
atm: [he] adjust tests to account for sk_wmem_alloc changes
Browse files Browse the repository at this point in the history
due to reference counting sk_wmem_alloc now has a value of 1 when all
the outstanding data has been sent.

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
chas williams - CONTRACTOR authored and David S. Miller committed Dec 9, 2009
1 parent eb04458 commit 504bb3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -2505,7 +2505,7 @@ he_close(struct atm_vcc *vcc)
* TBRQ, the host issues the close command to the adapter.
*/

while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 0) &&
while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 1) &&
(retry < MAX_RETRY)) {
msleep(sleep);
if (sleep < 250)
Expand All @@ -2514,7 +2514,7 @@ he_close(struct atm_vcc *vcc)
++retry;
}

if (tx_inuse)
if (tx_inuse > 1)
hprintk("close tx cid 0x%x tx_inuse = %d\n", cid, tx_inuse);

/* 2.3.1.1 generic close operations with flush */
Expand Down

0 comments on commit 504bb3b

Please sign in to comment.