diff options
author | Mike Christie <michael.christie@oracle.com> | 2022-12-29 20:01:50 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-01-14 03:34:09 +0100 |
commit | 49d33b6245d91a2ca20755cd4edf86dd0e49649e (patch) | |
tree | f87ec8697d4ca181338281219e618704a665942f /drivers/scsi/sr.c | |
parent | scsi: ses: Convert to scsi_execute_cmd() (diff) | |
download | linux-49d33b6245d91a2ca20755cd4edf86dd0e49649e.tar.xz linux-49d33b6245d91a2ca20755cd4edf86dd0e49649e.zip |
scsi: sr: Convert to scsi_execute_cmd()
scsi_execute*() is going to be removed. Convert sr 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>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index a278b739d0c5..9e51dcd30bfd 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -170,10 +170,13 @@ static unsigned int sr_get_events(struct scsi_device *sdev) struct event_header *eh = (void *)buf; struct media_event_desc *med = (void *)(buf + 4); struct scsi_sense_hdr sshdr; + const struct scsi_exec_args exec_args = { + .sshdr = &sshdr, + }; int result; - result = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, sizeof(buf), - &sshdr, SR_TIMEOUT, MAX_RETRIES, NULL); + result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buf, sizeof(buf), + SR_TIMEOUT, MAX_RETRIES, &exec_args); if (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION) return DISK_EVENT_MEDIA_CHANGE; @@ -730,8 +733,8 @@ static void get_sectorsize(struct scsi_cd *cd) memset(buffer, 0, sizeof(buffer)); /* Do the command and wait.. */ - the_result = scsi_execute_req(cd->device, cmd, DMA_FROM_DEVICE, - buffer, sizeof(buffer), NULL, + the_result = scsi_execute_cmd(cd->device, cmd, REQ_OP_DRV_IN, + buffer, sizeof(buffer), SR_TIMEOUT, MAX_RETRIES, NULL); retries--; |