Lines Matching full:pending

47  * SSH_RTL_MAX_PENDING - Maximum number of pending requests.
132 spin_lock(&rtl->pending.lock); in ssh_rtl_pending_remove()
135 spin_unlock(&rtl->pending.lock); in ssh_rtl_pending_remove()
139 atomic_dec(&rtl->pending.count); in ssh_rtl_pending_remove()
142 spin_unlock(&rtl->pending.lock); in ssh_rtl_pending_remove()
151 spin_lock(&rtl->pending.lock); in ssh_rtl_tx_pending_push()
154 spin_unlock(&rtl->pending.lock); in ssh_rtl_tx_pending_push()
159 spin_unlock(&rtl->pending.lock); in ssh_rtl_tx_pending_push()
163 atomic_inc(&rtl->pending.count); in ssh_rtl_tx_pending_push()
164 list_add_tail(&ssh_request_get(rqst)->node, &rtl->pending.head); in ssh_rtl_tx_pending_push()
166 spin_unlock(&rtl->pending.lock); in ssh_rtl_tx_pending_push()
202 return !atomic_read(&rtl->pending.count); in ssh_rtl_tx_can_process()
204 return atomic_read(&rtl->pending.count) < SSH_RTL_MAX_PENDING; in ssh_rtl_tx_can_process()
250 /* Add it to/mark it as pending. */ in ssh_rtl_tx_try_process_one()
268 * and the other one that belongs to the pending set. Due to the in ssh_rtl_tx_try_process_one()
270 * only one allowed to remove the pending node and change the in ssh_rtl_tx_try_process_one()
292 * of pending requests. in ssh_rtl_tx_try_process_one()
307 if (atomic_read(&rtl->pending.count) >= SSH_RTL_MAX_PENDING) in ssh_rtl_tx_schedule()
398 * This is required for non-pending cancellation. This barrier is paired in ssh_rtl_submit()
478 * Get request from pending based on request ID and mark it as response in ssh_rtl_complete()
481 spin_lock(&rtl->pending.lock); in ssh_rtl_complete()
482 list_for_each_entry_safe(p, n, &rtl->pending.head, node) { in ssh_rtl_complete()
489 spin_unlock(&rtl->pending.lock); in ssh_rtl_complete()
507 atomic_dec(&rtl->pending.count); in ssh_rtl_complete()
513 spin_unlock(&rtl->pending.lock); in ssh_rtl_complete()
554 * removed from pending and marked as locked and completed. As in ssh_rtl_complete()
569 * removed from pending and marked as locked and completed. The request in ssh_rtl_complete()
632 * queued, it cannot be "transmitting"/"pending" yet. Thus, if we in ssh_rtl_cancel_nonpending()
708 * @pending: Whether to also cancel pending requests.
710 * Cancels the given request. If @pending is %false, this will not cancel
711 * pending requests, i.e. requests that have already been submitted to the
712 * packet layer but not been completed yet. If @pending is %true, this will
726 * otherwise. If @pending is %true, this function will always return %true.
728 bool ssh_rtl_cancel(struct ssh_request *rqst, bool pending) in ssh_rtl_cancel() argument
738 if (pending) in ssh_rtl_cancel()
796 * remove it from pending. If the request has already been completed (it in ssh_rtl_packet_callback()
829 trace_ssam_rtl_timeout_reap(atomic_read(&rtl->pending.count)); in ssh_rtl_timeout_reap()
832 * Mark reaper as "not pending". This is done before checking any in ssh_rtl_timeout_reap()
839 spin_lock(&rtl->pending.lock); in ssh_rtl_timeout_reap()
840 list_for_each_entry_safe(r, n, &rtl->pending.head, node) { in ssh_rtl_timeout_reap()
858 * added to the pending or queued lists again after we've in ssh_rtl_timeout_reap()
865 atomic_dec(&rtl->pending.count); in ssh_rtl_timeout_reap()
868 spin_unlock(&rtl->pending.lock); in ssh_rtl_timeout_reap()
875 * At this point we've removed the packet from pending. This in ssh_rtl_timeout_reap()
884 * pending set. in ssh_rtl_timeout_reap()
1040 spin_lock_init(&rtl->pending.lock); in ssh_rtl_init()
1041 INIT_LIST_HEAD(&rtl->pending.head); in ssh_rtl_init()
1042 atomic_set_release(&rtl->pending.count, 0); in ssh_rtl_init()
1132 * will be completed after all other currently queued and pending requests
1189 * and pending requests. Requests canceled by this operation will be completed
1201 int pending; in ssh_rtl_shutdown() local
1240 * requests. Thus the pending set should be empty. Attempt to handle in ssh_rtl_shutdown()
1244 pending = atomic_read(&rtl->pending.count); in ssh_rtl_shutdown()
1245 if (WARN_ON(pending)) { in ssh_rtl_shutdown()
1246 spin_lock(&rtl->pending.lock); in ssh_rtl_shutdown()
1247 list_for_each_entry_safe(r, n, &rtl->pending.head, node) { in ssh_rtl_shutdown()
1255 spin_unlock(&rtl->pending.lock); in ssh_rtl_shutdown()