mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
scsi: zbc: Convert to scsi_execute_cmd()
scsi_execute_req() is going to be removed. Conver zbc to scsi_execute_cmd(). Signed-off-by: Mike Christie <michael.christie@oracle.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
af16cd63d9
commit
6ff236e847
|
|
@ -148,6 +148,9 @@ static int sd_zbc_do_report_zones(struct scsi_disk *sdkp, unsigned char *buf,
|
||||||
struct scsi_device *sdp = sdkp->device;
|
struct scsi_device *sdp = sdkp->device;
|
||||||
const int timeout = sdp->request_queue->rq_timeout;
|
const int timeout = sdp->request_queue->rq_timeout;
|
||||||
struct scsi_sense_hdr sshdr;
|
struct scsi_sense_hdr sshdr;
|
||||||
|
const struct scsi_exec_args exec_args = {
|
||||||
|
.sshdr = &sshdr,
|
||||||
|
};
|
||||||
unsigned char cmd[16];
|
unsigned char cmd[16];
|
||||||
unsigned int rep_len;
|
unsigned int rep_len;
|
||||||
int result;
|
int result;
|
||||||
|
|
@ -160,9 +163,8 @@ static int sd_zbc_do_report_zones(struct scsi_disk *sdkp, unsigned char *buf,
|
||||||
if (partial)
|
if (partial)
|
||||||
cmd[14] = ZBC_REPORT_ZONE_PARTIAL;
|
cmd[14] = ZBC_REPORT_ZONE_PARTIAL;
|
||||||
|
|
||||||
result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE,
|
result = scsi_execute_cmd(sdp, cmd, REQ_OP_DRV_IN, buf, buflen,
|
||||||
buf, buflen, &sshdr,
|
timeout, SD_MAX_RETRIES, &exec_args);
|
||||||
timeout, SD_MAX_RETRIES, NULL);
|
|
||||||
if (result) {
|
if (result) {
|
||||||
sd_printk(KERN_ERR, sdkp,
|
sd_printk(KERN_ERR, sdkp,
|
||||||
"REPORT ZONES start lba %llu failed\n", lba);
|
"REPORT ZONES start lba %llu failed\n", lba);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user