Lines Matching refs:count

402 	uint16_t count;  in musbotg_dev_ctrl_setup_rx()  local
462 count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); in musbotg_dev_ctrl_setup_rx()
465 if (count != td->remainder) { in musbotg_dev_ctrl_setup_rx()
467 "length, %d bytes\n", count); in musbotg_dev_ctrl_setup_rx()
474 if (count != sizeof(req)) { in musbotg_dev_ctrl_setup_rx()
476 "length, %d bytes\n", count); in musbotg_dev_ctrl_setup_rx()
637 uint16_t count; in musbotg_dev_ctrl_data_rx() local
679 count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); in musbotg_dev_ctrl_data_rx()
682 if (count != td->max_frame_size) { in musbotg_dev_ctrl_data_rx()
683 if (count < td->max_frame_size) { in musbotg_dev_ctrl_data_rx()
694 if (count > td->remainder) { in musbotg_dev_ctrl_data_rx()
699 while (count > 0) { in musbotg_dev_ctrl_data_rx()
705 if (buf_res.length > count) { in musbotg_dev_ctrl_data_rx()
706 buf_res.length = count; in musbotg_dev_ctrl_data_rx()
710 temp = count & ~3; in musbotg_dev_ctrl_data_rx()
718 temp = count & 3; in musbotg_dev_ctrl_data_rx()
723 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_rx()
726 sc->sc_bounce_buf, count); in musbotg_dev_ctrl_data_rx()
729 td->offset += count; in musbotg_dev_ctrl_data_rx()
730 td->remainder -= count; in musbotg_dev_ctrl_data_rx()
743 count -= temp; in musbotg_dev_ctrl_data_rx()
753 count -= buf_res.length; in musbotg_dev_ctrl_data_rx()
778 uint16_t count; in musbotg_dev_ctrl_data_tx() local
809 count = td->max_frame_size; in musbotg_dev_ctrl_data_tx()
810 if (td->remainder < count) { in musbotg_dev_ctrl_data_tx()
813 count = td->remainder; in musbotg_dev_ctrl_data_tx()
815 while (count > 0) { in musbotg_dev_ctrl_data_tx()
821 if (buf_res.length > count) { in musbotg_dev_ctrl_data_tx()
822 buf_res.length = count; in musbotg_dev_ctrl_data_tx()
827 sc->sc_bounce_buf, count); in musbotg_dev_ctrl_data_tx()
829 temp = count & ~3; in musbotg_dev_ctrl_data_tx()
837 temp = count & 3; in musbotg_dev_ctrl_data_tx()
842 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_ctrl_data_tx()
845 td->offset += count; in musbotg_dev_ctrl_data_tx()
846 td->remainder -= count; in musbotg_dev_ctrl_data_tx()
859 count -= temp; in musbotg_dev_ctrl_data_tx()
869 count -= buf_res.length; in musbotg_dev_ctrl_data_tx()
894 uint16_t count; in musbotg_host_ctrl_data_rx() local
965 count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); in musbotg_host_ctrl_data_rx()
968 if (count != td->max_frame_size) { in musbotg_host_ctrl_data_rx()
969 if (count < td->max_frame_size) { in musbotg_host_ctrl_data_rx()
981 if (count > td->remainder) { in musbotg_host_ctrl_data_rx()
987 while (count > 0) { in musbotg_host_ctrl_data_rx()
993 if (buf_res.length > count) { in musbotg_host_ctrl_data_rx()
994 buf_res.length = count; in musbotg_host_ctrl_data_rx()
998 temp = count & ~3; in musbotg_host_ctrl_data_rx()
1006 temp = count & 3; in musbotg_host_ctrl_data_rx()
1011 (void *)(&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_rx()
1014 sc->sc_bounce_buf, count); in musbotg_host_ctrl_data_rx()
1017 td->offset += count; in musbotg_host_ctrl_data_rx()
1018 td->remainder -= count; in musbotg_host_ctrl_data_rx()
1031 count -= temp; in musbotg_host_ctrl_data_rx()
1041 count -= buf_res.length; in musbotg_host_ctrl_data_rx()
1072 uint16_t count; in musbotg_host_ctrl_data_tx() local
1154 count = td->max_frame_size; in musbotg_host_ctrl_data_tx()
1155 if (td->remainder < count) { in musbotg_host_ctrl_data_tx()
1158 count = td->remainder; in musbotg_host_ctrl_data_tx()
1161 while (count > 0) { in musbotg_host_ctrl_data_tx()
1167 if (buf_res.length > count) { in musbotg_host_ctrl_data_tx()
1168 buf_res.length = count; in musbotg_host_ctrl_data_tx()
1173 sc->sc_bounce_buf, count); in musbotg_host_ctrl_data_tx()
1175 temp = count & ~3; in musbotg_host_ctrl_data_tx()
1183 temp = count & 3; in musbotg_host_ctrl_data_tx()
1188 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_ctrl_data_tx()
1191 td->offset += count; in musbotg_host_ctrl_data_tx()
1192 td->remainder -= count; in musbotg_host_ctrl_data_tx()
1205 count -= temp; in musbotg_host_ctrl_data_tx()
1216 count -= buf_res.length; in musbotg_host_ctrl_data_tx()
1432 uint16_t count; in musbotg_dev_data_rx() local
1471 count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); in musbotg_dev_data_rx()
1473 DPRINTFN(4, "count=0x%04x\n", count); in musbotg_dev_data_rx()
1478 if (count != td->max_frame_size) { in musbotg_dev_data_rx()
1479 if (count < td->max_frame_size) { in musbotg_dev_data_rx()
1491 if (count > td->remainder) { in musbotg_dev_data_rx()
1497 while (count > 0) { in musbotg_dev_data_rx()
1503 if (buf_res.length > count) { in musbotg_dev_data_rx()
1504 buf_res.length = count; in musbotg_dev_data_rx()
1508 temp = count & ~3; in musbotg_dev_data_rx()
1516 temp = count & 3; in musbotg_dev_data_rx()
1521 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_rx()
1524 sc->sc_bounce_buf, count); in musbotg_dev_data_rx()
1527 td->offset += count; in musbotg_dev_data_rx()
1528 td->remainder -= count; in musbotg_dev_data_rx()
1541 count -= temp; in musbotg_dev_data_rx()
1552 count -= buf_res.length; in musbotg_dev_data_rx()
1580 uint16_t count; in musbotg_dev_data_tx() local
1615 count = td->max_frame_size; in musbotg_dev_data_tx()
1616 if (td->remainder < count) { in musbotg_dev_data_tx()
1619 count = td->remainder; in musbotg_dev_data_tx()
1621 while (count > 0) { in musbotg_dev_data_tx()
1627 if (buf_res.length > count) { in musbotg_dev_data_tx()
1628 buf_res.length = count; in musbotg_dev_data_tx()
1633 sc->sc_bounce_buf, count); in musbotg_dev_data_tx()
1635 temp = count & ~3; in musbotg_dev_data_tx()
1643 temp = count & 3; in musbotg_dev_data_tx()
1648 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_dev_data_tx()
1651 td->offset += count; in musbotg_dev_data_tx()
1652 td->remainder -= count; in musbotg_dev_data_tx()
1665 count -= temp; in musbotg_dev_data_tx()
1676 count -= buf_res.length; in musbotg_dev_data_tx()
1707 uint16_t count; in musbotg_host_data_rx() local
1815 count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); in musbotg_host_data_rx()
1816 DPRINTFN(4, "count=0x%04x\n", count); in musbotg_host_data_rx()
1821 if (count != td->max_frame_size) { in musbotg_host_data_rx()
1822 if (count < td->max_frame_size) { in musbotg_host_data_rx()
1835 if (count > td->remainder) { in musbotg_host_data_rx()
1842 while (count > 0) { in musbotg_host_data_rx()
1848 if (buf_res.length > count) { in musbotg_host_data_rx()
1849 buf_res.length = count; in musbotg_host_data_rx()
1853 temp = count & ~3; in musbotg_host_data_rx()
1861 temp = count & 3; in musbotg_host_data_rx()
1866 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_rx()
1869 sc->sc_bounce_buf, count); in musbotg_host_data_rx()
1872 td->offset += count; in musbotg_host_data_rx()
1873 td->remainder -= count; in musbotg_host_data_rx()
1886 count -= temp; in musbotg_host_data_rx()
1897 count -= buf_res.length; in musbotg_host_data_rx()
1929 uint16_t count; in musbotg_host_data_tx() local
2011 count = td->max_frame_size; in musbotg_host_data_tx()
2012 if (td->remainder < count) { in musbotg_host_data_tx()
2015 count = td->remainder; in musbotg_host_data_tx()
2018 while (count > 0) { in musbotg_host_data_tx()
2024 if (buf_res.length > count) { in musbotg_host_data_tx()
2025 buf_res.length = count; in musbotg_host_data_tx()
2030 sc->sc_bounce_buf, count); in musbotg_host_data_tx()
2032 temp = count & ~3; in musbotg_host_data_tx()
2040 temp = count & 3; in musbotg_host_data_tx()
2045 ((void *)&sc->sc_bounce_buf[count / 4]), temp); in musbotg_host_data_tx()
2048 td->offset += count; in musbotg_host_data_tx()
2049 td->remainder -= count; in musbotg_host_data_tx()
2062 count -= temp; in musbotg_host_data_tx()
2073 count -= buf_res.length; in musbotg_host_data_tx()