Lines Matching refs:pend
683 u32 idx, obj, pkts = 0, bytes = 0, pend, clr; in c_can_do_tx() local
685 clr = pend = priv->read_reg(priv, C_CAN_INTPND2_REG); in c_can_do_tx()
687 while ((idx = ffs(pend))) { in c_can_do_tx()
689 pend &= ~(1 << idx); in c_can_do_tx()
715 static u32 c_can_adjust_pending(u32 pend) in c_can_adjust_pending() argument
719 if (pend == RECEIVE_OBJECT_BITS) in c_can_adjust_pending()
720 return pend; in c_can_adjust_pending()
726 weight = hweight32(pend); in c_can_adjust_pending()
727 lasts = fls(pend); in c_can_adjust_pending()
731 return pend; in c_can_adjust_pending()
737 for (lasts--; pend & (1 << (lasts - 1)); lasts--); in c_can_adjust_pending()
739 return pend & ~((1 << lasts) - 1); in c_can_adjust_pending()
756 u32 pend, int quota) in c_can_read_objects() argument
760 while ((obj = ffs(pend)) && quota > 0) { in c_can_read_objects()
761 pend &= ~BIT(obj - 1); in c_can_read_objects()
796 u32 pend = priv->read_reg(priv, C_CAN_NEWDAT1_REG); in c_can_get_pending() local
798 return pend; in c_can_get_pending()
817 u32 pkts = 0, pend = 0, toread, n; in c_can_do_rx_poll() local
827 if (!pend) { in c_can_do_rx_poll()
828 pend = c_can_get_pending(priv); in c_can_do_rx_poll()
829 if (!pend) in c_can_do_rx_poll()
835 toread = c_can_adjust_pending(pend); in c_can_do_rx_poll()
837 toread = pend; in c_can_do_rx_poll()
840 pend &= ~toread; in c_can_do_rx_poll()