Commit 37952cfa authored by Martin Bachem's avatar Martin Bachem Committed by David S. Miller

mISDN: Bugfix hfcsusb: usb endpoint activation/deactivation

Here was a off by one in the activation/deactivation.
The additional activation in open_bchannel() did hide
it, but only if you do not try to use B2.
Signed-off-by: default avatarMartin Bachem <info@colognechip.com>
Signed-off-by: default avatarKarsten Keil <kkeil@linux-pingi.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09e79a77
...@@ -231,7 +231,7 @@ hfcusb_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb) ...@@ -231,7 +231,7 @@ hfcusb_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
return ret; return ret;
case PH_ACTIVATE_REQ: case PH_ACTIVATE_REQ:
if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) { if (!test_and_set_bit(FLG_ACTIVE, &bch->Flags)) {
hfcsusb_start_endpoint(hw, bch->nr); hfcsusb_start_endpoint(hw, bch->nr - 1);
ret = hfcsusb_setup_bch(bch, ch->protocol); ret = hfcsusb_setup_bch(bch, ch->protocol);
} else } else
ret = 0; ret = 0;
...@@ -495,12 +495,6 @@ open_bchannel(struct hfcsusb *hw, struct channel_req *rq) ...@@ -495,12 +495,6 @@ open_bchannel(struct hfcsusb *hw, struct channel_req *rq)
bch->ch.protocol = rq->protocol; bch->ch.protocol = rq->protocol;
rq->ch = &bch->ch; rq->ch = &bch->ch;
/* start USB endpoint for bchannel */
if (rq->adr.channel == 1)
hfcsusb_start_endpoint(hw, HFC_CHAN_B1);
else
hfcsusb_start_endpoint(hw, HFC_CHAN_B2);
if (!try_module_get(THIS_MODULE)) if (!try_module_get(THIS_MODULE))
printk(KERN_WARNING "%s: %s:cannot get module\n", printk(KERN_WARNING "%s: %s:cannot get module\n",
hw->name, __func__); hw->name, __func__);
...@@ -1801,7 +1795,7 @@ deactivate_bchannel(struct bchannel *bch) ...@@ -1801,7 +1795,7 @@ deactivate_bchannel(struct bchannel *bch)
mISDN_clear_bchannel(bch); mISDN_clear_bchannel(bch);
spin_unlock_irqrestore(&hw->lock, flags); spin_unlock_irqrestore(&hw->lock, flags);
hfcsusb_setup_bch(bch, ISDN_P_NONE); hfcsusb_setup_bch(bch, ISDN_P_NONE);
hfcsusb_stop_endpoint(hw, bch->nr); hfcsusb_stop_endpoint(hw, bch->nr - 1);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment