fix ISAC receive frame len

fix transparent audio sending
This commit is contained in:
Karsten Keil 2003-06-25 16:44:48 +00:00
parent 07269b6c98
commit 3bf42a41a7
4 changed files with 15 additions and 3 deletions

View File

@ -608,10 +608,12 @@ HDLC_irq(bchannel_t *bch, u_int stat) {
hdlc_fill_fifo(bch);
bch_sched_event(bch, B_XMTBUFREADY);
} else {
bch->tx_len = 0;
printk(KERN_WARNING "hdlc tx irq TX_NEXT without skb\n");
test_and_clear_bit(BC_FLG_TX_BUSY, &bch->Flag);
}
} else {
bch->tx_len = 0;
test_and_clear_bit(BC_FLG_TX_BUSY, &bch->Flag);
bch_sched_event(bch, B_XMTBUFREADY);
}
@ -1030,6 +1032,7 @@ release_card(fritzpnppci *card)
card->pdev->deactivate(card->pdev);
} else
pci_disable_device(card->pdev);
pci_set_drvdata(card->pdev, NULL);
kfree(card);
fritz.refcnt--;
}
@ -1307,7 +1310,10 @@ static void __devexit fritz_remove(struct pci_dev *pdev)
{
fritzpnppci *card = pci_get_drvdata(pdev);
fritz.ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
if (card)
fritz.ctrl(card->dch.inst.st, MGR_DELSTACK | REQUEST, NULL);
else
printk(KERN_WARNING "%s: drvdata allready removed\n", __FUNCTION__);
}
static struct pci_driver fcpci_driver = {

View File

@ -810,6 +810,7 @@ next_t_frame:
} else
printk(KERN_WARNING "hfcB tx irq TX_NEXT without skb\n");
}
bch->tx_len = 0;
test_and_clear_bit(BC_FLG_TX_BUSY, &bch->Flag);
bch->tx_idx = bch->tx_len;
}

View File

@ -228,7 +228,6 @@ isac_rme_irq(dchannel_t *dch)
count = 32;
isac_empty_fifo(dch, count);
if (dch->rx_skb) {
skb_trim(dch->rx_skb, dch->rx_skb->len - 1); /* remove status byte */
skb_queue_tail(&dch->rqueue, dch->rx_skb);
}
}
@ -488,7 +487,6 @@ isacsx_rme_irq(dchannel_t *dch)
count = 32;
isac_empty_fifo(dch, count);
if (dch->rx_skb) {
skb_trim(dch->rx_skb, dch->rx_skb->len - 1); /* remove status byte */
skb_queue_tail(&dch->rqueue, dch->rx_skb);
}
}

View File

@ -237,6 +237,11 @@ isar_load_firmware(bchannel_t *bch, u_char *buf, int size)
blk_head->sadr, blk_head->len, blk_head->d_key & 0xff);
sadr = blk_head->sadr;
left = blk_head->len;
if (cnt+left > size) {
printk(KERN_ERR"isar: firmware size error have %d need %d bytes\n",
size, cnt+left);
ret = 1;goto reterror;
}
if (!sendmsg(bch, ISAR_HIS_DKEY, blk_head->d_key & 0xff, 0, NULL)) {
printk(KERN_ERR"isar sendmsg dkey failed\n");
ret = 1;goto reterror;
@ -785,10 +790,12 @@ send_frames(bchannel_t *bch)
isar_fill_fifo(bch);
bch_sched_event(bch, B_XMTBUFREADY);
} else {
bch->tx_len = 0;
printk(KERN_WARNING "isar tx irq TX_NEXT without skb\n");
test_and_clear_bit(BC_FLG_TX_BUSY, &bch->Flag);
}
} else {
bch->tx_len = 0;
if (test_and_clear_bit(BC_FLG_DLEETX, &bch->Flag)) {
if (test_and_clear_bit(BC_FLG_LASTDATA, &bch->Flag)) {
if (test_and_clear_bit(BC_FLG_NMD_DATA, &bch->Flag)) {