Lines Matching refs:msgid
618 u16 raw_msgid, u8 *msgid) in bcm4377_extract_msgid() argument
621 *msgid = FIELD_GET(BCM4377_MSGID_ID, raw_msgid); in bcm4377_extract_msgid()
631 if (*msgid >= ring->n_entries) { in bcm4377_extract_msgid()
634 ring->ring_id, *msgid, ring->n_entries); in bcm4377_extract_msgid()
648 u8 msgid; in bcm4377_handle_event() local
661 if (bcm4377_extract_msgid(bcm4377, ring, raw_msgid, &msgid)) in bcm4377_handle_event()
672 payload = ring->payloads + msgid * ring->mapped_payload_size; in bcm4377_handle_event()
698 u8 msgid; in bcm4377_handle_ack() local
702 if (bcm4377_extract_msgid(bcm4377, ring, raw_msgid, &msgid)) in bcm4377_handle_ack()
705 if (!test_bit(msgid, ring->msgids)) { in bcm4377_handle_ack()
709 ring->ring_id, msgid); in bcm4377_handle_ack()
713 if (ring->allow_wait && ring->events[msgid]) { in bcm4377_handle_ack()
714 complete(ring->events[msgid]); in bcm4377_handle_ack()
715 ring->events[msgid] = NULL; in bcm4377_handle_ack()
718 bitmap_release_region(ring->msgids, msgid, ring->n_entries); in bcm4377_handle_ack()
868 int ret, msgid; in bcm4377_enqueue() local
899 msgid = bitmap_find_free_region(ring->msgids, ring->n_entries, 0); in bcm4377_enqueue()
900 if (msgid < 0) { in bcm4377_enqueue()
908 raw_msgid |= FIELD_PREP(BCM4377_MSGID_ID, msgid); in bcm4377_enqueue()
923 msgid * ring->mapped_payload_size); in bcm4377_enqueue()
924 payload = ring->payloads + msgid * ring->mapped_payload_size; in bcm4377_enqueue()
930 ring->events[msgid] = &event; in bcm4377_enqueue()
962 ring->events[msgid] = NULL; in bcm4377_enqueue()