[PATCH 2/2] mISDN.git hfcpci driver - fix for FLG_FILLEMPTY flag
Arnold Schulz <[email protected]> Wed, 05 Nov 2014 00:00:06 +0100
| Newsgroups | gmane.linux.isdn.i4l.user |
|---|---|
| Message-ID | <[email protected]> |
This fix had been presented by Andreas in the isdn4linux mailing list <[email protected]> on 2013-12-13. It has not yet found its way into mISDN git. I understand that both Birgit Harzenetter and Bodo Pfelzer needed this fix. Also I confirm that my setup only works with this patch. Signed-Off: [email protected] diff -uprN misdn/drivers/isdn/hardware/mISDN/hfcpci.c misdn-new/drivers/isdn/hardware/mISDN/hfcpci.c --- misdn/drivers/isdn/hardware/mISDN/hfcpci.c 2014-11-04 22:25:32.302104803 +0100 +++ misdn-new/drivers/isdn/hardware/mISDN/hfcpci.c 2014-11-04 22:47:47.885315175 +0100 @@ -754,6 +754,7 @@ hfcpci_fill_fifo(struct bchannel *bch) struct hfc_pci *hc = bch->hw; int maxlen, fcnt; int count, new_z1; + int fillempty = 0; struct bzfifo *bz; u_char *bdata; u_char new_f1, *src, *dst; @@ -766,6 +767,7 @@ hfcpci_fill_fifo(struct bchannel *bch) !test_bit(FLG_TRANSPARENT, &bch->Flags)) return; count = HFCPCI_FILLEMPTY; + fillempty = 1; } else { count = bch->tx_skb->len - bch->tx_idx; } @@ -787,7 +789,7 @@ hfcpci_fill_fifo(struct bchannel *bch) fcnt = le16_to_cpu(*z2t) - le16_to_cpu(*z1t); if (fcnt <= 0) fcnt += B_FIFO_SIZE; - if (test_bit(FLG_FILLEMPTY, &bch->Flags)) { + if (fillempty) { /* fcnt contains available bytes in fifo */ if (count > fcnt) count = fcnt;