Commit d1d81c01 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] iscsi_tcp: remove DMA alignment restriction

Add a slave_configure function to iSCSI TCP to remove any DMA
alignment restriction.  This permits the use of direct IO from
arbitrary addresses.
Signed-off-by: default avatarPete Wyckoff <pw@osc.edu>
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent dbdb016d
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <scsi/scsi_cmnd.h> #include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h> #include <scsi/scsi_host.h>
#include <scsi/scsi.h> #include <scsi/scsi.h>
#include <scsi/scsi_transport_iscsi.h> #include <scsi/scsi_transport_iscsi.h>
...@@ -2184,6 +2185,12 @@ static void iscsi_tcp_session_destroy(struct iscsi_cls_session *cls_session) ...@@ -2184,6 +2185,12 @@ static void iscsi_tcp_session_destroy(struct iscsi_cls_session *cls_session)
iscsi_session_teardown(cls_session); iscsi_session_teardown(cls_session);
} }
static int iscsi_tcp_slave_configure(struct scsi_device *sdev)
{
blk_queue_dma_alignment(sdev->request_queue, 0);
return 0;
}
static struct scsi_host_template iscsi_sht = { static struct scsi_host_template iscsi_sht = {
.name = "iSCSI Initiator over TCP/IP", .name = "iSCSI Initiator over TCP/IP",
.queuecommand = iscsi_queuecommand, .queuecommand = iscsi_queuecommand,
...@@ -2195,6 +2202,7 @@ static struct scsi_host_template iscsi_sht = { ...@@ -2195,6 +2202,7 @@ static struct scsi_host_template iscsi_sht = {
.eh_abort_handler = iscsi_eh_abort, .eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset, .eh_host_reset_handler = iscsi_eh_host_reset,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
.slave_configure = iscsi_tcp_slave_configure,
.proc_name = "iscsi_tcp", .proc_name = "iscsi_tcp",
.this_id = -1, .this_id = -1,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment