atm: [he] adjust tests to account for sk_wmem_alloc changes
authorchas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Fri, 4 Dec 2009 05:22:17 +0000 (05:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Dec 2009 04:22:31 +0000 (20:22 -0800)
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>
drivers/atm/he.c

index e90665876c4774ffa92cbccee1629c10f388ad80..e8c6529dc366a6401730d4b16d12a98597d6ab0b 100644 (file)
@@ -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)
@@ -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 */