From patchwork Sat Apr 21 16:09:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karsten Keil X-Patchwork-Id: 154501 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 72610B6EEB for ; Tue, 24 Apr 2012 03:09:29 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754623Ab2DWRIu (ORCPT ); Mon, 23 Apr 2012 13:08:50 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:57871 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754447Ab2DWRI0 (ORCPT ); Mon, 23 Apr 2012 13:08:26 -0400 Received: from mailone.linux-pingi.de (p5497CD69.dip.t-dialin.net [84.151.205.105]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LkSR1-1RpV2T0VbP-00cN3N; Mon, 23 Apr 2012 19:08:22 +0200 Received: from pingi6.linux-pingi.de (pingi6.linux-pingi.de [10.23.200.6]) by mailone.linux-pingi.de (Postfix) with ESMTP id 344F24FE1; Mon, 23 Apr 2012 19:08:18 +0200 (CEST) Received: by pingi6.linux-pingi.de (Postfix, from userid 1000) id 72ED49FB8D; Mon, 23 Apr 2012 19:05:51 +0200 (CEST) Date: Sat, 21 Apr 2012 18:09:23 +0200 Subject: [PATCH 25/28] mISDN: Bugfix hfcsusb: usb endpoint activation/deactivation From: Karsten Keil To: David Miller Cc: netdev@vger.kernel.org, isdn4linux@listserv.isdn4linux.de Message-Id: <20120423170551.72ED49FB8D@pingi6.linux-pingi.de> X-Provags-ID: V02:K0:lhYR/0K1PZtS9oQkb3Jd/s0W1EFmpnuQnWBkE3YCsfN DN0dJM13f63xjZ7bsrV8/74g0NPSAhBxcL1NB/lkBMcRIizmDa LNOYgrjcOFLj3erQ2Qg3t3Z9b/AxJvt9/WmurfcfJUD6TdbBZ8 zWbd7UG9ClMst8LJTaf4vd+Jaomo0kmXOYNn5NXaOR9ou5HxOk QwWFH5z3/tByn9eRz0hSCLzAKqAYRrfdHlOJf0nLqe1WoVbsst 0uRerHB+PiqL9sf620iuUvnzTymMHnaSbKZopH7peHLBznijZ+ 5LkxfJm6SPTYvUng7E+BIvXU3Dv0LVRg32i1V3752Ks2r2OOF8 RTokjALpnXeER0eNZcJRXw2roDsfAPRCezoMRsNwiAYUS7CfoU G78YQax/IVj5lZEv2khlwmENDOqy20risI= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Martin Bachem Fixed activation/deactivation of B1/B2's USB endpoints Signed-off-by: Martin Bachem Signed-off-by: Karsten Keil --- drivers/isdn/hardware/mISDN/hfcsusb.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c index 3c20b4f..cd0f2f6 100644 --- a/drivers/isdn/hardware/mISDN/hfcsusb.c +++ b/drivers/isdn/hardware/mISDN/hfcsusb.c @@ -232,7 +232,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; @@ -496,12 +496,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__); @@ -1806,7 +1800,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); } /*