]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/gigaset/isocdata.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
[linux-2.6-omap-h63xx.git] / drivers / isdn / gigaset / isocdata.c
index 5f2f47fdc045f12c0059e081867ba2ff357a78fd..8667daaa1a82e74eb74af3704ea4021e283c50e6 100644 (file)
@@ -532,7 +532,7 @@ static inline void hdlc_putbyte(unsigned char c, struct bc_state *bcs)
                bcs->skb = NULL;
                return;
        }
-       *gigaset_skb_put_quick(bcs->skb, 1) = c;
+       *__skb_put(bcs->skb, 1) = c;
 }
 
 /* hdlc_flush
@@ -990,6 +990,13 @@ void gigaset_isoc_input(struct inbuf_t *inbuf)
 int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb)
 {
        int len = skb->len;
+       unsigned long flags;
+
+       spin_lock_irqsave(&bcs->cs->lock, flags);
+       if (!bcs->cs->connected) {
+               spin_unlock_irqrestore(&bcs->cs->lock, flags);
+               return -ENODEV;
+       }
 
        skb_queue_tail(&bcs->squeue, skb);
        gig_dbg(DEBUG_ISO, "%s: skb queued, qlen=%d",
@@ -997,6 +1004,7 @@ int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb)
 
        /* tasklet submits URB if necessary */
        tasklet_schedule(&bcs->hw.bas->sent_tasklet);
+       spin_unlock_irqrestore(&bcs->cs->lock, flags);
 
        return len;     /* ok so far */
 }