aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/hwchannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/mISDN/hwchannel.c')
-rw-r--r--drivers/isdn/mISDN/hwchannel.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/isdn/mISDN/hwchannel.c b/drivers/isdn/mISDN/hwchannel.c
index 0481a0cdf6db..e8049be552aa 100644
--- a/drivers/isdn/mISDN/hwchannel.c
+++ b/drivers/isdn/mISDN/hwchannel.c
@@ -114,13 +114,14 @@ mISDN_freedchannel(struct dchannel *ch)
114} 114}
115EXPORT_SYMBOL(mISDN_freedchannel); 115EXPORT_SYMBOL(mISDN_freedchannel);
116 116
117int 117void
118mISDN_freebchannel(struct bchannel *ch) 118mISDN_clear_bchannel(struct bchannel *ch)
119{ 119{
120 if (ch->tx_skb) { 120 if (ch->tx_skb) {
121 dev_kfree_skb(ch->tx_skb); 121 dev_kfree_skb(ch->tx_skb);
122 ch->tx_skb = NULL; 122 ch->tx_skb = NULL;
123 } 123 }
124 ch->tx_idx = 0;
124 if (ch->rx_skb) { 125 if (ch->rx_skb) {
125 dev_kfree_skb(ch->rx_skb); 126 dev_kfree_skb(ch->rx_skb);
126 ch->rx_skb = NULL; 127 ch->rx_skb = NULL;
@@ -129,6 +130,16 @@ mISDN_freebchannel(struct bchannel *ch)
129 dev_kfree_skb(ch->next_skb); 130 dev_kfree_skb(ch->next_skb);
130 ch->next_skb = NULL; 131 ch->next_skb = NULL;
131 } 132 }
133 test_and_clear_bit(FLG_TX_BUSY, &ch->Flags);
134 test_and_clear_bit(FLG_TX_NEXT, &ch->Flags);
135 test_and_clear_bit(FLG_ACTIVE, &ch->Flags);
136}
137EXPORT_SYMBOL(mISDN_clear_bchannel);
138
139int
140mISDN_freebchannel(struct bchannel *ch)
141{
142 mISDN_clear_bchannel(ch);
132 skb_queue_purge(&ch->rqueue); 143 skb_queue_purge(&ch->rqueue);
133 ch->rcount = 0; 144 ch->rcount = 0;
134 flush_scheduled_work(); 145 flush_scheduled_work();