From 7dbee8e0d017f9fe39c8b9c1b1d4fb03d5b12307 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 03:40:13 +0000 Subject: [PATCH] Merge r7404 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7661 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index ff241e2b9..a221b8f04 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6862,6 +6862,21 @@ out: return res; } +/** + * scsi_execute - insert a SCSI request and wait for the result + * @sdev: scsi device + * @cmd: scsi command + * @data_direction: data direction + * @buffer: data buffer + * @bufflen: length of buffer - DMA_TO_DEVICE, DMA_FROM_DEVICE or DMA_NONE + * @sense: optional sense buffer + * @timeout: request timeout in seconds + * @retries: number of times to retry request + * @flags: flags for ->cmd_flags, e.g. REQ_FAILFAST_DEV + * + * Returns the scsi_cmnd result field if a command was executed, or a negative + * Linux error code if we didn't get that far. + */ int scst_scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned int bufflen, unsigned char *sense, int timeout, int retries, u64 flags)