Or Gerlitz wrote:
Christoph Hellwig wrote:
looks like you have a testcase for SCSI_IOCTL_SEND_COMMAND, nice.
Could you test the patch below, which should make this remaning user
of non-SG commands go away?

Cool, I have tested your patch against the official 2.6.16 and it works!

OK, your patch goes into 2.6.17 then i will patch iser with the below,
please let me know, i am still not catching all the linux-scsi mailing traffic...

Or.



Index: iser_initiator.c
===================================================================
--- iser_initiator.c    (revision 5924)
+++ iser_initiator.c    (working copy)
@@ -38,6 +38,7 @@
 #include <asm/scatterlist.h>
 #include <linux/scatterlist.h>
 #include <scsi/scsi_cmnd.h>
+#include <linux/version.h>
 
 #include "iscsi_iser.h"
 
@@ -379,6 +380,7 @@ int iser_send_command(struct iscsi_iser_
        else
                data_buf = &ctask->data[ISER_DIR_OUT];
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)
        if (sc->use_sg) { /* using a scatter list */
                data_buf->buf  = sc->request_buffer;
                data_buf->size = sc->use_sg;
@@ -388,7 +390,13 @@ int iser_send_command(struct iscsi_iser_
                data_buf->buf   = &data_buf->sg_single;
                data_buf->size  = 1;
        }
-
+#else
+       if (sc->sc_data_direction != DMA_NONE) {
+               BUG_ON(sc->use_sg == 0);
+               data_buf->buf  = sc->request_buffer;
+               data_buf->size = sc->use_sg;
+       }               
+#endif
        if (hdr->flags & ISCSI_FLAG_CMD_READ) {
                err = iser_prepare_read_cmd(ctask, edtl);
                if (err)
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to