Lines Matching refs:fcnt
402 int new_z2, fcnt, maxlen; in hfcpci_empty_fifo_trans() local
409 if (!(fcnt = *z1r - *z2r)) in hfcpci_empty_fifo_trans()
412 if (fcnt <= 0) in hfcpci_empty_fifo_trans()
413 fcnt += B_FIFO_SIZE; /* bytes actually buffered */ in hfcpci_empty_fifo_trans()
414 if (fcnt > HFCPCI_BTRANS_THRESHOLD) in hfcpci_empty_fifo_trans()
415 fcnt = HFCPCI_BTRANS_THRESHOLD; /* limit size */ in hfcpci_empty_fifo_trans()
417 new_z2 = *z2r + fcnt; /* new position in fifo */ in hfcpci_empty_fifo_trans()
421 if (!(skb = dev_alloc_skb(fcnt))) in hfcpci_empty_fifo_trans()
424 ptr = skb_put(skb, fcnt); in hfcpci_empty_fifo_trans()
425 if (*z2r + fcnt <= B_FIFO_SIZE + B_SUB_VAL) in hfcpci_empty_fifo_trans()
426 maxlen = fcnt; /* complete transfer */ in hfcpci_empty_fifo_trans()
432 fcnt -= maxlen; in hfcpci_empty_fifo_trans()
434 if (fcnt) { /* rest remaining */ in hfcpci_empty_fifo_trans()
437 memcpy(ptr, ptr1, fcnt); /* rest */ in hfcpci_empty_fifo_trans()
521 int fcnt; in hfcpci_fill_dfifo() local
537 fcnt = df->f1 - df->f2; /* frame count actually buffered */ in hfcpci_fill_dfifo()
538 if (fcnt < 0) in hfcpci_fill_dfifo()
539 fcnt += (MAX_D_FRAMES + 1); /* if wrap around */ in hfcpci_fill_dfifo()
540 if (fcnt > (MAX_D_FRAMES - 1)) { in hfcpci_fill_dfifo()
592 int maxlen, fcnt; in hfcpci_fill_fifo() local
618 fcnt = *z2t - *z1t; in hfcpci_fill_fifo()
619 if (fcnt <= 0) in hfcpci_fill_fifo()
620 fcnt += B_FIFO_SIZE; /* fcnt contains available bytes in fifo */ in hfcpci_fill_fifo()
621 fcnt = B_FIFO_SIZE - fcnt; /* remaining bytes to send */ in hfcpci_fill_fifo()
623 while ((fcnt < 2 * HFCPCI_BTRANS_THRESHOLD) && (bcs->tx_skb)) { in hfcpci_fill_fifo()
624 if (bcs->tx_skb->len < B_FIFO_SIZE - fcnt) { in hfcpci_fill_fifo()
645 fcnt += bcs->tx_skb->len; in hfcpci_fill_fifo()
671 fcnt = bz->f1 - bz->f2; /* frame count actually buffered */ in hfcpci_fill_fifo()
672 if (fcnt < 0) in hfcpci_fill_fifo()
673 fcnt += (MAX_B_FRAMES + 1); /* if wrap around */ in hfcpci_fill_fifo()
674 if (fcnt > (MAX_B_FRAMES - 1)) { in hfcpci_fill_fifo()