From 78d6da4517a4f352cd743de734d565142cf7a6a5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 9 Mar 2019 23:11:47 +0000 Subject: [PATCH] scst: Remove obsolete exec_req_fifo kernel patches git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8022 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- .../old_unsupported/26_scst-2.6.14-.patch | 77 ------------ .../rhel/scst_exec_req_fifo-2.6.18.patch | 109 ----------------- .../rhel/scst_exec_req_fifo-rhel5.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.15.patch | 78 ------------ scst/kernel/scst_exec_req_fifo-2.6.16.patch | 80 ------------- scst/kernel/scst_exec_req_fifo-2.6.18.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.21.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.22.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.23.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.24.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.25.patch | 109 ----------------- scst/kernel/scst_exec_req_fifo-2.6.26.patch | 112 ------------------ scst/kernel/scst_exec_req_fifo-2.6.27.patch | 112 ------------------ scst/kernel/scst_exec_req_fifo-2.6.28.patch | 112 ------------------ scst/kernel/scst_exec_req_fifo-2.6.29.patch | 112 ------------------ 15 files changed, 1555 deletions(-) delete mode 100644 scst/kernel/old_unsupported/26_scst-2.6.14-.patch delete mode 100644 scst/kernel/rhel/scst_exec_req_fifo-2.6.18.patch delete mode 100644 scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.15.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.16.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.18.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.21.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.22.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.23.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.24.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.25.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.26.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.27.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.28.patch delete mode 100644 scst/kernel/scst_exec_req_fifo-2.6.29.patch diff --git a/scst/kernel/old_unsupported/26_scst-2.6.14-.patch b/scst/kernel/old_unsupported/26_scst-2.6.14-.patch deleted file mode 100644 index c60a17894..000000000 --- a/scst/kernel/old_unsupported/26_scst-2.6.14-.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- linux-2.6.12-rc6/drivers/scsi/scsi_lib.c_scst 2005-06-15 16:15:01.000000000 +0400 -+++ linux-2.6.12-rc6/drivers/scsi/scsi_lib.c 2005-06-23 20:28:20.802971272 +0400 -@@ -235,6 +235,61 @@ void scsi_do_req(struct scsi_request *sr - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ scsi_insert_special_req(sreq, 0); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - static void scsi_wait_done(struct scsi_cmnd *cmd) - { - struct request *req = cmd->request; ---- linux-2.6.12-rc6/include/scsi/scsi_request.h_scst 2005-06-23 20:08:59.475519880 +0400 -+++ linux-2.6.12-rc6/include/scsi/scsi_request.h 2005-06-23 20:08:26.881474928 +0400 -@@ -54,6 +54,10 @@ extern void scsi_do_req(struct scsi_requ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - - struct scsi_mode_data { - __u32 length; diff --git a/scst/kernel/rhel/scst_exec_req_fifo-2.6.18.patch b/scst/kernel/rhel/scst_exec_req_fifo-2.6.18.patch deleted file mode 100644 index 5fcf7b220..000000000 --- a/scst/kernel/rhel/scst_exec_req_fifo-2.6.18.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.18/drivers/scsi/scsi_lib.c linux-2.6.18/drivers/scsi/scsi_lib.c ---- linux-2.6.18/drivers/scsi/scsi_lib.c 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18/drivers/scsi/scsi_lib.c 2007-07-04 21:15:32.000000000 +0400 -@@ -367,7 +367,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -378,11 +378,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kfree(sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.18/include/scsi/scsi_device.h linux-2.6.18/include/scsi/scsi_device.h ---- linux-2.6.18/include/scsi/scsi_device.h 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18/include/scsi/scsi_device.h 2007-07-04 21:15:32.000000000 +0400 -@@ -335,6 +335,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline void scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch b/scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch deleted file mode 100644 index 5fcf7b220..000000000 --- a/scst/kernel/rhel/scst_exec_req_fifo-rhel5.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.18/drivers/scsi/scsi_lib.c linux-2.6.18/drivers/scsi/scsi_lib.c ---- linux-2.6.18/drivers/scsi/scsi_lib.c 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18/drivers/scsi/scsi_lib.c 2007-07-04 21:15:32.000000000 +0400 -@@ -367,7 +367,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -378,11 +378,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kfree(sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.18/include/scsi/scsi_device.h linux-2.6.18/include/scsi/scsi_device.h ---- linux-2.6.18/include/scsi/scsi_device.h 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18/include/scsi/scsi_device.h 2007-07-04 21:15:32.000000000 +0400 -@@ -335,6 +335,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline void scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.15.patch b/scst/kernel/scst_exec_req_fifo-2.6.15.patch deleted file mode 100644 index cba7d34db..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.15.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -upr linux-2.6.15.6/drivers/scsi/scsi_lib.c linux-2.6.15.6/drivers/scsi/scsi_lib.c ---- linux-2.6.15.6/drivers/scsi/scsi_lib.c 2006-03-05 22:07:54.000000000 +0300 -+++ linux-2.6.15.6/drivers/scsi/scsi_lib.c 2007-07-05 13:11:43.000000000 +0400 -@@ -254,6 +254,61 @@ void scsi_do_req(struct scsi_request *sr - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ scsi_insert_special_req(sreq, 0); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - /** - * scsi_execute - insert request and wait for the result - * @sdev: scsi device -diff -upr linux-2.6.15.6/include/scsi/scsi_request.h linux-2.6.15.6/include/scsi/scsi_request.h ---- linux-2.6.15.6/include/scsi/scsi_request.h 2006-03-05 22:07:54.000000000 +0300 -+++ linux-2.6.15.6/include/scsi/scsi_request.h 2007-07-05 13:15:52.000000000 +0400 -@@ -51,4 +51,9 @@ extern void scsi_do_req(struct scsi_requ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - #endif /* _SCSI_SCSI_REQUEST_H */ diff --git a/scst/kernel/scst_exec_req_fifo-2.6.16.patch b/scst/kernel/scst_exec_req_fifo-2.6.16.patch deleted file mode 100644 index a93f9dbf9..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.16.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -upr linux-2.6.16.29/drivers/scsi/scsi_lib.c linux-2.6.16.29/drivers/scsi/scsi_lib.c ---- linux-2.6.16.29/drivers/scsi/scsi_lib.c 2006-09-12 22:02:10.000000000 +0400 -+++ linux-2.6.16.29/drivers/scsi/scsi_lib.c 2007-07-05 12:59:24.000000000 +0400 -@@ -227,6 +227,63 @@ void scsi_do_req(struct scsi_request *sr - } - EXPORT_SYMBOL(scsi_do_req); - -+/* -+ * Function: scsi_do_req_fifo -+ * -+ * Purpose: Queue a SCSI request -+ * -+ * Arguments: sreq - command descriptor. -+ * cmnd - actual SCSI command to be performed. -+ * buffer - data buffer. -+ * bufflen - size of data buffer. -+ * done - completion function to be run. -+ * timeout - how long to let it run before timeout. -+ * retries - number of retries we allow. -+ * -+ * Lock status: No locks held upon entry. -+ * -+ * Returns: Nothing. -+ * -+ * Notes: This function is used for queueing requests in FIFO order. -+ * It is a copy of scsi_do_req() with only changed the last -+ * parameter of scsi_insert_special_req(). Not sure, if it -+ * breaks quiesce, but, anyway, I don't see another way to -+ * queue requests in FIFO order, which is necessary for SCST. -+ */ -+void scsi_do_req_fifo(struct scsi_request *sreq, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done)(struct scsi_cmnd *), -+ int timeout, int retries) -+{ -+ /* -+ * If the upper level driver is reusing these things, then -+ * we should release the low-level block now. Another one will -+ * be allocated later when this request is getting queued. -+ */ -+ __scsi_release_request(sreq); -+ -+ /* -+ * Our own function scsi_done (which marks the host as not busy, -+ * disables the timeout counter, etc) will be called by us or by the -+ * scsi_hosts[host].queuecommand() function needs to also call -+ * the completion function for the high level driver. -+ */ -+ memcpy(sreq->sr_cmnd, cmnd, sizeof(sreq->sr_cmnd)); -+ sreq->sr_bufflen = bufflen; -+ sreq->sr_buffer = buffer; -+ sreq->sr_allowed = retries; -+ sreq->sr_done = done; -+ sreq->sr_timeout_per_command = timeout; -+ -+ if (sreq->sr_cmd_len == 0) -+ sreq->sr_cmd_len = COMMAND_SIZE(sreq->sr_cmnd[0]); -+ -+ sreq->sr_request->flags &= ~REQ_DONTPREP; -+ blk_insert_request(sreq->sr_device->request_queue, sreq->sr_request, -+ 1, sreq); -+} -+EXPORT_SYMBOL(scsi_do_req_fifo); -+ - /** - * scsi_execute - insert request and wait for the result - * @sdev: scsi device -diff -upr linux-2.6.16.29/include/scsi/scsi_request.h linux-2.6.16.29/include/scsi/scsi_request.h ---- linux-2.6.16.29/include/scsi/scsi_request.h 2006-09-12 22:02:10.000000000 +0400 -+++ linux-2.6.16.29/include/scsi/scsi_request.h 2007-07-05 13:01:04.000000000 +0400 -@@ -51,4 +51,9 @@ extern void scsi_do_req(struct scsi_requ - void *buffer, unsigned bufflen, - void (*done) (struct scsi_cmnd *), - int timeout, int retries); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern void scsi_do_req_fifo(struct scsi_request *, const void *cmnd, -+ void *buffer, unsigned bufflen, -+ void (*done) (struct scsi_cmnd *), -+ int timeout, int retries); - #endif /* _SCSI_SCSI_REQUEST_H */ diff --git a/scst/kernel/scst_exec_req_fifo-2.6.18.patch b/scst/kernel/scst_exec_req_fifo-2.6.18.patch deleted file mode 100644 index d4a9d560d..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.18.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.18.1/drivers/scsi/scsi_lib.c linux-2.6.18.1/drivers/scsi/scsi_lib.c ---- linux-2.6.18.1/drivers/scsi/scsi_lib.c 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18.1/drivers/scsi/scsi_lib.c 2007-07-04 21:15:32.000000000 +0400 -@@ -367,7 +367,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -378,11 +378,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kfree(sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.18.1/include/scsi/scsi_device.h linux-2.6.18.1/include/scsi/scsi_device.h ---- linux-2.6.18.1/include/scsi/scsi_device.h 2006-09-20 07:42:06.000000000 +0400 -+++ linux-2.6.18.1/include/scsi/scsi_device.h 2007-07-04 21:15:32.000000000 +0400 -@@ -297,6 +297,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline void scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.21.patch b/scst/kernel/scst_exec_req_fifo-2.6.21.patch deleted file mode 100644 index 2be754d13..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.21.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.21.1/drivers/scsi/scsi_lib.c linux-2.6.21.1/drivers/scsi/scsi_lib.c ---- linux-2.6.21.1/drivers/scsi/scsi_lib.c 2007-04-28 01:49:26.000000000 +0400 -+++ linux-2.6.21.1/drivers/scsi/scsi_lib.c 2007-06-20 13:19:50.000000000 +0400 -@@ -366,7 +366,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -377,11 +377,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.21.1/include/scsi/scsi_device.h linux-2.6.21.1/include/scsi/scsi_device.h ---- linux-2.6.21.1/include/scsi/scsi_device.h 2007-04-28 01:49:26.000000000 +0400 -+++ linux-2.6.21.1/include/scsi/scsi_device.h 2007-06-20 13:25:07.000000000 +0400 -@@ -298,6 +298,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.22.patch b/scst/kernel/scst_exec_req_fifo-2.6.22.patch deleted file mode 100644 index 23ff63927..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.22.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.22/drivers/scsi/scsi_lib.c linux-2.6.22/drivers/scsi/scsi_lib.c ---- linux-2.6.22/drivers/scsi/scsi_lib.c 2007-07-09 03:32:17.000000000 +0400 -+++ linux-2.6.22/drivers/scsi/scsi_lib.c 2007-07-18 13:34:54.000000000 +0400 -@@ -366,7 +366,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -377,11 +377,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.22/include/scsi/scsi_device.h linux-2.6.22/include/scsi/scsi_device.h ---- linux-2.6.22/include/scsi/scsi_device.h 2007-07-09 03:32:17.000000000 +0400 -+++ linux-2.6.22/include/scsi/scsi_device.h 2007-07-18 13:34:54.000000000 +0400 -@@ -303,6 +303,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.23.patch b/scst/kernel/scst_exec_req_fifo-2.6.23.patch deleted file mode 100644 index 52add2cc8..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.23.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upr linux-2.6.23/drivers/scsi/scsi_lib.c linux-2.6.23/drivers/scsi/scsi_lib.c ---- linux-2.6.23/drivers/scsi/scsi_lib.c 2007-10-10 00:31:38.000000000 +0400 -+++ linux-2.6.23/drivers/scsi/scsi_lib.c 2007-10-10 12:37:27.000000000 +0400 -@@ -366,7 +366,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -377,11 +377,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -418,7 +421,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -427,8 +430,53 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.23/include/scsi/scsi_device.h linux-2.6.23/include/scsi/scsi_device.h ---- linux-2.6.23/include/scsi/scsi_device.h 2007-10-10 00:31:38.000000000 +0400 -+++ linux-2.6.23/include/scsi/scsi_device.h 2007-10-10 12:37:27.000000000 +0400 -@@ -303,6 +303,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.24.patch b/scst/kernel/scst_exec_req_fifo-2.6.24.patch deleted file mode 100644 index 80c89c45c..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.24.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upkr linux-2.6.24/drivers/scsi/scsi_lib.c linux-2.6.24/drivers/scsi/scsi_lib.c ---- linux-2.6.24/drivers/scsi/scsi_lib.c 2008-01-25 01:58:37.000000000 +0300 -+++ linux-2.6.24/drivers/scsi/scsi_lib.c 2008-01-28 11:10:30.000000000 +0300 -@@ -361,7 +361,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -372,11 +372,14 @@ free_bios: - * @timeout: request timeout in seconds - * @retries: number of times to retry request - * @flags: or into request flags -+ * @at_head: insert request at head or tail of queue - **/ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -413,7 +416,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -422,8 +425,53 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upkr linux-2.6.24/include/scsi/scsi_device.h linux-2.6.24/include/scsi/scsi_device.h ---- linux-2.6.24/include/scsi/scsi_device.h 2008-01-25 01:58:37.000000000 +0300 -+++ linux-2.6.24/include/scsi/scsi_device.h 2008-01-28 11:10:30.000000000 +0300 -@@ -331,6 +331,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.25.patch b/scst/kernel/scst_exec_req_fifo-2.6.25.patch deleted file mode 100644 index 13692430a..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.25.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff -upkr linux-2.6.25/drivers/scsi/scsi_lib.c linux-2.6.25/drivers/scsi/scsi_lib.c ---- linux-2.6.25/drivers/scsi/scsi_lib.c 2008-04-17 06:49:44.000000000 +0400 -+++ linux-2.6.25/drivers/scsi/scsi_lib.c 2008-04-18 14:19:27.000000000 +0400 -@@ -363,7 +363,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -376,11 +376,14 @@ free_bios: - * @privdata: data passed to done() - * @done: callback function when done - * @gfp: memory allocation flags -+ * @at_head: insert request at head or tail of queue - */ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -417,7 +420,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -426,8 +429,53 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, unsigned bufflen, -+ int use_sg, int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upkr linux-2.6.25/include/scsi/scsi_device.h linux-2.6.25/include/scsi/scsi_device.h ---- linux-2.6.25/include/scsi/scsi_device.h 2008-04-17 06:49:44.000000000 +0400 -+++ linux-2.6.25/include/scsi/scsi_device.h 2008-04-18 13:31:09.000000000 +0400 -@@ -332,6 +332,13 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, int data_direction, -+ void *buffer, unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.26.patch b/scst/kernel/scst_exec_req_fifo-2.6.26.patch deleted file mode 100644 index 882cf7898..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.26.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -upr linux-2.6.26/drivers/scsi/scsi_lib.c linux-2.6.26/drivers/scsi/scsi_lib.c ---- linux-2.6.26/drivers/scsi/scsi_lib.c 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.26/drivers/scsi/scsi_lib.c 2008-07-31 21:20:00.000000000 +0400 -@@ -372,7 +372,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -385,11 +385,14 @@ free_bios: - * @privdata: data passed to done() - * @done: callback function when done - * @gfp: memory allocation flags -+ * @at_head: insert request at head or tail of queue - */ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -426,7 +429,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -435,8 +438,55 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, -+ int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, int retries, -+ void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.26/include/scsi/scsi_device.h linux-2.6.26/include/scsi/scsi_device.h ---- linux-2.6.26/include/scsi/scsi_device.h 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.26/include/scsi/scsi_device.h 2008-07-31 21:20:39.000000000 +0400 -@@ -333,6 +333,14 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, -+ int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.27.patch b/scst/kernel/scst_exec_req_fifo-2.6.27.patch deleted file mode 100644 index 828121b15..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.27.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -upr linux-2.6.27/drivers/scsi/scsi_lib.c linux-2.6.27/drivers/scsi/scsi_lib.c ---- linux-2.6.27/drivers/scsi/scsi_lib.c 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.27/drivers/scsi/scsi_lib.c 2008-07-31 21:20:00.000000000 +0400 -@@ -372,7 +372,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -385,11 +385,14 @@ free_bios: - * @privdata: data passed to done() - * @done: callback function when done - * @gfp: memory allocation flags -+ * @at_head: insert request at head or tail of queue - */ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -426,7 +429,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -435,8 +438,55 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, -+ int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, int retries, -+ void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.27/include/scsi/scsi_device.h linux-2.6.27/include/scsi/scsi_device.h ---- linux-2.6.27/include/scsi/scsi_device.h 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.27/include/scsi/scsi_device.h 2008-07-31 21:20:39.000000000 +0400 -@@ -365,6 +365,14 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, -+ int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.28.patch b/scst/kernel/scst_exec_req_fifo-2.6.28.patch deleted file mode 100644 index 076999962..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.28.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -upr linux-2.6.28/drivers/scsi/scsi_lib.c linux-2.6.28/drivers/scsi/scsi_lib.c ---- linux-2.6.28/drivers/scsi/scsi_lib.c 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.28/drivers/scsi/scsi_lib.c 2008-07-31 21:20:00.000000000 +0400 -@@ -380,7 +380,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -393,11 +393,14 @@ free_bios: - * @privdata: data passed to done() - * @done: callback function when done - * @gfp: memory allocation flags -+ * @at_head: insert request at head or tail of queue - */ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -434,7 +439,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -443,8 +446,55 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, -+ int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, int retries, -+ void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.28/include/scsi/scsi_device.h linux-2.6.28/include/scsi/scsi_device.h ---- linux-2.6.28/include/scsi/scsi_device.h 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.28/include/scsi/scsi_device.h 2008-07-31 21:20:39.000000000 +0400 -@@ -377,6 +377,14 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, -+ int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - { diff --git a/scst/kernel/scst_exec_req_fifo-2.6.29.patch b/scst/kernel/scst_exec_req_fifo-2.6.29.patch deleted file mode 100644 index ceb771e22..000000000 --- a/scst/kernel/scst_exec_req_fifo-2.6.29.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -upr linux-2.6.29/drivers/scsi/scsi_lib.c linux-2.6.29/drivers/scsi/scsi_lib.c ---- linux-2.6.29/drivers/scsi/scsi_lib.c 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.29/drivers/scsi/scsi_lib.c 2008-07-31 21:20:00.000000000 +0400 -@@ -402,7 +402,7 @@ free_bios: - } - - /** -- * scsi_execute_async - insert request -+ * __scsi_execute_async - insert request - * @sdev: scsi device - * @cmd: scsi command - * @cmd_len: length of scsi cdb -@@ -415,11 +415,14 @@ free_bios: - * @privdata: data passed to done() - * @done: callback function when done - * @gfp: memory allocation flags -+ * @at_head: insert request at head or tail of queue - */ --int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+static inline int __scsi_execute_async(struct scsi_device *sdev, -+ const unsigned char *cmd, - int cmd_len, int data_direction, void *buffer, unsigned bufflen, - int use_sg, int timeout, int retries, void *privdata, -- void (*done)(void *, char *, int, int), gfp_t gfp) -+ void (*done)(void *, char *, int, int), gfp_t gfp, -+ int at_head) - { - struct request *req; - struct scsi_io_context *sioc; -@@ -456,7 +461,7 @@ int scsi_execute_async(struct scsi_devic - sioc->data = privdata; - sioc->done = done; - -- blk_execute_rq_nowait(req->q, NULL, req, 1, scsi_end_async); -+ blk_execute_rq_nowait(req->q, NULL, req, at_head, scsi_end_async); - return 0; - - free_req: -@@ -465,8 +468,55 @@ free_sense: - kmem_cache_free(scsi_io_context_cache, sioc); - return DRIVER_ERROR << 24; - } -+ -+/** -+ * scsi_execute_async - insert request -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, -+ int retries, void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 1); -+} - EXPORT_SYMBOL_GPL(scsi_execute_async); - -+/** -+ * scsi_execute_async_fifo - insert request at tail, in FIFO order -+ * @sdev: scsi device -+ * @cmd: scsi command -+ * @cmd_len: length of scsi cdb -+ * @data_direction: data direction -+ * @buffer: data buffer (this can be a kernel buffer or scatterlist) -+ * @bufflen: len of buffer -+ * @use_sg: if buffer is a scatterlist this is the number of elements -+ * @timeout: request timeout in seconds -+ * @retries: number of times to retry request -+ * @flags: or into request flags -+ **/ -+int scsi_execute_async_fifo(struct scsi_device *sdev, const unsigned char *cmd, -+ int cmd_len, int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, int timeout, int retries, -+ void *privdata, -+ void (*done)(void *, char *, int, int), gfp_t gfp) -+{ -+ return __scsi_execute_async(sdev, cmd, cmd_len, data_direction, buffer, -+ bufflen, use_sg, timeout, retries, privdata, done, gfp, 0); -+} -+EXPORT_SYMBOL_GPL(scsi_execute_async_fifo); -+ - /* - * Function: scsi_init_cmd_errh() - * -diff -upr linux-2.6.29/include/scsi/scsi_device.h linux-2.6.29/include/scsi/scsi_device.h ---- linux-2.6.29/include/scsi/scsi_device.h 2008-07-14 01:51:29.000000000 +0400 -+++ linux-2.6.29/include/scsi/scsi_device.h 2008-07-31 21:20:39.000000000 +0400 -@@ -376,6 +376,14 @@ extern int scsi_execute_async(struct scs - int timeout, int retries, void *privdata, - void (*done)(void *, char *, int, int), - gfp_t gfp); -+#define SCSI_EXEC_REQ_FIFO_DEFINED -+extern int scsi_execute_async_fifo(struct scsi_device *sdev, -+ const unsigned char *cmd, int cmd_len, -+ int data_direction, void *buffer, -+ unsigned bufflen, int use_sg, -+ int timeout, int retries, void *privdata, -+ void (*done)(void *, char *, int, int), -+ gfp_t gfp); - - static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev) - {