iscsi: seperate iscsi interface from setup functions
PATCH 6/10 iscsi: seperate iscsi interface from setup functions
Quoted 1 line
From Mike Christie <[email protected]>"
HW iscsi LLDs like qla4xxx cannot use the iscsi class becuase the scsi_host is tied to the interface and class code. This patch just seperates the session and connection creation code from the sysfs and netlink interface code so that HW iscsi can use the class.
This is also fixes a couple refcount bugs that can be triggered when users have a sysfs file open, close the session, then read or write to the file.
drivers/scsi/Makefile +1 -0
@@ -164,6 +164,7 @@ CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags- zalon7xx-objs := zalon.o ncr53c8xx.o NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o libata-objs := libata-core.o libata-scsi.o +scsi_transport_iscsi-objs := libiscsi.o iscsi_if.o # Files generated that shall be removed upon make clean clean-files := 53c7xx_d.h 53c700_d.h \
drivers/scsi/iscsi_if.c new file +1093 -0
1,093 lines not on this page · raw message
drivers/scsi/iscsi_tcp.c +49 -48
197 lines not on this page · raw message
drivers/scsi/libiscsi.c new file +206 -0
206 lines not on this page · raw message
include/scsi/iscsi_if.h +4 -0
@@ -168,6 +168,10 @@ typedef uint64_t iscsi_connh_t; /* iSCS#define iscsi_ptr (_handle) ((void*)(unsigned long)_handle)#define iscsi_handle (_ptr) ((uint64_t)(unsigned long)_ptr) +/** +* iscsi_hostdata - get LLD hostdata from scsi_host +* @_hostdata: pointer to scsi host's hostdata +**/ #define iscsi_hostdata (_hostdata) ((void*)_hostdata + sizeof(unsigned long))/*
include/scsi/scsi_transport_iscsi.h +61 -8
103 lines not on this page · raw message
Quoted 23 lines · Mike Christie
Quoted 1 line
From Mike Christie <[email protected]>"
HW iscsi LLDs like qla4xxx cannot use the iscsi class becuase the
scsi_hostis tied to the interface and class code. This patch just seperates the session and connection creation code from the sysfs and netlink interface code so that HW iscsi can use the class.This is also fixes a couple refcount bugs that can be triggered when users have a sysfs file open, close the session, then read or write to the file.
Signed-off-by Alex Aizman <[email protected]>Signed-off-by Dmitry Yusupov <[email protected]>Signed-off-by Mike Christie <[email protected]>drivers/scsi/Makefile +0
-0
drivers/scsi/Makefile CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags- · line 167
Quoted 4 lines
drivers/scsi/Makefile +1
-0@@ -164,6 +164,7 @@ CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags- zalon7xx-objs := zalon.o ncr53c8xx.o NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o libata-objs := libata-core.o libata-scsi.o +scsi_transport_iscsi-objs := libiscsi.o iscsi_if.o
Please keep the interface file as scsi_transport_iscsi.c. libiscsi should become a separate module and/or be linked with with iscsi_tcp.ko
Quoted 5 lines · Christoph Hellwig
Quoted 5 lines
drivers/scsi/Makefile +0
-0@@ -164,6 +164,7 @@ CFLAGS_ncr53c8xx.o := $(ncr53c8xx-flags-
Quoted 9 lines
Quoted 4 lines
zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o
libata-objs := libata-core.o libata-scsi.o
+scsi_transport_iscsi-objs := libiscsi.o iscsi_if.oPlease keep the interface file as
scsi_transport_iscsi.c. libiscsi should become a separate module and/or be linked with with iscsi_tcp.ko
ok, I could actually make this more like libata and a normal transport class too. Let me respin this patch.