]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/mISDN/stack.c
mISDN: Correct busy device detection
[linux-2.6-omap-h63xx.git] / drivers / isdn / mISDN / stack.c
index 8cff570bb8df58bf2a8f929a5ea900a06c009789..e2f45019ebf0be504bdcd68538cd47f51109c588 100644 (file)
@@ -440,22 +440,14 @@ connect_layer1(struct mISDNdevice *dev, struct mISDNchannel *ch,
        case ISDN_P_NT_E1:
        case ISDN_P_TE_S0:
        case ISDN_P_TE_E1:
-#ifdef PROTOCOL_CHECK
-               /* this should be enhanced */
-               if (!list_empty(&dev->D.st->layer2)
-                       && dev->D.protocol != protocol)
-                       return -EBUSY;
-               if (!hlist_empty(&dev->D.st->l1sock.head)
-                       && dev->D.protocol != protocol)
-                       return -EBUSY;
-#endif
                ch->recv = mISDN_queue_message;
                ch->peer = &dev->D.st->own;
                ch->st = dev->D.st;
                rq.protocol = protocol;
                rq.adr.channel = adr->channel;
                err = dev->D.ctrl(&dev->D, OPEN_CHANNEL, &rq);
-               printk(KERN_DEBUG "%s: ret 1 %d\n", __func__, err);
+               printk(KERN_DEBUG "%s: ret %d (dev %d)\n", __func__, err,
+                       dev->id);
                if (err)
                        return err;
                write_lock_bh(&dev->D.st->l1sock.lock);
@@ -546,15 +538,6 @@ create_l2entity(struct mISDNdevice *dev, struct mISDNchannel *ch,
                if (dev->Dprotocols & (1 << ISDN_P_NT_E1))
                        rq.protocol = ISDN_P_NT_E1;
        case ISDN_P_LAPD_TE:
-#ifdef PROTOCOL_CHECK
-               /* this should be enhanced */
-               if (!list_empty(&dev->D.st->layer2)
-                       && dev->D.protocol != protocol)
-                       return -EBUSY;
-               if (!hlist_empty(&dev->D.st->l1sock.head)
-                       && dev->D.protocol != protocol)
-                       return -EBUSY;
-#endif
                ch->recv = mISDN_queue_message;
                ch->peer = &dev->D.st->own;
                ch->st = dev->D.st;