Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ufshci/ufshci_ctrlr_cmd.c
| Show All 9 Lines | |||||
| void | void | ||||
| ufshci_ctrlr_cmd_send_task_mgmt_request(struct ufshci_controller *ctrlr, | ufshci_ctrlr_cmd_send_task_mgmt_request(struct ufshci_controller *ctrlr, | ||||
| ufshci_cb_fn_t cb_fn, void *cb_arg, uint8_t function, uint8_t lun, | ufshci_cb_fn_t cb_fn, void *cb_arg, uint8_t function, uint8_t lun, | ||||
| uint8_t task_tag, uint8_t iid) | uint8_t task_tag, uint8_t iid) | ||||
| { | { | ||||
| struct ufshci_request *req; | struct ufshci_request *req; | ||||
| struct ufshci_task_mgmt_request_upiu *upiu; | struct ufshci_task_mgmt_request_upiu *upiu; | ||||
| req = ufshci_allocate_request_vaddr(NULL, 0, M_WAITOK, cb_fn, cb_arg); | req = ufshci_allocate_request_vaddr(NULL, 0, M_NOWAIT, cb_fn, cb_arg); | ||||
| req->request_size = sizeof(struct ufshci_task_mgmt_request_upiu); | req->request_size = sizeof(struct ufshci_task_mgmt_request_upiu); | ||||
| req->response_size = sizeof(struct ufshci_task_mgmt_response_upiu); | req->response_size = sizeof(struct ufshci_task_mgmt_response_upiu); | ||||
| upiu = (struct ufshci_task_mgmt_request_upiu *)&req->request_upiu; | upiu = (struct ufshci_task_mgmt_request_upiu *)&req->request_upiu; | ||||
| memset(upiu, 0, req->request_size); | memset(upiu, 0, req->request_size); | ||||
| upiu->header.trans_type = | upiu->header.trans_type = | ||||
| UFSHCI_UPIU_TRANSACTION_CODE_TASK_MANAGEMENT_REQUEST; | UFSHCI_UPIU_TRANSACTION_CODE_TASK_MANAGEMENT_REQUEST; | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||