Re: [PATCH v2 07/15] scsi: spi: Convert to scsi_execute_args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/12/2022 06:13, Mike Christie wrote:
scsi_execute is going to be removed. Convert to the SPI class to
scsi_execute_args.

Signed-off-by: Mike Christie<michael.christie@xxxxxxxxxx>

FWIW, Apart from nit:

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>

---
  drivers/scsi/scsi_transport_spi.c | 28 ++++++++++++++--------------
  1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index f569cf0095c2..fa06821f3cb6 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -105,28 +105,28 @@ static int sprint_frac(char *dest, int value, int denom)
  }
static int spi_execute(struct scsi_device *sdev, const void *cmd,
-		       enum dma_data_direction dir,
-		       void *buffer, unsigned bufflen,
+		       enum req_op op, void *buffer, unsigned int bufflen,
  		       struct scsi_sense_hdr *sshdr)
  {
  	int i, result;
-	unsigned char sense[SCSI_SENSE_BUFFERSIZE];
  	struct scsi_sense_hdr sshdr_tmp;
+	blk_opf_t opf = op | REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+			REQ_FAILFAST_DRIVER;
+	struct scsi_exec_args exec_args = {
+		.req_flags = BLK_MQ_REQ_PM,

I think that .sshdr could still be assigned here, like:
		.sshdr = sshdr ? : &sshdr_tmp;

I think that is the proper syntax.

+	};
if (!sshdr)
  		sshdr = &sshdr_tmp;
+	exec_args.sshdr = sshdr;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux