Lines Matching refs:sense
128 uint8_t *sense; member
142 memset(data->sense, 0, PR_HELPER_SENSE_SIZE); in do_sgio_worker()
147 io_hdr.sbp = data->sense; in do_sgio_worker()
158 scsi_build_sense(data->sense, sense_code); in do_sgio_worker()
163 scsi_build_sense(data->sense, sense_code); in do_sgio_worker()
180 static int coroutine_fn do_sgio(int fd, const uint8_t *cdb, uint8_t *sense, in do_sgio() argument
188 .sense = sense, in do_sgio()
318 static int coroutine_fn mpath_reconstruct_sense(int fd, int r, uint8_t *sense) in mpath_reconstruct_sense() argument
333 int ret = do_sgio(fd, cdb, sense, NULL, &sz, SG_DXFER_NONE); in mpath_reconstruct_sense()
338 scsi_build_sense(sense, mpath_generic_sense(r)); in mpath_reconstruct_sense()
346 scsi_build_sense(sense, SENSE_CODE(SCSI_BUS_RESET)); in mpath_reconstruct_sense()
350 scsi_build_sense(sense, SENSE_CODE(INVALID_OPCODE)); in mpath_reconstruct_sense()
354 scsi_build_sense(sense, SENSE_CODE(INVALID_PARAM)); in mpath_reconstruct_sense()
357 scsi_build_sense(sense, SENSE_CODE(NO_SENSE)); in mpath_reconstruct_sense()
365 scsi_build_sense(sense, SENSE_CODE(LUN_COMM_FAILURE)); in mpath_reconstruct_sense()
370 static int coroutine_fn multipath_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, in multipath_pr_in() argument
387 scsi_build_sense(sense, SENSE_CODE(INVALID_FIELD)); in multipath_pr_in()
415 scsi_build_sense(sense, SENSE_CODE(INVALID_OPCODE)); in multipath_pr_in()
422 return mpath_reconstruct_sense(fd, r, sense); in multipath_pr_in()
425 static int coroutine_fn multipath_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, in multipath_pr_out() argument
442 scsi_build_sense(sense, SENSE_CODE(INVALID_PARAM_LEN)); in multipath_pr_out()
459 scsi_build_sense(sense, SENSE_CODE(INVALID_FIELD)); in multipath_pr_out()
474 scsi_build_sense(sense, SENSE_CODE(INVALID_PARAM_LEN)); in multipath_pr_out()
479 scsi_build_sense(sense, SENSE_CODE(INVALID_PARAM)); in multipath_pr_out()
528 scsi_build_sense(sense, SENSE_CODE(INVALID_PARAM)); in multipath_pr_out()
539 return mpath_reconstruct_sense(fd, r, sense); in multipath_pr_out()
543 static int coroutine_fn do_pr_in(int fd, const uint8_t *cdb, uint8_t *sense, in do_pr_in() argument
549 int r = multipath_pr_in(fd, cdb, sense, data, *resp_sz); in do_pr_in()
557 return do_sgio(fd, cdb, sense, data, resp_sz, in do_pr_in()
561 static int coroutine_fn do_pr_out(int fd, const uint8_t *cdb, uint8_t *sense, in do_pr_out() argument
567 scsi_build_sense(sense, SENSE_CODE(INVALID_OPCODE)); in do_pr_out()
573 return multipath_pr_out(fd, cdb, sense, param, sz); in do_pr_out()
578 return do_sgio(fd, cdb, sense, (uint8_t *)param, &resp_sz, in do_pr_out()
768 r = do_pr_out(req.fd, req.cdb, resp.sense, in prh_co_entry()
773 r = do_pr_in(req.fd, req.cdb, resp.sense, in prh_co_entry()