Lines Matching refs:cmd
154 unsigned char cmd[16]; in sd_zbc_do_report_zones() local
158 memset(cmd, 0, 16); in sd_zbc_do_report_zones()
159 cmd[0] = ZBC_IN; in sd_zbc_do_report_zones()
160 cmd[1] = ZI_REPORT_ZONES; in sd_zbc_do_report_zones()
161 put_unaligned_be64(lba, &cmd[2]); in sd_zbc_do_report_zones()
162 put_unaligned_be32(buflen, &cmd[10]); in sd_zbc_do_report_zones()
164 cmd[14] = ZBC_REPORT_ZONE_PARTIAL; in sd_zbc_do_report_zones()
166 result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, buf, buflen, in sd_zbc_do_report_zones()
330 static blk_status_t sd_zbc_cmnd_checks(struct scsi_cmnd *cmd) in sd_zbc_cmnd_checks() argument
332 struct request *rq = scsi_cmd_to_rq(cmd); in sd_zbc_cmnd_checks()
411 blk_status_t sd_zbc_prepare_zone_append(struct scsi_cmnd *cmd, sector_t *lba, in sd_zbc_prepare_zone_append() argument
414 struct request *rq = scsi_cmd_to_rq(cmd); in sd_zbc_prepare_zone_append()
420 ret = sd_zbc_cmnd_checks(cmd); in sd_zbc_prepare_zone_append()
458 trace_scsi_prepare_zone_append(cmd, *lba, wp_offset); in sd_zbc_prepare_zone_append()
477 blk_status_t sd_zbc_setup_zone_mgmt_cmnd(struct scsi_cmnd *cmd, in sd_zbc_setup_zone_mgmt_cmnd() argument
480 struct request *rq = scsi_cmd_to_rq(cmd); in sd_zbc_setup_zone_mgmt_cmnd()
486 ret = sd_zbc_cmnd_checks(cmd); in sd_zbc_setup_zone_mgmt_cmnd()
490 cmd->cmd_len = 16; in sd_zbc_setup_zone_mgmt_cmnd()
491 memset(cmd->cmnd, 0, cmd->cmd_len); in sd_zbc_setup_zone_mgmt_cmnd()
492 cmd->cmnd[0] = ZBC_OUT; in sd_zbc_setup_zone_mgmt_cmnd()
493 cmd->cmnd[1] = op; in sd_zbc_setup_zone_mgmt_cmnd()
495 cmd->cmnd[14] = 0x1; in sd_zbc_setup_zone_mgmt_cmnd()
497 put_unaligned_be64(block, &cmd->cmnd[2]); in sd_zbc_setup_zone_mgmt_cmnd()
500 cmd->sc_data_direction = DMA_NONE; in sd_zbc_setup_zone_mgmt_cmnd()
501 cmd->transfersize = 0; in sd_zbc_setup_zone_mgmt_cmnd()
502 cmd->allowed = 0; in sd_zbc_setup_zone_mgmt_cmnd()
531 static unsigned int sd_zbc_zone_wp_update(struct scsi_cmnd *cmd, in sd_zbc_zone_wp_update() argument
534 int result = cmd->result; in sd_zbc_zone_wp_update()
535 struct request *rq = scsi_cmd_to_rq(cmd); in sd_zbc_zone_wp_update()
553 scsi_set_resid(cmd, blk_rq_bytes(rq)); in sd_zbc_zone_wp_update()
567 trace_scsi_zone_wp_update(cmd, rq->__sector, in sd_zbc_zone_wp_update()
606 unsigned int sd_zbc_complete(struct scsi_cmnd *cmd, unsigned int good_bytes, in sd_zbc_complete() argument
609 int result = cmd->result; in sd_zbc_complete()
610 struct request *rq = scsi_cmd_to_rq(cmd); in sd_zbc_complete()
623 good_bytes = sd_zbc_zone_wp_update(cmd, good_bytes); in sd_zbc_complete()