Lines Matching refs:minfo

275 static int scmi_xfer_token_set(struct scmi_xfers_info *minfo,  in scmi_xfer_token_set()  argument
291 xfer_id = find_next_zero_bit(minfo->xfer_alloc_table, in scmi_xfer_token_set()
299 xfer_id = find_next_zero_bit(minfo->xfer_alloc_table, in scmi_xfer_token_set()
315 set_bit(xfer_id, minfo->xfer_alloc_table); in scmi_xfer_token_set()
327 static inline void scmi_xfer_token_clear(struct scmi_xfers_info *minfo, in scmi_xfer_token_clear() argument
330 clear_bit(xfer->hdr.seq, minfo->xfer_alloc_table); in scmi_xfer_token_clear()
356 struct scmi_xfers_info *minfo, in scmi_xfer_get() argument
363 spin_lock_irqsave(&minfo->xfer_lock, flags); in scmi_xfer_get()
364 if (hlist_empty(&minfo->free_xfers)) { in scmi_xfer_get()
365 spin_unlock_irqrestore(&minfo->xfer_lock, flags); in scmi_xfer_get()
370 xfer = hlist_entry(minfo->free_xfers.first, struct scmi_xfer, node); in scmi_xfer_get()
381 ret = scmi_xfer_token_set(minfo, xfer); in scmi_xfer_get()
383 hash_add(minfo->pending_xfers, &xfer->node, in scmi_xfer_get()
389 hlist_add_head(&xfer->node, &minfo->free_xfers); in scmi_xfer_get()
398 spin_unlock_irqrestore(&minfo->xfer_lock, flags); in scmi_xfer_get()
415 __scmi_xfer_put(struct scmi_xfers_info *minfo, struct scmi_xfer *xfer) in __scmi_xfer_put() argument
419 spin_lock_irqsave(&minfo->xfer_lock, flags); in __scmi_xfer_put()
422 scmi_xfer_token_clear(minfo, xfer); in __scmi_xfer_put()
426 hlist_add_head(&xfer->node, &minfo->free_xfers); in __scmi_xfer_put()
428 spin_unlock_irqrestore(&minfo->xfer_lock, flags); in __scmi_xfer_put()
444 scmi_xfer_lookup_unlocked(struct scmi_xfers_info *minfo, u16 xfer_id) in scmi_xfer_lookup_unlocked() argument
448 if (test_bit(xfer_id, minfo->xfer_alloc_table)) in scmi_xfer_lookup_unlocked()
449 xfer = XFER_FIND(minfo->pending_xfers, xfer_id); in scmi_xfer_lookup_unlocked()
568 struct scmi_xfers_info *minfo = &info->tx_minfo; in scmi_xfer_command_acquire() local
573 spin_lock_irqsave(&minfo->xfer_lock, flags); in scmi_xfer_command_acquire()
574 xfer = scmi_xfer_lookup_unlocked(minfo, xfer_id); in scmi_xfer_command_acquire()
579 spin_unlock_irqrestore(&minfo->xfer_lock, flags); in scmi_xfer_command_acquire()
583 spin_unlock_irqrestore(&minfo->xfer_lock, flags); in scmi_xfer_command_acquire()
605 __scmi_xfer_put(minfo, xfer); in scmi_xfer_command_acquire()
651 struct scmi_xfers_info *minfo = &info->rx_minfo; in scmi_handle_notification() local
655 xfer = scmi_xfer_get(cinfo->handle, minfo, false); in scmi_handle_notification()
681 __scmi_xfer_put(minfo, xfer); in scmi_handle_notification()
1036 struct scmi_xfers_info *minfo = &info->tx_minfo; in xfer_get_init() local
1044 xfer = scmi_xfer_get(pi->handle, minfo, true); in xfer_get_init()