Skip to content

Commit

Permalink
mISDN: Bugfix hfcsusb: usb endpoint activation/deactivation
Browse files Browse the repository at this point in the history
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: Martin Bachem <[email protected]>
Signed-off-by: Karsten Keil <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Martin Bachem authored and davem330 committed May 16, 2012
1 parent 09e79a7 commit 37952cf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/isdn/hardware/mISDN/hfcsusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ hfcusb_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb)
return ret;
case PH_ACTIVATE_REQ:
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);
} else
ret = 0;
Expand Down Expand Up @@ -495,12 +495,6 @@ open_bchannel(struct hfcsusb *hw, struct channel_req *rq)
bch->ch.protocol = rq->protocol;
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))
printk(KERN_WARNING "%s: %s:cannot get module\n",
hw->name, __func__);
Expand Down Expand Up @@ -1801,7 +1795,7 @@ deactivate_bchannel(struct bchannel *bch)
mISDN_clear_bchannel(bch);
spin_unlock_irqrestore(&hw->lock, flags);
hfcsusb_setup_bch(bch, ISDN_P_NONE);
hfcsusb_stop_endpoint(hw, bch->nr);
hfcsusb_stop_endpoint(hw, bch->nr - 1);
}

/*
Expand Down

0 comments on commit 37952cf

Please sign in to comment.