summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2022-12-29 13:01:49 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2023-01-13 21:34:09 -0500
commitae4145a5f25e56b0248b38f913c5cc370cde723a (patch)
tree138488365fa5e7911bf7087d853899203359d56a /drivers/scsi
parent6ff236e847aa7817a985122ccef7e0f422eb8564 (diff)
downloadlinux-stable-ae4145a5f25e56b0248b38f913c5cc370cde723a.tar.gz
linux-stable-ae4145a5f25e56b0248b38f913c5cc370cde723a.tar.bz2
linux-stable-ae4145a5f25e56b0248b38f913c5cc370cde723a.zip
scsi: ses: Convert to scsi_execute_cmd()
scsi_execute_req() is going to be removed. Convert ses 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')
-rw-r--r--drivers/scsi/ses.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 0a1734f34587..869ca9c7f23f 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -89,10 +89,13 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
unsigned char recv_page_code;
unsigned int retries = SES_RETRIES;
struct scsi_sense_hdr sshdr;
+ const struct scsi_exec_args exec_args = {
+ .sshdr = &sshdr,
+ };
do {
- ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen,
- &sshdr, SES_TIMEOUT, 1, NULL);
+ ret = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_IN, buf, bufflen,
+ SES_TIMEOUT, 1, &exec_args);
} while (ret > 0 && --retries && scsi_sense_valid(&sshdr) &&
(sshdr.sense_key == NOT_READY ||
(sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29)));
@@ -130,10 +133,13 @@ static int ses_send_diag(struct scsi_device *sdev, int page_code,
};
struct scsi_sense_hdr sshdr;
unsigned int retries = SES_RETRIES;
+ const struct scsi_exec_args exec_args = {
+ .sshdr = &sshdr,
+ };
do {
- result = scsi_execute_req(sdev, cmd, DMA_TO_DEVICE, buf, bufflen,
- &sshdr, SES_TIMEOUT, 1, NULL);
+ result = scsi_execute_cmd(sdev, cmd, REQ_OP_DRV_OUT, buf,
+ bufflen, SES_TIMEOUT, 1, &exec_args);
} while (result > 0 && --retries && scsi_sense_valid(&sshdr) &&
(sshdr.sense_key == NOT_READY ||
(sshdr.sense_key == UNIT_ATTENTION && sshdr.asc == 0x29)));