From 6a125e268c2a6e66e5a70be386e03b912b630437 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 17 Nov 2010 19:40:20 +0000 Subject: [PATCH] ibmvstgt updates: Corrected last argument of scst_rx_cmd() / updated a comment. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2742 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- ibmvstgt/src/ibmvstgt.c | 7 ++++--- ibmvstgt/src/libsrp.c | 5 +++-- ibmvstgt/src/libsrpnew.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ibmvstgt/src/ibmvstgt.c b/ibmvstgt/src/ibmvstgt.c index b5654baef..66c647a06 100644 --- a/ibmvstgt/src/ibmvstgt.c +++ b/ibmvstgt/src/ibmvstgt.c @@ -820,7 +820,8 @@ static void process_srp_iu(struct iu_entry *iue) process_tsk_mgmt(iue); break; case SRP_CMD: - err = srp_cmd_queue(vport->sess, &iu->srp.cmd, iue); + err = srp_cmd_queue(vport->sess, &iu->srp.cmd, iue, + SCST_NON_ATOMIC); if (err) { eprintk("cannot queue cmd %p %d\n", &iu->srp.cmd, err); srp_iu_put(iue); @@ -1038,8 +1039,8 @@ static inline struct viosrp_crq *next_crq(struct crq_queue *queue) * handle_crq() - Process the command/response queue. * * Note: Although this function is not thread-safe because of how it is - * scheduled it is guaranteed that this function will never be scheduled - * concurrently against itself. + * scheduled it is guaranteed that this function will never run concurrently + * with itself. */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19) static void handle_crq(void *ctx) diff --git a/ibmvstgt/src/libsrp.c b/ibmvstgt/src/libsrp.c index eb99746ca..466969d96 100644 --- a/ibmvstgt/src/libsrp.c +++ b/ibmvstgt/src/libsrp.c @@ -427,7 +427,8 @@ int srp_data_length(struct srp_cmd *cmd, enum dma_data_direction dir) } EXPORT_SYMBOL_GPL(srp_data_length); -int srp_cmd_queue(struct scst_session *sess, struct srp_cmd *cmd, void *info) +int srp_cmd_queue(struct scst_session *sess, struct srp_cmd *cmd, void *info, + int atomic) { enum dma_data_direction dir; struct scst_cmd *sc; @@ -458,7 +459,7 @@ int srp_cmd_queue(struct scst_session *sess, struct srp_cmd *cmd, void *info) cmd->lun, dir, len, tag, (unsigned long long) cmd->tag); sc = scst_rx_cmd(sess, (u8 *) &cmd->lun, sizeof(cmd->lun), - cmd->cdb, sizeof(cmd->cdb), SCST_CONTEXT_THREAD); + cmd->cdb, sizeof(cmd->cdb), atomic); if (!sc) return -ENOMEM; diff --git a/ibmvstgt/src/libsrpnew.h b/ibmvstgt/src/libsrpnew.h index 12ad31d62..52d98b6ba 100644 --- a/ibmvstgt/src/libsrpnew.h +++ b/ibmvstgt/src/libsrpnew.h @@ -59,7 +59,7 @@ extern struct iu_entry *srp_iu_get(struct srp_target *); extern void srp_iu_put(struct iu_entry *); extern int srp_data_length(struct srp_cmd *, enum dma_data_direction); -extern int srp_cmd_queue(struct scst_session *, struct srp_cmd *, void *); +extern int srp_cmd_queue(struct scst_session *, struct srp_cmd *, void *, int); extern int srp_transfer_data(struct scst_cmd *, struct srp_cmd *, srp_rdma_t, int, int);