• Home
  • Raw
  • Download

Lines Matching refs:scp

397 static void mk_sense_buffer(struct scsi_cmnd *scp, int key, int asc, int asq)  in mk_sense_buffer()  argument
401 sbuff = scp->sense_buffer; in mk_sense_buffer()
403 sdev_printk(KERN_ERR, scp->device, in mk_sense_buffer()
412 sdev_printk(KERN_INFO, scp->device, in mk_sense_buffer()
550 static int fill_from_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr, in fill_from_dev_buffer() argument
554 struct scsi_data_buffer *sdb = scsi_in(scp); in fill_from_dev_buffer()
558 if (!(scsi_bidi_cmnd(scp) || scp->sc_data_direction == DMA_FROM_DEVICE)) in fill_from_dev_buffer()
563 sdb->resid = scsi_bufflen(scp) - act_len; in fill_from_dev_buffer()
569 static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr, in fetch_to_dev_buffer() argument
572 if (!scsi_bufflen(scp)) in fetch_to_dev_buffer()
574 if (!(scsi_bidi_cmnd(scp) || scp->sc_data_direction == DMA_TO_DEVICE)) in fetch_to_dev_buffer()
577 return scsi_sg_copy_to_buffer(scp, arr, arr_len); in fetch_to_dev_buffer()
927 static int resp_inquiry(struct scsi_cmnd *scp, int target, in resp_inquiry() argument
932 unsigned char *cmd = scp->cmnd; in resp_inquiry()
947 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, in resp_inquiry()
1033 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_inquiry()
1039 ret = fill_from_dev_buffer(scp, arr, in resp_inquiry()
1068 ret = fill_from_dev_buffer(scp, arr, in resp_inquiry()
1074 static int resp_requests(struct scsi_cmnd * scp, in resp_requests() argument
1078 unsigned char *cmd = scp->cmnd; in resp_requests()
1085 sbuff = scp->sense_buffer; in resp_requests()
1111 mk_sense_buffer(scp, 0, NO_ADDITIONAL_SENSE, 0); in resp_requests()
1112 return fill_from_dev_buffer(scp, arr, len); in resp_requests()
1115 static int resp_start_stop(struct scsi_cmnd * scp, in resp_start_stop() argument
1118 unsigned char *cmd = scp->cmnd; in resp_start_stop()
1121 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_start_stop()
1126 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, in resp_start_stop()
1146 static int resp_readcap(struct scsi_cmnd * scp, in resp_readcap() argument
1153 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_readcap()
1173 return fill_from_dev_buffer(scp, arr, SDEBUG_READCAP_ARR_SZ); in resp_readcap()
1177 static int resp_readcap16(struct scsi_cmnd * scp, in resp_readcap16() argument
1180 unsigned char *cmd = scp->cmnd; in resp_readcap16()
1185 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_readcap16()
1216 return fill_from_dev_buffer(scp, arr, in resp_readcap16()
1222 static int resp_report_tgtpgs(struct scsi_cmnd * scp, in resp_report_tgtpgs() argument
1225 unsigned char *cmd = scp->cmnd; in resp_report_tgtpgs()
1297 ret = fill_from_dev_buffer(scp, arr, in resp_report_tgtpgs()
1462 static int resp_mode_sense(struct scsi_cmnd * scp, int target, in resp_mode_sense() argument
1471 unsigned char *cmd = scp->cmnd; in resp_mode_sense()
1473 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_mode_sense()
1489 mk_sense_buffer(scp, ILLEGAL_REQUEST, SAVING_PARAMS_UNSUP, 0); in resp_mode_sense()
1545 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, in resp_mode_sense()
1572 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_sense()
1605 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_sense()
1612 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, in resp_mode_sense()
1622 return fill_from_dev_buffer(scp, arr, min(alloc_len, offset)); in resp_mode_sense()
1627 static int resp_mode_select(struct scsi_cmnd * scp, int mselect6, in resp_mode_select() argument
1633 unsigned char *cmd = scp->cmnd; in resp_mode_select()
1635 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_mode_select()
1643 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_select()
1647 res = fetch_to_dev_buffer(scp, arr, param_len); in resp_mode_select()
1652 sdev_printk(KERN_INFO, scp->device, in resp_mode_select()
1658 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_select()
1666 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_select()
1674 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_select()
1704 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_mode_select()
1737 static int resp_log_sense(struct scsi_cmnd * scp, in resp_log_sense() argument
1742 unsigned char *cmd = scp->cmnd; in resp_log_sense()
1744 errsts = check_readiness(scp, UAS_ONLY, devip); in resp_log_sense()
1751 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_log_sense()
1776 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_log_sense()
1809 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_log_sense()
1814 mk_sense_buffer(scp, ILLEGAL_REQUEST, in resp_log_sense()
1819 return fill_from_dev_buffer(scp, arr, in resp_log_sense()
1823 static int check_device_access_params(struct scsi_cmnd *scp, in check_device_access_params() argument
1827 mk_sense_buffer(scp, ILLEGAL_REQUEST, ADDR_OUT_OF_RANGE, 0); in check_device_access_params()
1832 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 0); in check_device_access_params()
2411 static int resp_report_luns(struct scsi_cmnd * scp, in resp_report_luns() argument
2417 unsigned char *cmd = scp->cmnd; in resp_report_luns()
2425 mk_sense_buffer(scp, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, in resp_report_luns()
2463 return fill_from_dev_buffer(scp, arr, in resp_report_luns()
2467 static int resp_xdwriteread(struct scsi_cmnd *scp, unsigned long long lba, in resp_xdwriteread() argument
2473 struct scsi_data_buffer *sdb = scsi_in(scp); in resp_xdwriteread()
2477 buf = kmalloc(scsi_bufflen(scp), GFP_ATOMIC); in resp_xdwriteread()
2479 mk_sense_buffer(scp, NOT_READY, in resp_xdwriteread()
2484 scsi_sg_copy_to_buffer(scp, buf, scsi_bufflen(scp)); in resp_xdwriteread()
2510 struct scsi_cmnd *scp; in sdebug_q_cmd_complete() local
2521 scp = sqcp->a_cmnd; in sdebug_q_cmd_complete()
2522 if (NULL == scp) { in sdebug_q_cmd_complete()
2527 devip = (struct sdebug_dev_info *)scp->device->hostdata; in sdebug_q_cmd_complete()
2558 scp->scsi_done(scp); /* callback to mid level */ in sdebug_q_cmd_complete()
2570 struct scsi_cmnd *scp; in sdebug_q_cmd_hrt_complete() local
2581 scp = sqcp->a_cmnd; in sdebug_q_cmd_hrt_complete()
2582 if (NULL == scp) { in sdebug_q_cmd_hrt_complete()
2587 devip = (struct sdebug_dev_info *)scp->device->hostdata; in sdebug_q_cmd_hrt_complete()
2618 scp->scsi_done(scp); /* callback to mid level */ in sdebug_q_cmd_hrt_complete()