diff options
author | Karsten Keil <kkeil@linux-pingi.de> | 2012-05-15 19:51:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 15:22:29 -0400 |
commit | 8bfddfbe2100862fd39b97001d0559ccd4c77f19 (patch) | |
tree | 587d69b18f6b7ed23eb02577f1d531c626c36216 /drivers/isdn/hardware/mISDN/mISDNipac.c | |
parent | 1368112c07bae879fa3d1c21f236ca8eea3e5e84 (diff) |
mISDN: Early confirm for transparent data
It is better to send a confirm for transparent data early as possible
to avoid TX underuns.
Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/mISDNipac.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNipac.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index 6c044d55536b..e4b6d8d51aae 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c | |||
@@ -1011,15 +1011,11 @@ hscx_fill_fifo(struct hscx_hw *hscx) | |||
1011 | static void | 1011 | static void |
1012 | hscx_xpr(struct hscx_hw *hx) | 1012 | hscx_xpr(struct hscx_hw *hx) |
1013 | { | 1013 | { |
1014 | if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) | 1014 | if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) { |
1015 | hscx_fill_fifo(hx); | 1015 | hscx_fill_fifo(hx); |
1016 | else { | 1016 | } else { |
1017 | if (hx->bch.tx_skb) { | 1017 | if (hx->bch.tx_skb) |
1018 | /* send confirm, on trans, free on hdlc. */ | ||
1019 | if (test_bit(FLG_TRANSPARENT, &hx->bch.Flags)) | ||
1020 | confirm_Bsend(&hx->bch); | ||
1021 | dev_kfree_skb(hx->bch.tx_skb); | 1018 | dev_kfree_skb(hx->bch.tx_skb); |
1022 | } | ||
1023 | if (get_next_bframe(&hx->bch)) | 1019 | if (get_next_bframe(&hx->bch)) |
1024 | hscx_fill_fifo(hx); | 1020 | hscx_fill_fifo(hx); |
1025 | } | 1021 | } |
@@ -1342,22 +1338,17 @@ hscx_l2l1(struct mISDNchannel *ch, struct sk_buff *skb) | |||
1342 | struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); | 1338 | struct hscx_hw *hx = container_of(bch, struct hscx_hw, bch); |
1343 | int ret = -EINVAL; | 1339 | int ret = -EINVAL; |
1344 | struct mISDNhead *hh = mISDN_HEAD_P(skb); | 1340 | struct mISDNhead *hh = mISDN_HEAD_P(skb); |
1345 | u32 id; | 1341 | unsigned long flags; |
1346 | u_long flags; | ||
1347 | 1342 | ||
1348 | switch (hh->prim) { | 1343 | switch (hh->prim) { |
1349 | case PH_DATA_REQ: | 1344 | case PH_DATA_REQ: |
1350 | spin_lock_irqsave(hx->ip->hwlock, flags); | 1345 | spin_lock_irqsave(hx->ip->hwlock, flags); |
1351 | ret = bchannel_senddata(bch, skb); | 1346 | ret = bchannel_senddata(bch, skb); |
1352 | if (ret > 0) { /* direct TX */ | 1347 | if (ret > 0) { /* direct TX */ |
1353 | id = hh->id; /* skb can be freed */ | ||
1354 | ret = 0; | 1348 | ret = 0; |
1355 | hscx_fill_fifo(hx); | 1349 | hscx_fill_fifo(hx); |
1356 | spin_unlock_irqrestore(hx->ip->hwlock, flags); | 1350 | } |
1357 | if (!test_bit(FLG_TRANSPARENT, &bch->Flags)) | 1351 | spin_unlock_irqrestore(hx->ip->hwlock, flags); |
1358 | queue_ch_frame(ch, PH_DATA_CNF, id, NULL); | ||
1359 | } else | ||
1360 | spin_unlock_irqrestore(hx->ip->hwlock, flags); | ||
1361 | return ret; | 1352 | return ret; |
1362 | case PH_ACTIVATE_REQ: | 1353 | case PH_ACTIVATE_REQ: |
1363 | spin_lock_irqsave(hx->ip->hwlock, flags); | 1354 | spin_lock_irqsave(hx->ip->hwlock, flags); |