diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/atm/he.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/atm/he.c')
-rw-r--r-- | drivers/atm/he.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 70667033a568..c213e0da0343 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/timer.h> | 67 | #include <linux/timer.h> |
68 | #include <linux/interrupt.h> | 68 | #include <linux/interrupt.h> |
69 | #include <linux/dma-mapping.h> | 69 | #include <linux/dma-mapping.h> |
70 | #include <linux/slab.h> | ||
70 | #include <asm/io.h> | 71 | #include <asm/io.h> |
71 | #include <asm/byteorder.h> | 72 | #include <asm/byteorder.h> |
72 | #include <asm/uaccess.h> | 73 | #include <asm/uaccess.h> |
@@ -2505,7 +2506,7 @@ he_close(struct atm_vcc *vcc) | |||
2505 | * TBRQ, the host issues the close command to the adapter. | 2506 | * TBRQ, the host issues the close command to the adapter. |
2506 | */ | 2507 | */ |
2507 | 2508 | ||
2508 | while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 0) && | 2509 | while (((tx_inuse = atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) > 1) && |
2509 | (retry < MAX_RETRY)) { | 2510 | (retry < MAX_RETRY)) { |
2510 | msleep(sleep); | 2511 | msleep(sleep); |
2511 | if (sleep < 250) | 2512 | if (sleep < 250) |
@@ -2514,7 +2515,7 @@ he_close(struct atm_vcc *vcc) | |||
2514 | ++retry; | 2515 | ++retry; |
2515 | } | 2516 | } |
2516 | 2517 | ||
2517 | if (tx_inuse) | 2518 | if (tx_inuse > 1) |
2518 | hprintk("close tx cid 0x%x tx_inuse = %d\n", cid, tx_inuse); | 2519 | hprintk("close tx cid 0x%x tx_inuse = %d\n", cid, tx_inuse); |
2519 | 2520 | ||
2520 | /* 2.3.1.1 generic close operations with flush */ | 2521 | /* 2.3.1.1 generic close operations with flush */ |
@@ -2739,7 +2740,7 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg) | |||
2739 | spin_lock_irqsave(&he_dev->global_lock, flags); | 2740 | spin_lock_irqsave(&he_dev->global_lock, flags); |
2740 | switch (reg.type) { | 2741 | switch (reg.type) { |
2741 | case HE_REGTYPE_PCI: | 2742 | case HE_REGTYPE_PCI: |
2742 | if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) { | 2743 | if (reg.addr >= HE_REGMAP_SIZE) { |
2743 | err = -EINVAL; | 2744 | err = -EINVAL; |
2744 | break; | 2745 | break; |
2745 | } | 2746 | } |