Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71393
b: refs/heads/master
c: 1e9c781
h: refs/heads/master
i:
  71391: d5e3aaf
v: v3
  • Loading branch information
Karsten Keil authored and Linus Torvalds committed Oct 19, 2007
1 parent c707a31 commit c551f8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eac141deb4f0136059372923ac3f0eab0bef5bce
refs/heads/master: 1e9c7813723c925623f2e21a93e2d5dc05ea8d12
28 changes: 19 additions & 9 deletions trunk/drivers/isdn/hardware/avm/b1dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,13 @@ static void b1dma_handle_rx(avmcard *card)
card->name);
} else {
memcpy(skb_put(skb, MsgLen), card->msgbuf, MsgLen);
if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_CONF)
if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_CONF) {
spin_lock(&card->lock);
capilib_data_b3_conf(&cinfo->ncci_head, ApplId,
CAPIMSG_NCCI(skb->data),
CAPIMSG_MSGID(skb->data));

CAPIMSG_NCCI(skb->data),
CAPIMSG_MSGID(skb->data));
spin_unlock(&card->lock);
}
capi_ctr_handle_message(ctrl, ApplId, skb);
}
break;
Expand All @@ -500,19 +502,21 @@ static void b1dma_handle_rx(avmcard *card)
ApplId = _get_word(&p);
NCCI = _get_word(&p);
WindowSize = _get_word(&p);

spin_lock(&card->lock);
capilib_new_ncci(&cinfo->ncci_head, ApplId, NCCI, WindowSize);

spin_unlock(&card->lock);
break;

case RECEIVE_FREE_NCCI:

ApplId = _get_word(&p);
NCCI = _get_word(&p);

if (NCCI != 0xffffffff)
if (NCCI != 0xffffffff) {
spin_lock(&card->lock);
capilib_free_ncci(&cinfo->ncci_head, ApplId, NCCI);

spin_unlock(&card->lock);
}
break;

case RECEIVE_START:
Expand Down Expand Up @@ -751,10 +755,10 @@ void b1dma_reset_ctr(struct capi_ctr *ctrl)

spin_lock_irqsave(&card->lock, flags);
b1dma_reset(card);
spin_unlock_irqrestore(&card->lock, flags);

memset(cinfo->version, 0, sizeof(cinfo->version));
capilib_release(&cinfo->ncci_head);
spin_unlock_irqrestore(&card->lock, flags);
capi_ctr_reseted(ctrl);
}

Expand Down Expand Up @@ -803,8 +807,11 @@ void b1dma_release_appl(struct capi_ctr *ctrl, u16 appl)
avmcard *card = cinfo->card;
struct sk_buff *skb;
void *p;
unsigned long flags;

spin_lock_irqsave(&card->lock, flags);
capilib_release_appl(&cinfo->ncci_head, appl);
spin_unlock_irqrestore(&card->lock, flags);

skb = alloc_skb(7, GFP_ATOMIC);
if (!skb) {
Expand Down Expand Up @@ -832,10 +839,13 @@ u16 b1dma_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)
u16 retval = CAPI_NOERROR;

if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_REQ) {
unsigned long flags;
spin_lock_irqsave(&card->lock, flags);
retval = capilib_data_b3_req(&cinfo->ncci_head,
CAPIMSG_APPID(skb->data),
CAPIMSG_NCCI(skb->data),
CAPIMSG_MSGID(skb->data));
spin_unlock_irqrestore(&card->lock, flags);
}
if (retval == CAPI_NOERROR)
b1dma_queue_tx(card, skb);
Expand Down

0 comments on commit c551f8b

Please sign in to comment.