Lines Matching refs:fcnt_rx
539 int new_z2, fcnt_rx, fcnt_tx, maxlen; in hfcpci_empty_fifo_trans() local
547 fcnt_rx = le16_to_cpu(*z1r) - le16_to_cpu(*z2r); in hfcpci_empty_fifo_trans()
548 if (!fcnt_rx) in hfcpci_empty_fifo_trans()
551 if (fcnt_rx <= 0) in hfcpci_empty_fifo_trans()
552 fcnt_rx += B_FIFO_SIZE; /* bytes actually buffered */ in hfcpci_empty_fifo_trans()
553 new_z2 = le16_to_cpu(*z2r) + fcnt_rx; /* new position in fifo */ in hfcpci_empty_fifo_trans()
565 bch->dropcnt += fcnt_rx; in hfcpci_empty_fifo_trans()
569 maxlen = bchannel_get_rxbuf(bch, fcnt_rx); in hfcpci_empty_fifo_trans()
571 pr_warn("B%d: No bufferspace for %d bytes\n", bch->nr, fcnt_rx); in hfcpci_empty_fifo_trans()
573 ptr = skb_put(bch->rx_skb, fcnt_rx); in hfcpci_empty_fifo_trans()
574 if (le16_to_cpu(*z2r) + fcnt_rx <= B_FIFO_SIZE + B_SUB_VAL) in hfcpci_empty_fifo_trans()
575 maxlen = fcnt_rx; /* complete transfer */ in hfcpci_empty_fifo_trans()
583 fcnt_rx -= maxlen; in hfcpci_empty_fifo_trans()
585 if (fcnt_rx) { /* rest remaining */ in hfcpci_empty_fifo_trans()
588 memcpy(ptr, ptr1, fcnt_rx); /* rest */ in hfcpci_empty_fifo_trans()