diff options
author | Karsten Keil <kkeil@linux-pingi.de> | 2012-05-15 19:51:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 15:22:06 -0400 |
commit | 1368112c07bae879fa3d1c21f236ca8eea3e5e84 (patch) | |
tree | 3467a277cc350bbfaf3e98df9513d4209e63f984 /drivers/isdn/hardware/mISDN/mISDNisar.c | |
parent | dd456d45d7edd01f4054818dd404ec61ca55cbc1 (diff) |
mISDN: Cleanup channel also if it already was deactivated
If a channel was closed after it was deactivated it could happen that
something was not proper resetted. The test if a channel is still activ
was wrong, so remove it and always do the cleanup.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/mISDNisar.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNisar.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c index 9a6da6edcfa8..af9a966a1fdf 100644 --- a/drivers/isdn/hardware/mISDN/mISDNisar.c +++ b/drivers/isdn/hardware/mISDN/mISDNisar.c | |||
@@ -1603,15 +1603,10 @@ isar_bctrl(struct mISDNchannel *ch, u32 cmd, void *arg) | |||
1603 | switch (cmd) { | 1603 | switch (cmd) { |
1604 | case CLOSE_CHANNEL: | 1604 | case CLOSE_CHANNEL: |
1605 | test_and_clear_bit(FLG_OPEN, &bch->Flags); | 1605 | test_and_clear_bit(FLG_OPEN, &bch->Flags); |
1606 | if (test_bit(FLG_ACTIVE, &bch->Flags)) { | 1606 | spin_lock_irqsave(ich->is->hwlock, flags); |
1607 | spin_lock_irqsave(ich->is->hwlock, flags); | 1607 | mISDN_freebchannel(bch); |
1608 | mISDN_freebchannel(bch); | 1608 | modeisar(ich, ISDN_P_NONE); |
1609 | modeisar(ich, ISDN_P_NONE); | 1609 | spin_unlock_irqrestore(ich->is->hwlock, flags); |
1610 | spin_unlock_irqrestore(ich->is->hwlock, flags); | ||
1611 | } else { | ||
1612 | skb_queue_purge(&bch->rqueue); | ||
1613 | bch->rcount = 0; | ||
1614 | } | ||
1615 | ch->protocol = ISDN_P_NONE; | 1610 | ch->protocol = ISDN_P_NONE; |
1616 | ch->peer = NULL; | 1611 | ch->peer = NULL; |
1617 | module_put(ich->is->owner); | 1612 | module_put(ich->is->owner); |