Commit 05862384 authored by Pam Delaney's avatar Pam Delaney Committed by Linus Torvalds

[PATCH] Fusion-MPT driver update

This updates the Fusion-MPT driver to the latest stable version.
Changes affect the driver source only.

Major Changes:
Reworked the calls save_flags, cli, restore_flags to 2.5 format.
Modified DV  invocation and to handle illegal bus configuration
Negotiation settings honor NVRAM

Bug Fix: Pushing F/W onto part during driver unload.
Bug Fix: Force F/W reset for 1030 on driver load.
Bug Fix: F/W download algorithm.
Bug Fix: Found a memory leak in mptctl.c
Bug Fix: Forcing data direction for reads and writes (sg issue)
Bug Fix: Wrong mask in Inquiry data ANSI version

Minor Changes:
Modified the debug and logging statements of the driver
Upgraded the MPI include files (lsi/)
parent 25f0da24
# #
# Makefile for the LSI Logic Fusion MPT (Message Passing Technology) drivers. # Makefile for the LSI Logic Fusion MPT (Message Passing Technology) drivers.
# #
# Note! If you want to turn on various debug defines for an extended period of # Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now inherited from the
# parent makefile.
#
# Note 3! If you want to turn on various debug defines for an extended period of
# time but don't want them lingering around in the Makefile when you pass it on # time but don't want them lingering around in the Makefile when you pass it on
# to someone else, use the MPT_CFLAGS env variable (thanks Steve). -nromer # to someone else, use the MPT_CFLAGS env variable (thanks Steve). -nromer
...@@ -20,6 +27,7 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS} ...@@ -20,6 +27,7 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS}
#EXTRA_CFLAGS += -DDEBUG #EXTRA_CFLAGS += -DDEBUG
#EXTRA_CFLAGS += -DMPT_DEBUG #EXTRA_CFLAGS += -DMPT_DEBUG
#EXTRA_CFLAGS += -DMPT_DEBUG_MSG_FRAME #EXTRA_CFLAGS += -DMPT_DEBUG_MSG_FRAME
#EXTRA_CFLAGS += -DMPT_DEBUG_SG
# #
# driver/module specifics... # driver/module specifics...
# #
...@@ -27,11 +35,13 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS} ...@@ -27,11 +35,13 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS}
#CFLAGS_mptbase.o += -DMPT_DEBUG_HANDSHAKE #CFLAGS_mptbase.o += -DMPT_DEBUG_HANDSHAKE
#CFLAGS_mptbase.o += -DMPT_DEBUG_IRQ #CFLAGS_mptbase.o += -DMPT_DEBUG_IRQ
# #
# For {mptscsih, mptctl}: # For mptscsih:
#CFLAGS_mptscsih.o += -DMPT_SCSI_USE_NEW_EH
#CFLAGS_mptscsih.o += -DMPT_DEBUG_SCANDV #CFLAGS_mptscsih.o += -DMPT_DEBUG_SCANDV
#CFLAGS_mptscsih.o += -DMPT_DEBUG_SG #CFLAGS_mptscsih.o += -DMPT_DEBUG_RESET
#CFLAGS_mptctl.o += -DMPT_DEBUG_SG #CFLAGS_mptscsih.o += -DMPT_DEBUG_NEH
#
# For mptctl:
#CFLAGS_mptctl.o += -DMPT_DEBUG_IOCTL
# #
# For mptlan: # For mptlan:
#CFLAGS_mptlan.o += -DMPT_LAN_IO_DEBUG #CFLAGS_mptlan.o += -DMPT_LAN_IO_DEBUG
...@@ -43,11 +53,27 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS} ...@@ -43,11 +53,27 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS}
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
export-objs := mptbase.o O_TARGET := fusion.o
export-objs := mptbase.o mptscsih.o mptlan.o mptctl.o isense.o
# ? what's list-multi for?
#list-multi := fusion.o mptscsih.o
obj-$(CONFIG_FUSION) += mptbase.o mptscsih.o obj-$(CONFIG_FUSION) += mptbase.o mptscsih.o
obj-$(CONFIG_FUSION_ISENSE) += isense.o obj-$(CONFIG_FUSION_ISENSE) += isense.o
obj-$(CONFIG_FUSION_CTL) += mptctl.o obj-$(CONFIG_FUSION_CTL) += mptctl.o
obj-$(CONFIG_FUSION_LAN) += mptlan.o obj-$(CONFIG_FUSION_LAN) += mptlan.o
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
# EXP...
## Fusion MPT extra's...
##mptscsih.o: $(mptscsih-objs)
## $(LD) -r -o $@ $(mptscsih-objs)
...@@ -252,6 +252,27 @@ static __inline__ int __get_order(unsigned long size) ...@@ -252,6 +252,27 @@ static __inline__ int __get_order(unsigned long size)
#define MPT_SCSI_USE_NEW_EH #define MPT_SCSI_USE_NEW_EH
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#define mptscsih_save_flags(flags) \
({ local_save_flags(flags); \
local_irq_disable(); \
})
#else
#define mptscsih_save_flags(flags) \
({ save_flags(flags); \
cli(); \
})
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
#define mptscsih_restore_flags(flags) \
({ local_irq_enable(); \
local_irq_restore(flags); \
})
#else
#define mptscsih_restore_flags(flags) restore_flags(flags);
#endif
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif /* _LINUX_COMPAT_H */ #endif /* _LINUX_COMPAT_H */
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI.H * Name: MPI.H
* Title: MPI Message independent structures and definitions * Title: MPI Message independent structures and definitions
* Creation Date: July 27, 2000 * Creation Date: July 27, 2000
* *
* MPI Version: 01.02.03 * MPI.H Version: 01.02.06
* *
* Version History * Version History
* --------------- * ---------------
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
* Added define MPI_FUNCTION_TOOLBOX. * Added define MPI_FUNCTION_TOOLBOX.
* 09-28-01 01.02.02 New function code MPI_SCSI_ENCLOSURE_PROCESSOR. * 09-28-01 01.02.02 New function code MPI_SCSI_ENCLOSURE_PROCESSOR.
* 11-01-01 01.02.03 Changed name to MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR. * 11-01-01 01.02.03 Changed name to MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR.
* 03-14-02 01.02.04 Added MPI_HEADER_VERSION_ defines.
* 05-31-02 01.02.05 Bumped MPI_HEADER_VERSION_UNIT.
* 07-12-02 01.02.06 Added define for MPI_FUNCTION_MAILBOX.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -59,10 +62,27 @@ ...@@ -59,10 +62,27 @@
#define MPI_VERSION_MAJOR (0x01) #define MPI_VERSION_MAJOR (0x01)
#define MPI_VERSION_MINOR (0x02) #define MPI_VERSION_MINOR (0x02)
#define MPI_VERSION ((MPI_VERSION_MAJOR << 8) | MPI_VERSION_MINOR) #define MPI_VERSION_MAJOR_MASK (0xFF00)
#define MPI_VERSION_MAJOR_SHIFT (8)
#define MPI_VERSION_MINOR_MASK (0x00FF)
#define MPI_VERSION_MINOR_SHIFT (0)
#define MPI_VERSION ((MPI_VERSION_MAJOR << MPI_VERSION_MAJOR_SHIFT) | \
MPI_VERSION_MINOR)
#define MPI_VERSION_01_00 (0x0100)
#define MPI_VERSION_01_01 (0x0101)
#define MPI_VERSION_01_02 (0x0102)
/* Note: The major versions of 0xe0 through 0xff are reserved */ /* Note: The major versions of 0xe0 through 0xff are reserved */
/* versioning for this MPI header set */
#define MPI_HEADER_VERSION_UNIT (0x07)
#define MPI_HEADER_VERSION_DEV (0x00)
#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
#define MPI_HEADER_VERSION_DEV_MASK (0x00FF)
#define MPI_HEADER_VERSION_DEV_SHIFT (0)
#define MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) | MPI_HEADER_VERSION_DEV)
/***************************************************************************** /*****************************************************************************
* *
* I O C S t a t e D e f i n i t i o n s * I O C S t a t e D e f i n i t i o n s
...@@ -228,6 +248,8 @@ ...@@ -228,6 +248,8 @@
#define MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR (0x18) #define MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR (0x18)
#define MPI_FUNCTION_MAILBOX (0x19)
#define MPI_FUNCTION_LAN_SEND (0x20) #define MPI_FUNCTION_LAN_SEND (0x20)
#define MPI_FUNCTION_LAN_RECEIVE (0x21) #define MPI_FUNCTION_LAN_RECEIVE (0x21)
#define MPI_FUNCTION_LAN_RESET (0x22) #define MPI_FUNCTION_LAN_RESET (0x22)
......
This diff is collapsed.
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_FC.H * Name: MPI_FC.H
* Title: MPI Fibre Channel messages and structures * Title: MPI Fibre Channel messages and structures
* Creation Date: June 12, 2000 * Creation Date: June 12, 2000
* *
* MPI Version: 01.02.02 * MPI_FC.H Version: 01.02.03
* *
* Version History * Version History
* --------------- * ---------------
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
* 08-08-01 01.02.01 Original release for v1.2 work. * 08-08-01 01.02.01 Original release for v1.2 work.
* 09-28-01 01.02.02 Change name of reserved field in * 09-28-01 01.02.02 Change name of reserved field in
* MSG_LINK_SERVICE_RSP_REPLY. * MSG_LINK_SERVICE_RSP_REPLY.
* 05-31-02 01.02.03 Adding AliasIndex to FC Direct Access requests.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -193,7 +194,7 @@ typedef struct _MSG_LINK_SERVICE_RSP_REPLY ...@@ -193,7 +194,7 @@ typedef struct _MSG_LINK_SERVICE_RSP_REPLY
typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
{ {
U8 SendFlags; /* 00h */ U8 SendFlags; /* 00h */
U8 Reserved; /* 01h */ U8 AliasIndex; /* 01h */
U8 ChainOffset; /* 02h */ U8 ChainOffset; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U32 MsgFlags_Did; /* 04h */ U32 MsgFlags_Did; /* 04h */
...@@ -212,7 +213,8 @@ typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST ...@@ -212,7 +213,8 @@ typedef struct _MSG_EXLINK_SERVICE_SEND_REQUEST
/* Extended Link Service Send Reply */ /* Extended Link Service Send Reply */
typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY typedef struct _MSG_EXLINK_SERVICE_SEND_REPLY
{ {
U16 Reserved; /* 00h */ U8 Reserved; /* 00h */
U8 AliasIndex; /* 01h */
U8 MsgLength; /* 02h */ U8 MsgLength; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U16 Reserved1; /* 04h */ U16 Reserved1; /* 04h */
...@@ -275,7 +277,7 @@ typedef struct _MSG_FC_ABORT_REPLY ...@@ -275,7 +277,7 @@ typedef struct _MSG_FC_ABORT_REPLY
typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
{ {
U8 SendFlags; /* 00h */ U8 SendFlags; /* 00h */
U8 Reserved; /* 01h */ U8 AliasIndex; /* 01h */
U8 ChainOffset; /* 02h */ U8 ChainOffset; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U32 MsgFlags_Did; /* 04h */ U32 MsgFlags_Did; /* 04h */
...@@ -297,7 +299,8 @@ typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST ...@@ -297,7 +299,8 @@ typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REQUEST
/* FC Common Transport Send Reply */ /* FC Common Transport Send Reply */
typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY typedef struct _MSG_FC_COMMON_TRANSPORT_SEND_REPLY
{ {
U16 Reserved; /* 00h */ U8 Reserved; /* 00h */
U8 AliasIndex; /* 01h */
U8 MsgLength; /* 02h */ U8 MsgLength; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U16 Reserved1; /* 04h */ U16 Reserved1; /* 04h */
......
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_INIT.H * Name: MPI_INIT.H
* Title: MPI initiator mode messages and structures * Title: MPI initiator mode messages and structures
* Creation Date: June 8, 2000 * Creation Date: June 8, 2000
* *
* MPI Version: 01.02.04 * MPI_INIT.H Version: 01.02.05
* *
* Version History * Version History
* --------------- * ---------------
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
* 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure * 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure
* Processor messages. * Processor messages.
* 10-04-01 01.02.04 Added defines for SEP request Action field. * 10-04-01 01.02.04 Added defines for SEP request Action field.
* 05-31-02 01.02.05 Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define
* for SCSI IO requests.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -67,7 +69,7 @@ typedef struct _MSG_SCSI_IO_REQUEST ...@@ -67,7 +69,7 @@ typedef struct _MSG_SCSI_IO_REQUEST
SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t; SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t;
/* SCSIO MsgFlags bits */ /* SCSI IO MsgFlags bits */
#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01) #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01)
#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00) #define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00)
...@@ -75,8 +77,9 @@ typedef struct _MSG_SCSI_IO_REQUEST ...@@ -75,8 +77,9 @@ typedef struct _MSG_SCSI_IO_REQUEST
#define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02) #define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02)
#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00) #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00)
#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02) #define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02)
#define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04)
/* SCSIIO LUN fields */ /* SCSI IO LUN fields */
#define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF) #define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF)
#define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000) #define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000)
...@@ -85,7 +88,7 @@ typedef struct _MSG_SCSI_IO_REQUEST ...@@ -85,7 +88,7 @@ typedef struct _MSG_SCSI_IO_REQUEST
#define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00) #define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00)
#define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00) #define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00)
/* SCSIO Control bits */ /* SCSI IO Control bits */
#define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000) #define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000)
#define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000) #define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000)
...@@ -114,7 +117,7 @@ typedef struct _MSG_SCSI_IO_REQUEST ...@@ -114,7 +117,7 @@ typedef struct _MSG_SCSI_IO_REQUEST
#define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000) #define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000)
/* SCSIIO reply structure */ /* SCSI IO reply structure */
typedef struct _MSG_SCSI_IO_REPLY typedef struct _MSG_SCSI_IO_REPLY
{ {
U8 TargetID; /* 00h */ U8 TargetID; /* 00h */
...@@ -137,7 +140,7 @@ typedef struct _MSG_SCSI_IO_REPLY ...@@ -137,7 +140,7 @@ typedef struct _MSG_SCSI_IO_REPLY
SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t; SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t;
/* SCSIIO Reply SCSIStatus values (SAM-2 status codes) */ /* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */
#define MPI_SCSI_STATUS_SUCCESS (0x00) #define MPI_SCSI_STATUS_SUCCESS (0x00)
#define MPI_SCSI_STATUS_CHECK_CONDITION (0x02) #define MPI_SCSI_STATUS_CHECK_CONDITION (0x02)
...@@ -151,7 +154,7 @@ typedef struct _MSG_SCSI_IO_REPLY ...@@ -151,7 +154,7 @@ typedef struct _MSG_SCSI_IO_REPLY
#define MPI_SCSI_STATUS_ACA_ACTIVE (0x30) #define MPI_SCSI_STATUS_ACA_ACTIVE (0x30)
/* SCSIIO Reply SCSIState values */ /* SCSI IO Reply SCSIState values */
#define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01) #define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01)
#define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02) #define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02)
...@@ -160,7 +163,7 @@ typedef struct _MSG_SCSI_IO_REPLY ...@@ -160,7 +163,7 @@ typedef struct _MSG_SCSI_IO_REPLY
#define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10) #define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10)
#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20) #define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20)
/* SCSIIO Reply ResponseInfo values */ /* SCSI IO Reply ResponseInfo values */
/* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */ /* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */
#define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000) #define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000)
......
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_IOC.H * Name: MPI_IOC.H
* Title: MPI IOC, Port, Event, FW Download, and FW Upload messages * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
* Creation Date: August 11, 2000 * Creation Date: August 11, 2000
* *
* MPI Version: 01.02.04 * MPI_IOC.H Version: 01.02.06
* *
* Version History * Version History
* --------------- * ---------------
...@@ -51,6 +51,10 @@ ...@@ -51,6 +51,10 @@
* MPI_FW_UPLOAD_ITYPE_NVDATA. * MPI_FW_UPLOAD_ITYPE_NVDATA.
* 09-28-01 01.02.03 Modified Event Data for Integrated RAID. * 09-28-01 01.02.03 Modified Event Data for Integrated RAID.
* 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field. * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
* 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
* 05-31-02 01.02.06 Added define for
* MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
* Added AliasIndex to EVENT_DATA_LOGOUT structure.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -151,7 +155,7 @@ typedef struct _MSG_IOC_FACTS_REPLY ...@@ -151,7 +155,7 @@ typedef struct _MSG_IOC_FACTS_REPLY
U16 MsgVersion; /* 00h */ U16 MsgVersion; /* 00h */
U8 MsgLength; /* 02h */ U8 MsgLength; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U16 Reserved; /* 04h */ U16 HeaderVersion; /* 04h */
U8 IOCNumber; /* 06h */ U8 IOCNumber; /* 06h */
U8 MsgFlags; /* 07h */ U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */ U32 MsgContext; /* 08h */
...@@ -183,7 +187,11 @@ typedef struct _MSG_IOC_FACTS_REPLY ...@@ -183,7 +187,11 @@ typedef struct _MSG_IOC_FACTS_REPLY
#define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00) #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
#define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF) #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
#define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK (0xFF00)
#define MPI_IOCFACTS_HEADERVERSION_DEV_MASK (0x00FF)
#define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001) #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
#define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
#define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01) #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01)
...@@ -464,12 +472,15 @@ typedef struct _EVENT_DATA_LOOP_STATE ...@@ -464,12 +472,15 @@ typedef struct _EVENT_DATA_LOOP_STATE
typedef struct _EVENT_DATA_LOGOUT typedef struct _EVENT_DATA_LOGOUT
{ {
U32 NPortID; /* 00h */ U32 NPortID; /* 00h */
U8 Reserved; /* 04h */ U8 AliasIndex; /* 04h */
U8 Port; /* 05h */ U8 Port; /* 05h */
U16 Reserved1; /* 06h */ U16 Reserved1; /* 06h */
} EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT, } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
EventDataLogout_t, MPI_POINTER pEventDataLogout_t; EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
#define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF)
/* MPI Integrated RAID Event data */ /* MPI Integrated RAID Event data */
typedef struct _EVENT_DATA_RAID typedef struct _EVENT_DATA_RAID
......
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_LAN.H * Name: MPI_LAN.H
* Title: MPI LAN messages and structures * Title: MPI LAN messages and structures
* Creation Date: June 30, 2000 * Creation Date: June 30, 2000
* *
* MPI Version: 01.02.01 * MPI_LAN.H Version: 01.02.01
* *
* Version History * Version History
* --------------- * ---------------
......
/* /*
* Copyright (c) 2001 LSI Logic Corporation. * Copyright (c) 2001-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_RAID.H * Name: MPI_RAID.H
* Title: MPI RAID message and structures * Title: MPI RAID message and structures
* Creation Date: February 27, 2001 * Creation Date: February 27, 2001
* *
* MPI Version: 01.02.04 * MPI_RAID.H Version: 01.02.07
* *
* Version History * Version History
* --------------- * ---------------
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
* 10-04-01 01.02.03 Added ActionData defines for * 10-04-01 01.02.03 Added ActionData defines for
* MPI_RAID_ACTION_DELETE_VOLUME action. * MPI_RAID_ACTION_DELETE_VOLUME action.
* 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC. * 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC.
* 03-14-02 01.02.05 Added define for MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT.
* 05-07-02 01.02.06 Added define for MPI_RAID_ACTION_ACTIVATE_VOLUME,
* MPI_RAID_ACTION_INACTIVATE_VOLUME, and
* MPI_RAID_ACTION_ADATA_INACTIVATE_ALL.
* 07-12-02 01.02.07 Added structures for Mailbox request and reply.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -74,14 +79,20 @@ typedef struct _MSG_RAID_ACTION ...@@ -74,14 +79,20 @@ typedef struct _MSG_RAID_ACTION
#define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E) #define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)
#define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F) #define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)
#define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10) #define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)
#define MPI_RAID_ACTION_ACTIVATE_VOLUME (0x11)
#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ /* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
#define MPI_RAID_ACTION_ADATA_LOW_LEVEL_INIT (0x00000002)
/* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */ /* ActionDataWord defines for use with MPI_RAID_ACTION_DELETE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000) #define MPI_RAID_ACTION_ADATA_KEEP_PHYS_DISKS (0x00000000)
#define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001) #define MPI_RAID_ACTION_ADATA_DEL_PHYS_DISKS (0x00000001)
/* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
/* RAID Action reply message */ /* RAID Action reply message */
...@@ -172,6 +183,42 @@ typedef struct _MSG_SCSI_IO_RAID_PT_REPLY ...@@ -172,6 +183,42 @@ typedef struct _MSG_SCSI_IO_RAID_PT_REPLY
SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t; SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;
/****************************************************************************/
/* Mailbox reqeust structure */
/****************************************************************************/
typedef struct _MSG_MAILBOX_REQUEST
{
U16 Reserved1;
U8 ChainOffset;
U8 Function;
U16 Reserved2;
U8 Reserved3;
U8 MsgFlags;
U8 Command[10];
U16 Reserved4;
SGE_IO_UNION SGL;
} MSG_MAILBOX_REQUEST, MPI_POINTER PTR_MSG_MAILBOX_REQUEST,
MailboxRequest_t, MPI_POINTER pMailboxRequest_t;
/* Mailbox reply structure */
typedef struct _MSG_MAILBOX_REPLY
{
U16 Reserved1; /* 00h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U16 Reserved2; /* 04h */
U8 Reserved3; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 MailboxStatus; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 Reserved4; /* 14h */
} MSG_MAILBOX_REPLY, MPI_POINTER PTR_MSG_MAILBOX_REPLY,
MailboxReply_t, MPI_POINTER pMailboxReply_t;
#endif #endif
......
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_TARG.H * Name: MPI_TARG.H
* Title: MPI Target mode messages and structures * Title: MPI Target mode messages and structures
* Creation Date: June 22, 2000 * Creation Date: June 22, 2000
* *
* MPI Version: 01.02.04 * MPI_TARG.H Version: 01.02.06
* *
* Version History * Version History
* --------------- * ---------------
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
* of MPI. * of MPI.
* 10-04-01 01.02.03 Added PriorityReason to MSG_TARGET_ERROR_REPLY. * 10-04-01 01.02.03 Added PriorityReason to MSG_TARGET_ERROR_REPLY.
* 11-01-01 01.02.04 Added define for TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY. * 11-01-01 01.02.04 Added define for TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY.
* 03-14-02 01.02.05 Modified MPI_TARGET_FCP_RSP_BUFFER to get the proper
* byte ordering.
* 05-31-02 01.02.06 Modified TARGET_MODE_REPLY_ALIAS_MASK to only include
* one bit.
* Added AliasIndex field to MPI_TARGET_FCP_CMD_BUFFER.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -161,6 +166,9 @@ typedef struct _MPI_TARGET_FCP_CMD_BUFFER ...@@ -161,6 +166,9 @@ typedef struct _MPI_TARGET_FCP_CMD_BUFFER
U8 FcpCntl[4]; /* 08h */ U8 FcpCntl[4]; /* 08h */
U8 FcpCdb[16]; /* 0Ch */ U8 FcpCdb[16]; /* 0Ch */
U32 FcpDl; /* 1Ch */ U32 FcpDl; /* 1Ch */
U8 AliasIndex; /* 20h */
U8 Reserved1; /* 21h */
U16 Reserved2; /* 22h */
} MPI_TARGET_FCP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_CMD_BUFFER, } MPI_TARGET_FCP_CMD_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_CMD_BUFFER,
MpiTargetFcpCmdBuffer, MPI_POINTER pMpiTargetFcpCmdBuffer; MpiTargetFcpCmdBuffer, MPI_POINTER pMpiTargetFcpCmdBuffer;
...@@ -255,12 +263,16 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST ...@@ -255,12 +263,16 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST
#define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04) #define TARGET_STATUS_SEND_FLAGS_HIGH_PRIORITY (0x04)
#define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80) #define TARGET_STATUS_SEND_FLAGS_REPOST_CMD_BUFFER (0x80)
/*
* NOTE: FCP_RSP data is big-endian. When used on a little-endian system, this
* structure properly orders the bytes.
*/
typedef struct _MPI_TARGET_FCP_RSP_BUFFER typedef struct _MPI_TARGET_FCP_RSP_BUFFER
{ {
U8 Reserved0[8]; /* 00h */ U8 Reserved0[8]; /* 00h */
U8 FcpStatus; /* 08h */ U8 Reserved1[2]; /* 08h */
U8 FcpFlags; /* 09h */ U8 FcpFlags; /* 0Ah */
U8 Reserved1[2]; /* 0Ah */ U8 FcpStatus; /* 0Bh */
U32 FcpResid; /* 0Ch */ U32 FcpResid; /* 0Ch */
U32 FcpSenseLength; /* 10h */ U32 FcpSenseLength; /* 10h */
U32 FcpResponseLength; /* 14h */ U32 FcpResponseLength; /* 14h */
...@@ -269,6 +281,10 @@ typedef struct _MPI_TARGET_FCP_RSP_BUFFER ...@@ -269,6 +281,10 @@ typedef struct _MPI_TARGET_FCP_RSP_BUFFER
} MPI_TARGET_FCP_RSP_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_RSP_BUFFER, } MPI_TARGET_FCP_RSP_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_RSP_BUFFER,
MpiTargetFcpRspBuffer, MPI_POINTER pMpiTargetFcpRspBuffer; MpiTargetFcpRspBuffer, MPI_POINTER pMpiTargetFcpRspBuffer;
/*
* NOTE: The SPI status IU is big-endian. When used on a little-endian system,
* this structure properly orders the bytes.
*/
typedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU typedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU
{ {
U8 Reserved0; /* 00h */ U8 Reserved0; /* 00h */
...@@ -332,7 +348,7 @@ typedef struct _MSG_TARGET_MODE_ABORT_REPLY ...@@ -332,7 +348,7 @@ typedef struct _MSG_TARGET_MODE_ABORT_REPLY
#define TARGET_MODE_REPLY_IO_INDEX_SHIFT (0) #define TARGET_MODE_REPLY_IO_INDEX_SHIFT (0)
#define TARGET_MODE_REPLY_INITIATOR_INDEX_MASK (0x03FFC000) #define TARGET_MODE_REPLY_INITIATOR_INDEX_MASK (0x03FFC000)
#define TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT (14) #define TARGET_MODE_REPLY_INITIATOR_INDEX_SHIFT (14)
#define TARGET_MODE_REPLY_ALIAS_MASK (0x0C000000) #define TARGET_MODE_REPLY_ALIAS_MASK (0x04000000)
#define TARGET_MODE_REPLY_ALIAS_SHIFT (26) #define TARGET_MODE_REPLY_ALIAS_SHIFT (26)
#define TARGET_MODE_REPLY_PORT_MASK (0x10000000) #define TARGET_MODE_REPLY_PORT_MASK (0x10000000)
#define TARGET_MODE_REPLY_PORT_SHIFT (28) #define TARGET_MODE_REPLY_PORT_SHIFT (28)
......
/* /*
* Copyright (c) 2000-2001 LSI Logic Corporation. * Copyright (c) 2000-2002 LSI Logic Corporation.
* *
* *
* Name: MPI_TYPE.H * Name: MPI_TYPE.H
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* (mailto:sjralston1@netscape.net) * (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com) * (mailto:Pam.Delaney@lsil.com)
* *
* $Id: mptbase.h,v 1.123 2002/06/20 13:28:16 pdelaney Exp $ * $Id: mptbase.h,v 1.133 2002/09/05 22:30:09 pdelaney Exp $
*/ */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
#define COPYRIGHT "Copyright (c) 1999-2002 " MODULEAUTHOR #define COPYRIGHT "Copyright (c) 1999-2002 " MODULEAUTHOR
#endif #endif
#define MPT_LINUX_VERSION_COMMON "2.01.06" #define MPT_LINUX_VERSION_COMMON "2.02.01.01"
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-2.01.06" #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-2.02.01.01"
#define WHAT_MAGIC_STRING "@" "(" "#" ")" #define WHAT_MAGIC_STRING "@" "(" "#" ")"
#define show_mptmod_ver(s,ver) \ #define show_mptmod_ver(s,ver) \
...@@ -379,7 +379,11 @@ typedef struct _VirtDevice { ...@@ -379,7 +379,11 @@ typedef struct _VirtDevice {
u8 maxWidth; /* 0 if narrow, 1 if wide*/ u8 maxWidth; /* 0 if narrow, 1 if wide*/
u8 negoFlags; /* bit field, 0 if WDTR/SDTR/QAS allowed */ u8 negoFlags; /* bit field, 0 if WDTR/SDTR/QAS allowed */
u8 raidVolume; /* set, if RAID Volume */ u8 raidVolume; /* set, if RAID Volume */
#ifdef ABORT_FIX
u8 numAborts;
#else
u8 rsvd; u8 rsvd;
#endif
u16 rsvd1raid; u16 rsvd1raid;
int npaths; int npaths;
u16 fc_phys_lun; u16 fc_phys_lun;
...@@ -422,6 +426,7 @@ typedef struct _VirtDevice { ...@@ -422,6 +426,7 @@ typedef struct _VirtDevice {
#define MPT_TARGET_FLAGS_VALID_INQUIRY 0x02 #define MPT_TARGET_FLAGS_VALID_INQUIRY 0x02
#define MPT_TARGET_FLAGS_VALID_SENSE 0x04 #define MPT_TARGET_FLAGS_VALID_SENSE 0x04
#define MPT_TARGET_FLAGS_Q_YES 0x08 #define MPT_TARGET_FLAGS_Q_YES 0x08
#define MPT_TARGET_FLAGS_VALID_56 0x10
#define MPT_TARGET_NO_NEGO_WIDE 0x01 #define MPT_TARGET_NO_NEGO_WIDE 0x01
#define MPT_TARGET_NO_NEGO_SYNC 0x02 #define MPT_TARGET_NO_NEGO_SYNC 0x02
...@@ -511,7 +516,7 @@ typedef struct _mpt_ioctl_events { ...@@ -511,7 +516,7 @@ typedef struct _mpt_ioctl_events {
#define MPT_SCSICFG_NEGOTIATE 0x01 /* Negotiate on next IO */ #define MPT_SCSICFG_NEGOTIATE 0x01 /* Negotiate on next IO */
#define MPT_SCSICFG_NEED_DV 0x02 /* Schedule DV */ #define MPT_SCSICFG_NEED_DV 0x02 /* Schedule DV */
#define MPT_SCSICFG_DV_PENDING 0x04 /* DV on this physical id pending */ #define MPT_SCSICFG_DV_PENDING 0x04 /* DV on this physical id pending */
#define MPT_SCSICFG_DV_DONE 0x08 /* DV on this physical id complete */ #define MPT_SCSICFG_DV_NOT_DONE 0x08 /* DV has not been performed */
#define MPT_SCSICFG_BLK_NEGO 0x10 /* WriteSDP1 with WDTR and SDTR disabled */ #define MPT_SCSICFG_BLK_NEGO 0x10 /* WriteSDP1 with WDTR and SDTR disabled */
/* Args passed to writeSDP1: */ /* Args passed to writeSDP1: */
...@@ -622,7 +627,8 @@ typedef struct _MPT_ADAPTER ...@@ -622,7 +627,8 @@ typedef struct _MPT_ADAPTER
LANPage1_t lan_cnfg_page1; LANPage1_t lan_cnfg_page1;
u8 FirstWhoInit; u8 FirstWhoInit;
u8 upload_fw; /* If set, do a fw upload */ u8 upload_fw; /* If set, do a fw upload */
u8 pad1[6]; u8 reload_fw; /* Force a FW Reload on next reset */
u8 pad1[5];
} MPT_ADAPTER; } MPT_ADAPTER;
...@@ -707,6 +713,13 @@ typedef struct _mpt_sge { ...@@ -707,6 +713,13 @@ typedef struct _mpt_sge {
#define dsgprintk(x) #define dsgprintk(x)
#endif #endif
#if defined(MPT_DEBUG_DL) || defined(MPT_DEBUG)
#define ddlprintk(x) printk x
#else
#define ddlprintk(x)
#endif
#ifdef MPT_DEBUG_DV #ifdef MPT_DEBUG_DV
#define ddvprintk(x) printk x #define ddvprintk(x) printk x
#else #else
......
This diff is collapsed.
This diff is collapsed.
...@@ -201,7 +201,11 @@ extern int x_scsi_host_reset(Scsi_Cmnd *); ...@@ -201,7 +201,11 @@ extern int x_scsi_host_reset(Scsi_Cmnd *);
extern int x_scsi_old_abort(Scsi_Cmnd *); extern int x_scsi_old_abort(Scsi_Cmnd *);
extern int x_scsi_old_reset(Scsi_Cmnd *, unsigned int); extern int x_scsi_old_reset(Scsi_Cmnd *, unsigned int);
#endif #endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,28)
extern int x_scsi_bios_param(Disk *, struct block_device *, int *); extern int x_scsi_bios_param(Disk *, struct block_device *, int *);
#else
extern int x_scsi_bios_param(Disk *, kdev_t, int *);
#endif
extern void x_scsi_select_queue_depths(struct Scsi_Host *, Scsi_Device *); extern void x_scsi_select_queue_depths(struct Scsi_Host *, Scsi_Device *);
extern void x_scsi_taskmgmt_bh(void *); extern void x_scsi_taskmgmt_bh(void *);
......
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