Lines Matching full:tmr
1149 * queue_tmr_ring - queue tmr info to ring or internally
1151 * @tmr: tcmu_tmr containing tmr info to queue
1158 queue_tmr_ring(struct tcmu_dev *udev, struct tcmu_tmr *tmr) in queue_tmr_ring() argument
1169 id_list_sz = sizeof(tmr->tmr_cmd_ids[0]) * tmr->tmr_cmd_cnt; in queue_tmr_ring()
1174 list_add_tail(&tmr->queue_entry, &udev->tmr_queue); in queue_tmr_ring()
1175 pr_debug("adding tmr %p on dev %s to TMR ring space wait queue\n", in queue_tmr_ring()
1176 tmr, udev->name); in queue_tmr_ring()
1186 entry->tmr_type = tmr->tmr_type; in queue_tmr_ring()
1187 entry->cmd_cnt = tmr->tmr_cmd_cnt; in queue_tmr_ring()
1188 memcpy(&entry->cmd_ids[0], &tmr->tmr_cmd_ids[0], id_list_sz); in queue_tmr_ring()
1197 kfree(tmr); in queue_tmr_ring()
1262 struct tcmu_tmr *tmr; in tcmu_tmr_notify() local
1293 pr_debug("TMR event %d on dev %s, aborted cmds %d, afflicted cmd_ids %d\n", in tcmu_tmr_notify()
1296 tmr = kmalloc(struct_size(tmr, tmr_cmd_ids, cmd_cnt), GFP_NOIO); in tcmu_tmr_notify()
1297 if (!tmr) in tcmu_tmr_notify()
1300 tmr->tmr_type = tcmu_tmr_type(tmf); in tcmu_tmr_notify()
1301 tmr->tmr_cmd_cnt = cmd_cnt; in tcmu_tmr_notify()
1310 tmr->tmr_cmd_ids[cmd_cnt++] = cmd->cmd_id; in tcmu_tmr_notify()
1314 queue_tmr_ring(udev, tmr); in tcmu_tmr_notify()
1413 struct tcmu_tmr *tmr, *tmp; in tcmu_run_tmr_queue() local
1419 pr_debug("running %s's tmr queue\n", udev->name); in tcmu_run_tmr_queue()
1423 list_for_each_entry_safe(tmr, tmp, &tmrs, queue_entry) { in tcmu_run_tmr_queue()
1424 list_del_init(&tmr->queue_entry); in tcmu_run_tmr_queue()
1426 pr_debug("removing tmr %p on dev %s from queue\n", in tcmu_run_tmr_queue()
1427 tmr, udev->name); in tcmu_run_tmr_queue()
1429 if (queue_tmr_ring(udev, tmr)) { in tcmu_run_tmr_queue()
1430 pr_debug("ran out of space during tmr queue run\n"); in tcmu_run_tmr_queue()
1432 * tmr was requeued, so just put all tmrs back in in tcmu_run_tmr_queue()
1704 struct tcmu_tmr *tmr, *tmp; in tcmu_remove_all_queued_tmr() local
1706 list_for_each_entry_safe(tmr, tmp, &udev->tmr_queue, queue_entry) { in tcmu_remove_all_queued_tmr()
1707 list_del_init(&tmr->queue_entry); in tcmu_remove_all_queued_tmr()
1708 kfree(tmr); in tcmu_remove_all_queued_tmr()
1734 /* There can be left over TMR cmds. Remove them. */ in tcmu_dev_kref_release()
2415 * So TMRs in tmr queue do not contain relevant cmd_ids. in tcmu_reset_ring()