Lines Matching refs:req

74 #define REQ_TO_RAID_ACTION_RESULT(req) ((struct mpt_raid_action_result *) \
75 (((MSG_RAID_ACTION_REQUEST *)(req->req_vbuf)) + 1))
77 #define REQ_IOCSTATUS(req) ((req)->IOCStatus & MPI_IOCSTATUS_MASK)
103 static int mpt_raid_reply_frame_handler(struct mpt_softc *mpt, request_t *req,
127 struct mpt_raid_volume *vol, struct mpt_raid_disk *disk, request_t *req,
370 mpt_raid_event(struct mpt_softc *mpt, request_t *req,
516 mpt_raid_reply_handler(struct mpt_softc *mpt, request_t *req,
521 if (req == NULL)
526 free_req = mpt_raid_reply_frame_handler(mpt, req, reply_frame);
528 else if (req->ccb != NULL) {
533 req->state &= ~REQ_STATE_QUEUED;
534 req->state |= REQ_STATE_DONE;
535 TAILQ_REMOVE(&mpt->request_pending_list, req, links);
537 if ((req->state & REQ_STATE_NEED_WAKEUP) != 0) {
538 wakeup(req);
540 mpt_free_request(mpt, req);
551 mpt_raid_reply_frame_handler(struct mpt_softc *mpt, request_t *req,
559 req->IOCStatus = le16toh(reply->IOCStatus);
560 rap = (MSG_RAID_ACTION_REQUEST *)req->req_vbuf;
572 action_result = REQ_TO_RAID_ACTION_RESULT(req);
584 struct mpt_raid_disk *disk, request_t *req, u_int Action,
591 rap = req->req_vbuf;
610 rap->MsgContext = htole32(req->index | raid_handler_id);
613 mpt_send_cmd(mpt, req);
616 return (mpt_wait_req(mpt, req, REQ_STATE_DONE, REQ_STATE_DONE,
737 request_t *req)
741 ccb = req->ccb;
751 rv = mpt_issue_raid_req(mpt, mpt_disk->volume, mpt_disk, req,
759 mpt_req_timeout(req, mpt_raid_quiesce_timeout, ccb, 5 * hz);
768 ar = REQ_TO_RAID_ACTION_RESULT(req);
770 || REQ_IOCSTATUS(req) != MPI_IOCSTATUS_SUCCESS
773 "%d:%x:%x\n", rv, req->IOCStatus,
846 request_t *req;
863 req = mpt_get_request(mpt, /*sleep_ok*/TRUE);
864 if (req == NULL) {
870 rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req,
881 ar = REQ_TO_RAID_ACTION_RESULT(req);
883 || REQ_IOCSTATUS(req) != MPI_IOCSTATUS_SUCCESS
887 rv, req->IOCStatus, ar->action_status);
890 mpt_free_request(mpt, req);
897 request_t *req;
942 req = mpt_get_request(mpt, /*sleep_ok*/TRUE);
943 if (req == NULL) {
954 rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req,
963 ar = REQ_TO_RAID_ACTION_RESULT(req);
965 || REQ_IOCSTATUS(req) != MPI_IOCSTATUS_SUCCESS
968 "%d:%x:%x\n", rv, req->IOCStatus,
974 mpt_free_request(mpt, req);
980 request_t *req;
1000 req = mpt_get_request(mpt, /*sleep_ok*/TRUE);
1001 if (req == NULL) {
1007 rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req,
1017 ar = REQ_TO_RAID_ACTION_RESULT(req);
1019 || REQ_IOCSTATUS(req) != MPI_IOCSTATUS_SUCCESS
1022 "%d:%x:%x\n", rv, req->IOCStatus,
1026 mpt_free_request(mpt, req);
1031 req = mpt_get_request(mpt, /*sleep_ok*/TRUE);
1032 if (req == NULL) {
1043 rv = mpt_issue_raid_req(mpt, mpt_vol, /*disk*/NULL, req,
1052 ar = REQ_TO_RAID_ACTION_RESULT(req);
1054 || REQ_IOCSTATUS(req) != MPI_IOCSTATUS_SUCCESS
1057 "%d:%x:%x\n", rv, req->IOCStatus,
1064 mpt_free_request(mpt, req);
1256 request_t *req;
1299 req = mpt_get_request(mpt, TRUE);
1300 if (req == NULL) {
1305 rv = mpt_issue_raid_req(mpt, mpt_vol, NULL, req,
1310 mpt_free_request(mpt, req);
1314 ar = REQ_TO_RAID_ACTION_RESULT(req);
1317 && REQ_IOCSTATUS(req) == MPI_IOCSTATUS_SUCCESS) {
1326 mpt_free_request(mpt, req);
1757 error = SYSCTL_OUT(req, str, strlen(str) + 1);
1758 if (error || !req->newptr) {
1762 size = req->newlen - req->newidx;
1767 error = SYSCTL_IN(req, inbuf, size);
1792 error = sysctl_handle_int(oidp, &raid_resync_rate, 0, req);
1793 if (error || !req->newptr) {
1812 error = sysctl_handle_int(oidp, &raid_queue_depth, 0, req);
1813 if (error || !req->newptr) {