Commit 547f9a21 authored by Eric Moore's avatar Eric Moore Committed by James Bottomley

[SCSI] mptsas: wide port support

* Wide port support added - using James Bottomley's new SAS wide port API.
(There is a known problem in sas transport layer reported yesterday to
James. The Kobject dev.bus_ids for end devices are not unique across
expanders. I have added a work around in this patch, where I asigning
an unique port identifier for every port within the host - this solves
the problem, but I expect a fix from James in the sas transport).

* Adding target_alloc and target_destroy entry points, and moving code over
from the slave entry points.

* The renaming of some mptscsih_xxx functions declared in mptsas.c,
to mptsas_xxx.

* Target Reset moved from slave_destroy to hotplug work thread
handling (with regard to device removal). Also inhibit IO to end device
while device is being broken down . Talked to James Smart about this
at Linux Expo (with questions of how the fc transport handles this).

* Cleaning up the kzalloc's, and kfree's
Signed-off-by: default avatarEric Moore <Eric.Moore@lsil.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 65c92b09
...@@ -33,6 +33,11 @@ ...@@ -33,6 +33,11 @@
# For mptfc: # For mptfc:
#CFLAGS_mptfc.o += -DMPT_DEBUG_FC #CFLAGS_mptfc.o += -DMPT_DEBUG_FC
# For mptsas:
#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS
#CFLAGS_mptsas.o += -DMPT_DEBUG_SAS_WIDE
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
obj-$(CONFIG_FUSION_SPI) += mptbase.o mptscsih.o mptspi.o obj-$(CONFIG_FUSION_SPI) += mptbase.o mptscsih.o mptspi.o
......
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
#define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR
#endif #endif
#define MPT_LINUX_VERSION_COMMON "3.03.10" #define MPT_LINUX_VERSION_COMMON "3.04.00"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.03.10" #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.00"
#define WHAT_MAGIC_STRING "@" "(" "#" ")" #define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \ #define show_mptmod_ver(s,ver) \
...@@ -342,6 +342,7 @@ typedef struct _VirtTarget { ...@@ -342,6 +342,7 @@ typedef struct _VirtTarget {
u8 negoFlags; /* bit field, see above */ u8 negoFlags; /* bit field, see above */
u8 raidVolume; /* set, if RAID Volume */ u8 raidVolume; /* set, if RAID Volume */
u8 type; /* byte 0 of Inquiry data */ u8 type; /* byte 0 of Inquiry data */
u8 deleted; /* target in process of being removed */
u32 num_luns; u32 num_luns;
u32 luns[8]; /* Max LUNs is 256 */ u32 luns[8]; /* Max LUNs is 256 */
} VirtTarget; } VirtTarget;
...@@ -633,7 +634,7 @@ typedef struct _MPT_ADAPTER ...@@ -633,7 +634,7 @@ typedef struct _MPT_ADAPTER
int sas_index; /* index refrencing */ int sas_index; /* index refrencing */
MPT_SAS_MGMT sas_mgmt; MPT_SAS_MGMT sas_mgmt;
int num_ports; int num_ports;
struct work_struct mptscsih_persistTask; struct work_struct sas_persist_task;
struct work_struct fc_setup_reset_work; struct work_struct fc_setup_reset_work;
struct list_head fc_rports; struct list_head fc_rports;
...@@ -642,6 +643,7 @@ typedef struct _MPT_ADAPTER ...@@ -642,6 +643,7 @@ typedef struct _MPT_ADAPTER
struct work_struct fc_rescan_work; struct work_struct fc_rescan_work;
char fc_rescan_work_q_name[KOBJ_NAME_LEN]; char fc_rescan_work_q_name[KOBJ_NAME_LEN];
struct workqueue_struct *fc_rescan_work_q; struct workqueue_struct *fc_rescan_work_q;
u8 port_serial_number;
} MPT_ADAPTER; } MPT_ADAPTER;
/* /*
...@@ -893,6 +895,13 @@ typedef struct _mpt_sge { ...@@ -893,6 +895,13 @@ typedef struct _mpt_sge {
#define DBG_DUMP_REQUEST_FRAME_HDR(mfp) #define DBG_DUMP_REQUEST_FRAME_HDR(mfp)
#endif #endif
// debug sas wide ports
#ifdef MPT_DEBUG_SAS_WIDE
#define dsaswideprintk(x) printk x
#else
#define dsaswideprintk(x)
#endif
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
......
This diff is collapsed.
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