Commit 6eb57548 authored by Pam Delaney's avatar Pam Delaney Committed by Linus Torvalds

[PATCH] Fusion driver update

This upgrades the fusion driver

 - Provides support for the Ultra320 1030/1020 parts
 - Provides support for the PCI-X FC parts (919X/929X)
 - Provides proper support for high memory cases
 - Provides IA64 support
 - Adds kernels calls (pci_enable_device, pci_set_dma_mask,
   scsi_set_pci_device) for proper registration of PCI devics.
 - Adds New Error Handling support
parent d08ea7f2
...@@ -200,9 +200,6 @@ struct seq_operations partitions_op = { ...@@ -200,9 +200,6 @@ struct seq_operations partitions_op = {
extern int blk_dev_init(void); extern int blk_dev_init(void);
#ifdef CONFIG_FUSION
extern int fusion_init(void);
#endif
extern int soc_probe(void); extern int soc_probe(void);
extern int atmdev_init(void); extern int atmdev_init(void);
extern int i2o_init(void); extern int i2o_init(void);
...@@ -216,9 +213,6 @@ int __init device_init(void) ...@@ -216,9 +213,6 @@ int __init device_init(void)
#ifdef CONFIG_I2O #ifdef CONFIG_I2O
i2o_init(); i2o_init();
#endif #endif
#ifdef CONFIG_FUSION
fusion_init();
#endif
#ifdef CONFIG_FC4_SOC #ifdef CONFIG_FC4_SOC
/* This has to be done before scsi_dev_init */ /* This has to be done before scsi_dev_init */
soc_probe(); soc_probe();
......
...@@ -5,21 +5,33 @@ dep_tristate "Fusion MPT (base + ScsiHost) drivers" CONFIG_FUSION $CONFIG_SCSI $ ...@@ -5,21 +5,33 @@ dep_tristate "Fusion MPT (base + ScsiHost) drivers" CONFIG_FUSION $CONFIG_SCSI $
if [ "$CONFIG_FUSION" = "y" -o "$CONFIG_FUSION" = "m" ]; then if [ "$CONFIG_FUSION" = "y" -o "$CONFIG_FUSION" = "m" ]; then
if [ "$CONFIG_FUSION" = "y" ]; then if [ "$CONFIG_BLK_DEV_SD" = "y" -a "$CONFIG_FUSION" = "y" ]; then
comment "(ability to boot linux kernel from Fusion device is ENABLED!)" define_bool CONFIG_FUSION_BOOT y
else else
comment "(ability to boot linux kernel from Fusion device is DISABLED!)" define_bool CONFIG_FUSION_BOOT n
fi fi
# Modular only if [ "$CONFIG_MODULES" = "y" ]; then
dep_tristate " Enhanced SCSI error reporting" CONFIG_FUSION_ISENSE $CONFIG_FUSION m # How can we force these options to module or nothing?
dep_tristate " Fusion MPT misc device (ioctl) driver" CONFIG_FUSION_CTL $CONFIG_FUSION m dep_tristate " Enhanced SCSI error reporting" CONFIG_FUSION_ISENSE $CONFIG_FUSION m
dep_tristate " Fusion MPT misc device (ioctl) driver" CONFIG_FUSION_CTL $CONFIG_FUSION m
fi
dep_tristate " Fusion MPT LAN driver" CONFIG_FUSION_LAN $CONFIG_FUSION $CONFIG_NET dep_tristate " Fusion MPT LAN driver" CONFIG_FUSION_LAN $CONFIG_FUSION $CONFIG_NET
if [ "$CONFIG_FUSION_LAN" != "n" ]; then if [ "$CONFIG_FUSION_LAN" != "n" ]; then
define_bool CONFIG_NET_FC y define_bool CONFIG_NET_FC y
fi fi
else
define_bool CONFIG_FUSION_BOOT n
# These <should> be define_tristate, but we leave them define_bool
# for backward compatibility with pre-linux-2.2.15 kernels.
# (Bugzilla:fibrebugs, #384)
define_bool CONFIG_FUSION_ISENSE n
define_bool CONFIG_FUSION_CTL n
define_bool CONFIG_FUSION_LAN n
fi fi
endmenu endmenu
...@@ -5,12 +5,13 @@ ...@@ -5,12 +5,13 @@
* Error Report logging output. This module implements SCSI-3 * Error Report logging output. This module implements SCSI-3
* Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings. * Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings.
* *
* Copyright (c) 1991-2001 Steven J. Ralston * Copyright (c) 1991-2002 Steven J. Ralston
* Written By: Steven J. Ralston * Written By: Steven J. Ralston
* (yes I wrote some of the orig. code back in 1991!) * (yes I wrote some of the orig. code back in 1991!)
* (mailto:Steve.Ralston@lsil.com) * (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* *
* $Id: isense.c,v 1.28.14.1 2001/08/24 20:07:04 sralston Exp $ * $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $
*/ */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
...@@ -49,11 +50,15 @@ ...@@ -49,11 +50,15 @@
*/ */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#include <linux/module.h> #include <linux/version.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/version.h> #include <asm/io.h>
#if defined (__sparc__)
#include <linux/timer.h>
#endif
/* Hmmm, avoid undefined spinlock_t on lk-2.2.14-5.0 */ /* Hmmm, avoid undefined spinlock_t on lk-2.2.14-5.0 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
...@@ -61,7 +66,7 @@ ...@@ -61,7 +66,7 @@
#endif #endif
#define MODULEAUTHOR "Steven J. Ralston" #define MODULEAUTHOR "Steven J. Ralston"
#define COPYRIGHT "Copyright (c) 2001 " MODULEAUTHOR #define COPYRIGHT "Copyright (c) 2001-2002 " MODULEAUTHOR
#include "mptbase.h" #include "mptbase.h"
#include "isense.h" #include "isense.h"
...@@ -84,9 +89,9 @@ ...@@ -84,9 +89,9 @@
#define my_VERSION MPT_LINUX_VERSION_COMMON #define my_VERSION MPT_LINUX_VERSION_COMMON
#define MYNAM "isense" #define MYNAM "isense"
EXPORT_NO_SYMBOLS;
MODULE_AUTHOR(MODULEAUTHOR); MODULE_AUTHOR(MODULEAUTHOR);
MODULE_DESCRIPTION(my_NAME); MODULE_DESCRIPTION(my_NAME);
MODULE_LICENSE("GPL");
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int __init isense_init(void) int __init isense_init(void)
......
...@@ -11,6 +11,30 @@ ...@@ -11,6 +11,30 @@
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#ifndef rwlock_init
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
#define SET_NICE(current,x) do {(current)->nice = (x);} while (0)
#else
#define SET_NICE(current,x)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
#define pci_enable_device(pdev) (0)
#define SCSI_DATA_UNKNOWN 0
#define SCSI_DATA_WRITE 1
#define SCSI_DATA_READ 2
#define SCSI_DATA_NONE 3
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4)
#define pci_set_dma_mask(pdev, mask) (0)
#define scsi_set_pci_device(sh, pdev) (0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
# if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18) # if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
typedef unsigned int dma_addr_t; typedef unsigned int dma_addr_t;
...@@ -58,12 +82,33 @@ typedef void (*__cleanup_module_func_t)(void); ...@@ -58,12 +82,33 @@ typedef void (*__cleanup_module_func_t)(void);
extern inline __cleanup_module_func_t __cleanup_module_inline(void) \ extern inline __cleanup_module_func_t __cleanup_module_inline(void) \
{ return x; } { return x; }
#else #else
#define module_init(x) __initcall(x); #define module_init(x) __initcall(x);
#define module_exit(x) __exitcall(x); #define module_exit(x) __exitcall(x);
#endif #endif
/* } block snipped from lk-2.2.18/include/linux/init.h */ /* } block snipped from lk-2.2.18/include/linux/init.h */
/* This block snipped from lk-2.2.18/include/linux/sched.h { */
/*
* Used prior to schedule_timeout calls..
*/
#define __set_current_state(state_value) do { current->state = state_value; } while (0)
#ifdef __SMP__
#define set_current_state(state_value) do { __set_current_state(state_value); mb(); } while (0)
#else
#define set_current_state(state_value) __set_current_state(state_value)
#endif
/* } block snipped from lk-2.2.18/include/linux/sched.h */
/* procfs compat stuff... */
#define proc_mkdir(x,y) create_proc_entry(x, S_IFDIR, y)
/* MUTEX compat stuff... */
#define DECLARE_MUTEX(name) struct semaphore name=MUTEX
#define DECLARE_MUTEX_LOCKED(name) struct semaphore name=MUTEX_LOCKED
#define init_MUTEX(x) *(x)=MUTEX
#define init_MUTEX_LOCKED(x) *(x)=MUTEX_LOCKED
/* Wait queues. */ /* Wait queues. */
#define DECLARE_WAIT_QUEUE_HEAD(name) \ #define DECLARE_WAIT_QUEUE_HEAD(name) \
struct wait_queue * (name) = NULL struct wait_queue * (name) = NULL
...@@ -90,6 +135,17 @@ typedef void (*__cleanup_module_func_t)(void); ...@@ -90,6 +135,17 @@ typedef void (*__cleanup_module_func_t)(void);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18) */ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18) */
/*
* Inclined to use:
* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10)
* here, but MODULE_LICENSE defined in 2.4.9-6 and 2.4.9-13
* breaks the rule:-(
*/
#ifndef MODULE_LICENSE
#define MODULE_LICENSE(license)
#endif
/* PCI/driver subsystem { */ /* PCI/driver subsystem { */
#ifndef pci_for_each_dev #ifndef pci_for_each_dev
#define pci_for_each_dev(dev) for((dev)=pci_devices; (dev)!=NULL; (dev)=(dev)->next) #define pci_for_each_dev(dev) for((dev)=pci_devices; (dev)!=NULL; (dev)=(dev)->next)
...@@ -120,26 +176,6 @@ typedef void (*__cleanup_module_func_t)(void); ...@@ -120,26 +176,6 @@ typedef void (*__cleanup_module_func_t)(void);
#endif /* } ifndef pci_for_each_dev */ #endif /* } ifndef pci_for_each_dev */
/* procfs compat stuff... */
#ifdef CONFIG_PROC_FS
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,28)
#define CREATE_PROCDIR_ENTRY(x,y) create_proc_entry(x, S_IFDIR, y)
/* This is a macro so we don't need to pull all the procfs
* headers into this file. -DaveM
*/
#define create_proc_read_entry(name, mode, base, __read_proc, __data) \
({ struct proc_dir_entry *__res=create_proc_entry(name,mode,base); \
if (__res) { \
__res->read_proc=(__read_proc); \
__res->data=(__data); \
} \
__res; \
})
#else
#define CREATE_PROCDIR_ENTRY(x,y) proc_mkdir(x, y)
#endif
#endif
/* Compatability for the 2.3.x PCI DMA API. */ /* Compatability for the 2.3.x PCI DMA API. */
#ifndef PCI_DMA_BIDIRECTIONAL #ifndef PCI_DMA_BIDIRECTIONAL
/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
...@@ -194,6 +230,28 @@ static __inline__ int __get_order(unsigned long size) ...@@ -194,6 +230,28 @@ static __inline__ int __get_order(unsigned long size)
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif /* PCI_DMA_BIDIRECTIONAL */ #endif /* PCI_DMA_BIDIRECTIONAL */
/*
* With the new command queuing code in the SCSI mid-layer we no longer have
* to hold the io_request_lock spin lock when calling the scsi_done routine.
* For now we only do this with the 2.5.1 kernel or newer.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1)
#define MPT_HOST_LOCK(flags)
#define MPT_HOST_UNLOCK(flags)
#else
#define MPT_HOST_LOCK(flags) \
spin_lock_irqsave(&io_request_lock, flags)
#define MPT_HOST_UNLOCK(flags) \
spin_unlock_irqrestore(&io_request_lock, flags)
#endif
/*
* We use our new error handling code if the kernel version is 2.5.1 or newer.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1)
#define MPT_SCSI_USE_NEW_EH
#endif
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
#endif /* _LINUX_COMPAT_H */ #endif /* _LINUX_COMPAT_H */
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* in the IOCLogInfo field of a MPI Default Reply Message. * in the IOCLogInfo field of a MPI Default Reply Message.
* *
* CREATION DATE: 6/02/2000 * CREATION DATE: 6/02/2000
* ID: $Id: fc_log.h,v 4.5 2001/06/07 19:18:00 sschremm Exp $ * ID: $Id: fc_log.h,v 4.6 2001/07/26 14:41:33 sschremm Exp $
*/ */
...@@ -62,7 +62,7 @@ typedef enum _MpiIocLogInfoFc ...@@ -62,7 +62,7 @@ typedef enum _MpiIocLogInfoFc
MPI_IOCLOGINFO_FC_TARGET_MRSP_KILLED_BY_LIP = 0x2100000a, /* Manual Response not sent due to a LIP */ MPI_IOCLOGINFO_FC_TARGET_MRSP_KILLED_BY_LIP = 0x2100000a, /* Manual Response not sent due to a LIP */
MPI_IOCLOGINFO_FC_TARGET_NO_CLASS_3 = 0x2100000b, /* not sent because remote node does not support Class 3 */ MPI_IOCLOGINFO_FC_TARGET_NO_CLASS_3 = 0x2100000b, /* not sent because remote node does not support Class 3 */
MPI_IOCLOGINFO_FC_TARGET_LOGIN_NOT_VALID = 0x2100000c, /* not sent because login to remote node not validated */ MPI_IOCLOGINFO_FC_TARGET_LOGIN_NOT_VALID = 0x2100000c, /* not sent because login to remote node not validated */
MPI_IOCLOGINFO_FC_TARGET_FROM_OUTBOUND = 0x2100000e, /* cleared from the outbound after a logout */ MPI_IOCLOGINFO_FC_TARGET_FROM_OUTBOUND = 0x2100000e, /* cleared from the outbound queue after a logout */
MPI_IOCLOGINFO_FC_TARGET_WAITING_FOR_DATA_IN = 0x2100000f, /* cleared waiting for data after a logout */ MPI_IOCLOGINFO_FC_TARGET_WAITING_FOR_DATA_IN = 0x2100000f, /* cleared waiting for data after a logout */
MPI_IOCLOGINFO_FC_LAN_BASE = 0x22000000, MPI_IOCLOGINFO_FC_LAN_BASE = 0x22000000,
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* 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.01.07 * MPI Version: 01.02.03
* *
* Version History * Version History
* --------------- * ---------------
...@@ -39,6 +39,11 @@ ...@@ -39,6 +39,11 @@
* Added function codes for RAID. * Added function codes for RAID.
* 04-09-01 01.01.07 Added alternate define for MPI_DOORBELL_ACTIVE, * 04-09-01 01.01.07 Added alternate define for MPI_DOORBELL_ACTIVE,
* MPI_DOORBELL_USED, to better match the spec. * MPI_DOORBELL_USED, to better match the spec.
* 08-08-01 01.02.01 Original release for v1.2 work.
* Changed MPI_VERSION_MINOR from 0x01 to 0x02.
* Added define MPI_FUNCTION_TOOLBOX.
* 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.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -53,7 +58,7 @@ ...@@ -53,7 +58,7 @@
*****************************************************************************/ *****************************************************************************/
#define MPI_VERSION_MAJOR (0x01) #define MPI_VERSION_MAJOR (0x01)
#define MPI_VERSION_MINOR (0x01) #define MPI_VERSION_MINOR (0x02)
#define MPI_VERSION ((MPI_VERSION_MAJOR << 8) | MPI_VERSION_MINOR) #define MPI_VERSION ((MPI_VERSION_MAJOR << 8) | MPI_VERSION_MINOR)
/* Note: The major versions of 0xe0 through 0xff are reserved */ /* Note: The major versions of 0xe0 through 0xff are reserved */
...@@ -216,9 +221,13 @@ ...@@ -216,9 +221,13 @@
#define MPI_FUNCTION_FC_COMMON_TRANSPORT_SEND (0x13) #define MPI_FUNCTION_FC_COMMON_TRANSPORT_SEND (0x13)
#define MPI_FUNCTION_FC_PRIMITIVE_SEND (0x14) #define MPI_FUNCTION_FC_PRIMITIVE_SEND (0x14)
#define MPI_FUNCTION_RAID_VOLUME (0x15) #define MPI_FUNCTION_RAID_ACTION (0x15)
#define MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH (0x16) #define MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH (0x16)
#define MPI_FUNCTION_TOOLBOX (0x17)
#define MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR (0x18)
#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.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* 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.01.07 * MPI Version: 01.02.02
* *
* Version History * Version History
* --------------- * ---------------
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
* Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define. * Added MPI_FC_PRIM_SEND_FLAGS_RESET_LINK define.
* Added structure offset comments. * Added structure offset comments.
* 04-09-01 01.01.07 Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST. * 04-09-01 01.01.07 Added RspLength field to MSG_LINK_SERVICE_RSP_REQUEST.
* 08-08-01 01.02.01 Original release for v1.2 work.
* 09-28-01 01.02.02 Change name of reserved field in
* MSG_LINK_SERVICE_RSP_REPLY.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -172,7 +175,7 @@ typedef struct _MSG_LINK_SERVICE_RSP_REPLY ...@@ -172,7 +175,7 @@ typedef struct _MSG_LINK_SERVICE_RSP_REPLY
U8 MsgLength; /* 02h */ U8 MsgLength; /* 02h */
U8 Function; /* 03h */ U8 Function; /* 03h */
U16 Reserved1; /* 04h */ U16 Reserved1; /* 04h */
U8 Reserved2; /* 06h */ U8 Reserved_0100_InitiatorIndex; /* 06h */ /* obsolete InitiatorIndex */
U8 MsgFlags; /* 07h */ U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */ U32 MsgContext; /* 08h */
U16 Reserved3; /* 0Ch */ U16 Reserved3; /* 0Ch */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* 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.01.05 * MPI Version: 01.02.04
* *
* Version History * Version History
* --------------- * ---------------
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
* 02-20-01 01.01.03 Started using MPI_POINTER. * 02-20-01 01.01.03 Started using MPI_POINTER.
* 03-27-01 01.01.04 Added structure offset comments. * 03-27-01 01.01.04 Added structure offset comments.
* 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT. * 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT.
* 08-08-01 01.02.01 Original release for v1.2 work.
* 08-29-01 01.02.02 Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET.
* Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for
* MSG_SCSI_IO_REPLY.
* 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure
* Processor messages.
* 10-04-01 01.02.04 Added defines for SEP request Action field.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -151,6 +158,7 @@ typedef struct _MSG_SCSI_IO_REPLY ...@@ -151,6 +158,7 @@ typedef struct _MSG_SCSI_IO_REPLY
#define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04) #define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04)
#define MPI_SCSI_STATE_TERMINATED (0x08) #define MPI_SCSI_STATE_TERMINATED (0x08)
#define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10) #define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10)
#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20)
/* SCSIIO Reply ResponseInfo values */ /* SCSIIO 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) */
...@@ -191,6 +199,7 @@ typedef struct _MSG_SCSI_TASK_MGMT ...@@ -191,6 +199,7 @@ typedef struct _MSG_SCSI_TASK_MGMT
#define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02) #define MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET (0x02)
#define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03) #define MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03)
#define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS (0x04) #define MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS (0x04)
#define MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05)
/* MsgFlags bits */ /* MsgFlags bits */
#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00) #define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00)
...@@ -216,4 +225,91 @@ typedef struct _MSG_SCSI_TASK_MGMT_REPLY ...@@ -216,4 +225,91 @@ typedef struct _MSG_SCSI_TASK_MGMT_REPLY
} MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY, } MSG_SCSI_TASK_MGMT_REPLY, MPI_POINTER PTR_MSG_SCSI_TASK_MGMT_REPLY,
SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t; SCSITaskMgmtReply_t, MPI_POINTER pSCSITaskMgmtReply_t;
/****************************************************************************/
/* SCSI Enclosure Processor messages */
/****************************************************************************/
typedef struct _MSG_SEP_REQUEST
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 Action; /* 04h */
U8 Reserved1; /* 05h */
U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U32 SlotStatus; /* 0Ch */
} MSG_SEP_REQUEST, MPI_POINTER PTR_MSG_SEP_REQUEST,
SEPRequest_t, MPI_POINTER pSEPRequest_t;
/* Action defines */
#define MPI_SEP_REQ_ACTION_WRITE_STATUS (0x00)
#define MPI_SEP_REQ_ACTION_READ_STATUS (0x01)
/* SlotStatus bits for MSG_SEP_REQUEST */
#define MPI_SEP_REQ_SLOTSTATUS_NO_ERROR (0x00000001)
#define MPI_SEP_REQ_SLOTSTATUS_DEV_FAULTY (0x00000002)
#define MPI_SEP_REQ_SLOTSTATUS_DEV_REBUILDING (0x00000004)
#define MPI_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)
#define MPI_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010)
#define MPI_SEP_REQ_SLOTSTATUS_PARITY_CHECK (0x00000020)
#define MPI_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT (0x00000040)
#define MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED (0x00000080)
#define MPI_SEP_REQ_SLOTSTATUS_HOT_SPARE (0x00000100)
#define MPI_SEP_REQ_SLOTSTATUS_REBUILD_STOPPED (0x00000200)
#define MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000)
#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_REMOVE (0x00040000)
#define MPI_SEP_REQ_SLOTSTATUS_REQUEST_INSERT (0x00080000)
#define MPI_SEP_REQ_SLOTSTATUS_DO_NOT_MOVE (0x00400000)
#define MPI_SEP_REQ_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000)
#define MPI_SEP_REQ_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000)
#define MPI_SEP_REQ_SLOTSTATUS_DEV_OFF (0x10000000)
#define MPI_SEP_REQ_SLOTSTATUS_SWAP_RESET (0x80000000)
typedef struct _MSG_SEP_REPLY
{
U8 TargetID; /* 00h */
U8 Bus; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 Action; /* 04h */
U8 Reserved1; /* 05h */
U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 Reserved3; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 SlotStatus; /* 14h */
} MSG_SEP_REPLY, MPI_POINTER PTR_MSG_SEP_REPLY,
SEPReply_t, MPI_POINTER pSEPReply_t;
/* SlotStatus bits for MSG_SEP_REPLY */
#define MPI_SEP_REPLY_SLOTSTATUS_NO_ERROR (0x00000001)
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_FAULTY (0x00000002)
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING (0x00000004)
#define MPI_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)
#define MPI_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010)
#define MPI_SEP_REPLY_SLOTSTATUS_PARITY_CHECK (0x00000020)
#define MPI_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT (0x00000040)
#define MPI_SEP_REPLY_SLOTSTATUS_UNCONFIGURED (0x00000080)
#define MPI_SEP_REPLY_SLOTSTATUS_HOT_SPARE (0x00000100)
#define MPI_SEP_REPLY_SLOTSTATUS_REBUILD_STOPPED (0x00000200)
#define MPI_SEP_REPLY_SLOTSTATUS_REPORT (0x00010000)
#define MPI_SEP_REPLY_SLOTSTATUS_IDENTIFY_REQUEST (0x00020000)
#define MPI_SEP_REPLY_SLOTSTATUS_REMOVE_READY (0x00040000)
#define MPI_SEP_REPLY_SLOTSTATUS_INSERT_READY (0x00080000)
#define MPI_SEP_REPLY_SLOTSTATUS_DO_NOT_REMOVE (0x00400000)
#define MPI_SEP_REPLY_SLOTSTATUS_B_BYPASS_ENABLED (0x01000000)
#define MPI_SEP_REPLY_SLOTSTATUS_A_BYPASS_ENABLED (0x02000000)
#define MPI_SEP_REPLY_SLOTSTATUS_B_ENABLE_BYPASS (0x04000000)
#define MPI_SEP_REPLY_SLOTSTATUS_A_ENABLE_BYPASS (0x08000000)
#define MPI_SEP_REPLY_SLOTSTATUS_DEV_OFF (0x10000000)
#define MPI_SEP_REPLY_SLOTSTATUS_FAULT_SENSED (0x40000000)
#define MPI_SEP_REPLY_SLOTSTATUS_SWAPPED (0x80000000)
#endif #endif
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* 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.01.03 * MPI Version: 01.02.01
* *
* Version History * Version History
* --------------- * ---------------
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
* 11-02-00 01.01.01 Original release for post 1.0 work * 11-02-00 01.01.01 Original release for post 1.0 work
* 02-20-01 01.01.02 Started using MPI_POINTER. * 02-20-01 01.01.02 Started using MPI_POINTER.
* 03-27-01 01.01.03 Added structure offset comments. * 03-27-01 01.01.03 Added structure offset comments.
* 08-08-01 01.02.01 Original release for v1.2 work.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
......
/*
* Copyright (c) 2001 LSI Logic Corporation.
*
*
* Name: MPI_RAID.H
* Title: MPI RAID message and structures
* Creation Date: February 27, 2001
*
* MPI Version: 01.02.04
*
* Version History
* ---------------
*
* Date Version Description
* -------- -------- ------------------------------------------------------
* 02-27-01 01.01.01 Original release for this file.
* 03-27-01 01.01.02 Added structure offset comments.
* 08-08-01 01.02.01 Original release for v1.2 work.
* 09-28-01 01.02.02 Major rework for MPI v1.2 Integrated RAID changes.
* 10-04-01 01.02.03 Added ActionData defines for
* MPI_RAID_ACTION_DELETE_VOLUME action.
* 11-01-01 01.02.04 Added define for MPI_RAID_ACTION_ADATA_DO_NOT_SYNC.
* --------------------------------------------------------------------------
*/
#ifndef MPI_RAID_H
#define MPI_RAID_H
/******************************************************************************
*
* R A I D M e s s a g e s
*
*******************************************************************************/
/****************************************************************************/
/* RAID Volume Request */
/****************************************************************************/
typedef struct _MSG_RAID_ACTION
{
U8 Action; /* 00h */
U8 Reserved1; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 VolumeID; /* 04h */
U8 VolumeBus; /* 05h */
U8 PhysDiskNum; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U32 Reserved2; /* 0Ch */
U32 ActionDataWord; /* 10h */
SGE_SIMPLE_UNION ActionDataSGE; /* 14h */
} MSG_RAID_ACTION_REQUEST, MPI_POINTER PTR_MSG_RAID_ACTION_REQUEST,
MpiRaidActionRequest_t , MPI_POINTER pMpiRaidActionRequest_t;
/* RAID Action request Action values */
#define MPI_RAID_ACTION_STATUS (0x00)
#define MPI_RAID_ACTION_INDICATOR_STRUCT (0x01)
#define MPI_RAID_ACTION_CREATE_VOLUME (0x02)
#define MPI_RAID_ACTION_DELETE_VOLUME (0x03)
#define MPI_RAID_ACTION_DISABLE_VOLUME (0x04)
#define MPI_RAID_ACTION_ENABLE_VOLUME (0x05)
#define MPI_RAID_ACTION_QUIESCE_PHYS_IO (0x06)
#define MPI_RAID_ACTION_ENABLE_PHYS_IO (0x07)
#define MPI_RAID_ACTION_CHANGE_VOLUME_SETTINGS (0x08)
#define MPI_RAID_ACTION_PHYSDISK_OFFLINE (0x0A)
#define MPI_RAID_ACTION_PHYSDISK_ONLINE (0x0B)
#define MPI_RAID_ACTION_CHANGE_PHYSDISK_SETTINGS (0x0C)
#define MPI_RAID_ACTION_CREATE_PHYSDISK (0x0D)
#define MPI_RAID_ACTION_DELETE_PHYSDISK (0x0E)
#define MPI_RAID_ACTION_FAIL_PHYSDISK (0x0F)
#define MPI_RAID_ACTION_REPLACE_PHYSDISK (0x10)
/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
/* 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_DEL_PHYS_DISKS (0x00000001)
/* RAID Action reply message */
typedef struct _MSG_RAID_ACTION_REPLY
{
U8 Action; /* 00h */
U8 Reserved; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 VolumeID; /* 04h */
U8 VolumeBus; /* 05h */
U8 PhysDiskNum; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U16 ActionStatus; /* 0Ch */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 VolumeStatus; /* 14h */
U32 ActionData; /* 18h */
} MSG_RAID_ACTION_REPLY, MPI_POINTER PTR_MSG_RAID_ACTION_REPLY,
MpiRaidActionReply_t, MPI_POINTER pMpiRaidActionReply_t;
/* RAID Volume reply ActionStatus values */
#define MPI_RAID_ACTION_ASTATUS_SUCCESS (0x0000)
#define MPI_RAID_ACTION_ASTATUS_INVALID_ACTION (0x0001)
#define MPI_RAID_ACTION_ASTATUS_FAILURE (0x0002)
#define MPI_RAID_ACTION_ASTATUS_IN_PROGRESS (0x0003)
/* RAID Volume reply RAID Volume Indicator structure */
typedef struct _MPI_RAID_VOL_INDICATOR
{
U64 TotalBlocks; /* 00h */
U64 BlocksRemaining; /* 08h */
} MPI_RAID_VOL_INDICATOR, MPI_POINTER PTR_MPI_RAID_VOL_INDICATOR,
MpiRaidVolIndicator_t, MPI_POINTER pMpiRaidVolIndicator_t;
/****************************************************************************/
/* SCSI IO RAID Passthrough Request */
/****************************************************************************/
typedef struct _MSG_SCSI_IO_RAID_PT_REQUEST
{
U8 PhysDiskNum; /* 00h */
U8 Reserved1; /* 01h */
U8 ChainOffset; /* 02h */
U8 Function; /* 03h */
U8 CDBLength; /* 04h */
U8 SenseBufferLength; /* 05h */
U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U8 LUN[8]; /* 0Ch */
U32 Control; /* 14h */
U8 CDB[16]; /* 18h */
U32 DataLength; /* 28h */
U32 SenseBufferLowAddr; /* 2Ch */
SGE_IO_UNION SGL; /* 30h */
} MSG_SCSI_IO_RAID_PT_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REQUEST,
SCSIIORaidPassthroughRequest_t, MPI_POINTER pSCSIIORaidPassthroughRequest_t;
/* SCSI IO RAID Passthrough reply structure */
typedef struct _MSG_SCSI_IO_RAID_PT_REPLY
{
U8 PhysDiskNum; /* 00h */
U8 Reserved1; /* 01h */
U8 MsgLength; /* 02h */
U8 Function; /* 03h */
U8 CDBLength; /* 04h */
U8 SenseBufferLength; /* 05h */
U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */
U8 SCSIStatus; /* 0Ch */
U8 SCSIState; /* 0Dh */
U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */
U32 TransferCount; /* 14h */
U32 SenseCount; /* 18h */
U32 ResponseInfo; /* 1Ch */
} MSG_SCSI_IO_RAID_PT_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_RAID_PT_REPLY,
SCSIIORaidPassthroughReply_t, MPI_POINTER pSCSIIORaidPassthroughReply_t;
#endif
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* 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.01.04 * MPI Version: 01.02.04
* *
* Version History * Version History
* --------------- * ---------------
...@@ -26,6 +26,14 @@ ...@@ -26,6 +26,14 @@
* Added structures for MPI_TARGET_SCSI_SPI_CMD_BUFFER and * Added structures for MPI_TARGET_SCSI_SPI_CMD_BUFFER and
* MPI_TARGET_FCP_CMD_BUFFER. * MPI_TARGET_FCP_CMD_BUFFER.
* 03-27-01 01.01.04 Added structure offset comments. * 03-27-01 01.01.04 Added structure offset comments.
* 08-08-01 01.02.01 Original release for v1.2 work.
* 09-28-01 01.02.02 Added structure for MPI_TARGET_SCSI_SPI_STATUS_IU.
* Added PriorityReason field to some replies and
* defined more PriorityReason codes.
* Added some defines for to support previous version
* of MPI.
* 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.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
...@@ -78,6 +86,7 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_REQUEST ...@@ -78,6 +86,7 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_REQUEST
#define CMD_BUFFER_POST_FLAGS_64_BIT_ADDR (0x80) #define CMD_BUFFER_POST_FLAGS_64_BIT_ADDR (0x80)
#define CMD_BUFFER_POST_IO_INDEX_MASK (0x00003FFF) #define CMD_BUFFER_POST_IO_INDEX_MASK (0x00003FFF)
#define CMD_BUFFER_POST_IO_INDEX_MASK_0100 (0x000003FF) /* obsolete */
typedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY typedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY
...@@ -97,7 +106,7 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY ...@@ -97,7 +106,7 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_REPLY
} MSG_TARGET_CMD_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REPLY, } MSG_TARGET_CMD_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_TARGET_CMD_BUFFER_POST_REPLY,
TargetCmdBufferPostReply_t, MPI_POINTER pTargetCmdBufferPostReply_t; TargetCmdBufferPostReply_t, MPI_POINTER pTargetCmdBufferPostReply_t;
/* the following structure is obsolete as of MPI v1.2 */
typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY
{ {
U16 Reserved; /* 00h */ U16 Reserved; /* 00h */
...@@ -117,6 +126,13 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY ...@@ -117,6 +126,13 @@ typedef struct _MSG_PRIORITY_CMD_RECEIVED_REPLY
#define PRIORITY_REASON_NO_DISCONNECT (0x00) #define PRIORITY_REASON_NO_DISCONNECT (0x00)
#define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01) #define PRIORITY_REASON_SCSI_TASK_MANAGEMENT (0x01)
#define PRIORITY_REASON_CMD_PARITY_ERR (0x02)
#define PRIORITY_REASON_MSG_OUT_PARITY_ERR (0x03)
#define PRIORITY_REASON_LQ_CRC_ERR (0x04)
#define PRIORITY_REASON_CMD_CRC_ERR (0x05)
#define PRIORITY_REASON_PROTOCOL_ERR (0x06)
#define PRIORITY_REASON_DATA_OUT_PARITY_ERR (0x07)
#define PRIORITY_REASON_DATA_OUT_CRC_ERR (0x08)
#define PRIORITY_REASON_UNKNOWN (0xFF) #define PRIORITY_REASON_UNKNOWN (0xFF)
...@@ -129,7 +145,8 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY ...@@ -129,7 +145,8 @@ typedef struct _MSG_TARGET_CMD_BUFFER_POST_ERROR_REPLY
U8 Reserved2; /* 06h */ U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */ U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */ U32 MsgContext; /* 08h */
U16 Reserved3; /* 0Ch */ U8 PriorityReason; /* 0Ch */
U8 Reserved3; /* 0Dh */
U16 IOCStatus; /* 0Eh */ U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */ U32 IOCLogInfo; /* 10h */
U32 ReplyWord; /* 14h */ U32 ReplyWord; /* 14h */
...@@ -204,7 +221,8 @@ typedef struct _MSG_TARGET_ERROR_REPLY ...@@ -204,7 +221,8 @@ typedef struct _MSG_TARGET_ERROR_REPLY
U8 Reserved2; /* 06h */ U8 Reserved2; /* 06h */
U8 MsgFlags; /* 07h */ U8 MsgFlags; /* 07h */
U32 MsgContext; /* 08h */ U32 MsgContext; /* 08h */
U16 Reserved3; /* 0Ch */ U8 PriorityReason; /* 0Ch */
U8 Reserved3; /* 0Dh */
U16 IOCStatus; /* 0Eh */ U16 IOCStatus; /* 0Eh */
U32 IOCLogInfo; /* 10h */ U32 IOCLogInfo; /* 10h */
U32 ReplyWord; /* 14h */ U32 ReplyWord; /* 14h */
...@@ -234,8 +252,34 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST ...@@ -234,8 +252,34 @@ typedef struct _MSG_TARGET_STATUS_SEND_REQUEST
TargetStatusSendRequest_t, MPI_POINTER pTargetStatusSendRequest_t; TargetStatusSendRequest_t, MPI_POINTER pTargetStatusSendRequest_t;
#define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01) #define TARGET_STATUS_SEND_FLAGS_AUTO_GOOD_STATUS (0x01)
#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)
typedef struct _MPI_TARGET_FCP_RSP_BUFFER
{
U8 Reserved0[8]; /* 00h */
U8 FcpStatus; /* 08h */
U8 FcpFlags; /* 09h */
U8 Reserved1[2]; /* 0Ah */
U32 FcpResid; /* 0Ch */
U32 FcpSenseLength; /* 10h */
U32 FcpResponseLength; /* 14h */
U8 FcpResponseData[8]; /* 18h */
U8 FcpSenseData[32]; /* Pad to 64 bytes */ /* 20h */
} MPI_TARGET_FCP_RSP_BUFFER, MPI_POINTER PTR_MPI_TARGET_FCP_RSP_BUFFER,
MpiTargetFcpRspBuffer, MPI_POINTER pMpiTargetFcpRspBuffer;
typedef struct _MPI_TARGET_SCSI_SPI_STATUS_IU
{
U8 Reserved0; /* 00h */
U8 Reserved1; /* 01h */
U8 Valid; /* 02h */
U8 Status; /* 03h */
U32 SenseDataListLength; /* 04h */
U32 PktFailuresListLength; /* 08h */
U8 SenseData[52]; /* Pad the IU to 64 bytes */ /* 0Ch */
} MPI_TARGET_SCSI_SPI_STATUS_IU, MPI_POINTER PTR_MPI_TARGET_SCSI_SPI_STATUS_IU,
TargetScsiSpiStatusIU_t, MPI_POINTER pTargetScsiSpiStatusIU_t;
/****************************************************************************/ /****************************************************************************/
/* Target Mode Abort Request */ /* Target Mode Abort Request */
...@@ -324,6 +368,41 @@ typedef struct _MSG_TARGET_MODE_ABORT_REPLY ...@@ -324,6 +368,41 @@ typedef struct _MSG_TARGET_MODE_ABORT_REPLY
(((p) << TARGET_MODE_REPLY_PORT_SHIFT) & \ (((p) << TARGET_MODE_REPLY_PORT_SHIFT) & \
TARGET_MODE_REPLY_PORT_MASK)) TARGET_MODE_REPLY_PORT_MASK))
/* the following obsolete values are for MPI v1.0 support */
#define TARGET_MODE_REPLY_0100_MASK_HOST_INDEX (0x000003FF)
#define TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX (0)
#define TARGET_MODE_REPLY_0100_MASK_IOC_INDEX (0x001FF800)
#define TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX (11)
#define TARGET_MODE_REPLY_0100_PORT_MASK (0x00400000)
#define TARGET_MODE_REPLY_0100_PORT_SHIFT (22)
#define TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX (0x1F800000)
#define TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX (23)
#define GET_HOST_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) \
>> TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX)
#define SET_HOST_INDEX_0100(t, hi) \
((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_HOST_INDEX) | \
(((hi) << TARGET_MODE_REPLY_0100_SHIFT_HOST_INDEX) & \
TARGET_MODE_REPLY_0100_MASK_HOST_INDEX))
#define GET_IOC_INDEX_0100(x) (((x) & TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) \
>> TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX)
#define SET_IOC_INDEX_0100(t, ii) \
((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_IOC_INDEX) | \
(((ii) << TARGET_MODE_REPLY_0100_SHIFT_IOC_INDEX) & \
TARGET_MODE_REPLY_0100_MASK_IOC_INDEX))
#define GET_INITIATOR_INDEX_0100(x) \
(((x) & TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) \
>> TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX)
#define SET_INITIATOR_INDEX_0100(t, ii) \
((t) = ((t) & ~TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX) | \
(((ii) << TARGET_MODE_REPLY_0100_SHIFT_INITIATOR_INDEX) & \
TARGET_MODE_REPLY_0100_MASK_INITIATOR_INDEX))
#endif #endif
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Title: MPI Basic type definitions * Title: MPI Basic type definitions
* Creation Date: June 6, 2000 * Creation Date: June 6, 2000
* *
* MPI Version: 01.01.02 * MPI Version: 01.02.01
* *
* Version History * Version History
* --------------- * ---------------
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* 06-06-00 01.00.01 Update version number for 1.0 release. * 06-06-00 01.00.01 Update version number for 1.0 release.
* 11-02-00 01.01.01 Original release for post 1.0 work * 11-02-00 01.01.01 Original release for post 1.0 work
* 02-20-01 01.01.02 Added define and ifdef for MPI_POINTER. * 02-20-01 01.01.02 Added define and ifdef for MPI_POINTER.
* 08-08-01 01.02.01 Original release for v1.2 work.
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
*/ */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/tqueue.h> #include <linux/tqueue.h>
#include <linux/delay.h>
// #include <linux/trdevice.h> // #include <linux/trdevice.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -43,13 +44,15 @@ MODULE_DESCRIPTION(LANAME); ...@@ -43,13 +44,15 @@ MODULE_DESCRIPTION(LANAME);
#define MPT_LAN_MAX_BUCKETS_OUT 256 #define MPT_LAN_MAX_BUCKETS_OUT 256
#define MPT_LAN_BUCKET_THRESH 18 /* 9 buckets in one message */ #define MPT_LAN_BUCKET_THRESH 18 /* 9 buckets in one message */
#define MPT_LAN_BUCKETS_REMAIN_MISMATCH_THRESH 10
#define MPT_LAN_RX_COPYBREAK 200 #define MPT_LAN_RX_COPYBREAK 200
#define MPT_LAN_TX_TIMEOUT (1*HZ) #define MPT_LAN_TX_TIMEOUT (1*HZ)
#define MPT_TX_MAX_OUT_LIM 127 #define MPT_TX_MAX_OUT_LIM 127
#define MPT_LAN_MIN_MTU 96 /* RFC2625 */ #define MPT_LAN_MIN_MTU 96 /* RFC2625 */
#define MPT_LAN_MAX_MTU 65280 /* RFC2625 */ #define MPT_LAN_MAX_MTU 65280 /* RFC2625 */
#define MPT_LAN_MTU 16128 /* be nice to slab allocator */ #define MPT_LAN_MTU 13312 /* Max perf range + lower mem
usage than 16128 */
#define MPT_LAN_NAA_RFC2625 0x1 #define MPT_LAN_NAA_RFC2625 0x1
#define MPT_LAN_NAA_QLOGIC 0x2 #define MPT_LAN_NAA_QLOGIC 0x2
...@@ -66,6 +69,12 @@ MODULE_DESCRIPTION(LANAME); ...@@ -66,6 +69,12 @@ MODULE_DESCRIPTION(LANAME);
#define dioprintk(x) #define dioprintk(x)
#endif #endif
#ifdef MPT_LAN_DEBUG
#define dlprintk(x) printk x
#else
#define dlprintk(x)
#endif
#define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)(d)->priv) #define NETDEV_TO_LANPRIV_PTR(d) ((struct mpt_lan_priv *)(d)->priv)
#define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name) #define NETDEV_PTR_TO_IOC_NAME_s(d) (NETDEV_TO_LANPRIV_PTR(d)->mpt_dev->name)
#define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name #define IOC_AND_NETDEV_NAMES_s_s(d) NETDEV_PTR_TO_IOC_NAME_s(d), (d)->name
......
This diff is collapsed.
...@@ -15,11 +15,12 @@ ...@@ -15,11 +15,12 @@
* *
* (see also mptbase.c) * (see also mptbase.c)
* *
* Copyright (c) 1999-2001 LSI Logic Corporation * Copyright (c) 1999-2002 LSI Logic Corporation
* Originally By: Steven J. Ralston * Originally By: Steven J. Ralston
* (mailto:Steve.Ralston@lsil.com) * (mailto:netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* *
* $Id: mptscsih.h,v 1.7 2001/01/11 16:56:43 sralston Exp $ * $Id: mptscsih.h,v 1.18 2002/06/06 15:32:52 pdelaney Exp $
*/ */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
...@@ -68,14 +69,48 @@ ...@@ -68,14 +69,48 @@
* SCSI Public stuff... * SCSI Public stuff...
*/ */
#ifdef __sparc__ /*
#define MPT_SCSI_CAN_QUEUE 63 * Try to keep these at 2^N-1
#define MPT_SCSI_CMD_PER_LUN 63 */
/* FIXME! Still investigating qd=64 hang on sparc64... */ #define MPT_FC_CAN_QUEUE 63
#else //#define MPT_SCSI_CAN_QUEUE 31
#define MPT_SCSI_CAN_QUEUE 64 #define MPT_SCSI_CAN_QUEUE MPT_FC_CAN_QUEUE
#define MPT_SCSI_CMD_PER_LUN 64 #define MPT_SCSI_CMD_PER_LUN 7
#endif
#define MPT_SCSI_SG_DEPTH 40
/* To disable domain validation, uncomment the
* following line. No effect for FC devices.
* For SCSI devices, driver will negotiate to
* NVRAM settings (if available) or to maximum adapter
* capabilities.
*/
/* #define MPTSCSIH_DISABLE_DOMAIN_VALIDATION */
/* SCSI driver setup structure. Settings can be overridden
* by command line options.
*/
#define MPTSCSIH_DOMAIN_VALIDATION 1
#define MPTSCSIH_MAX_WIDTH 1
#define MPTSCSIH_MIN_SYNC 0x08
struct mptscsih_driver_setup
{
u8 dv;
u8 max_width;
u8 min_sync_fac;
};
#define MPTSCSIH_DRIVER_SETUP \
{ \
MPTSCSIH_DOMAIN_VALIDATION, \
MPTSCSIH_MAX_WIDTH, \
MPTSCSIH_MIN_SYNC, \
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* /*
...@@ -143,6 +178,7 @@ ...@@ -143,6 +178,7 @@
#define x_scsi_dev_reset mptscsih_dev_reset #define x_scsi_dev_reset mptscsih_dev_reset
#define x_scsi_host_reset mptscsih_host_reset #define x_scsi_host_reset mptscsih_host_reset
#define x_scsi_bios_param mptscsih_bios_param #define x_scsi_bios_param mptscsih_bios_param
#define x_scsi_select_queue_depths mptscsih_select_queue_depths
#define x_scsi_taskmgmt_bh mptscsih_taskmgmt_bh #define x_scsi_taskmgmt_bh mptscsih_taskmgmt_bh
#define x_scsi_old_abort mptscsih_old_abort #define x_scsi_old_abort mptscsih_old_abort
...@@ -155,18 +191,18 @@ ...@@ -155,18 +191,18 @@
extern int x_scsi_detect(Scsi_Host_Template *); extern int x_scsi_detect(Scsi_Host_Template *);
extern int x_scsi_release(struct Scsi_Host *host); extern int x_scsi_release(struct Scsi_Host *host);
extern const char *x_scsi_info(struct Scsi_Host *); extern const char *x_scsi_info(struct Scsi_Host *);
/*extern int x_scsi_command(Scsi_Cmnd *);*/
extern int x_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); extern int x_scsi_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
#ifdef MPT_SCSI_USE_NEW_EH #ifdef MPT_SCSI_USE_NEW_EH
extern int x_scsi_abort(Scsi_Cmnd *); extern int x_scsi_abort(Scsi_Cmnd *);
extern int x_scsi_bus_reset(Scsi_Cmnd *); extern int x_scsi_bus_reset(Scsi_Cmnd *);
extern int x_scsi_dev_reset(Scsi_Cmnd *); extern int x_scsi_dev_reset(Scsi_Cmnd *);
/*extern int x_scsi_host_reset(Scsi_Cmnd *);*/ extern int x_scsi_host_reset(Scsi_Cmnd *);
#else #else
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
extern int x_scsi_bios_param(Disk *, kdev_t, int *); extern int x_scsi_bios_param(Disk *, kdev_t, int *);
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 *);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
...@@ -177,6 +213,33 @@ extern void x_scsi_taskmgmt_bh(void *); ...@@ -177,6 +213,33 @@ extern void x_scsi_taskmgmt_bh(void *);
#ifdef MPT_SCSI_USE_NEW_EH #ifdef MPT_SCSI_USE_NEW_EH
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1)
#define MPT_SCSIHOST { \
next: NULL, \
PROC_SCSI_DECL \
name: "MPT SCSI Host", \
detect: x_scsi_detect, \
release: x_scsi_release, \
info: x_scsi_info, \
command: NULL, \
queuecommand: x_scsi_queuecommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: x_scsi_abort, \
eh_device_reset_handler: x_scsi_dev_reset, \
eh_bus_reset_handler: x_scsi_bus_reset, \
eh_host_reset_handler: x_scsi_host_reset, \
bios_param: x_scsi_bios_param, \
can_queue: MPT_SCSI_CAN_QUEUE, \
this_id: -1, \
sg_tablesize: MPT_SCSI_SG_DEPTH, \
cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \
unchecked_isa_dma: 0, \
use_clustering: ENABLE_CLUSTERING, \
}
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1) */
#define MPT_SCSIHOST { \ #define MPT_SCSIHOST { \
next: NULL, \ next: NULL, \
PROC_SCSI_DECL \ PROC_SCSI_DECL \
...@@ -194,13 +257,16 @@ extern void x_scsi_taskmgmt_bh(void *); ...@@ -194,13 +257,16 @@ extern void x_scsi_taskmgmt_bh(void *);
bios_param: x_scsi_bios_param, \ bios_param: x_scsi_bios_param, \
can_queue: MPT_SCSI_CAN_QUEUE, \ can_queue: MPT_SCSI_CAN_QUEUE, \
this_id: -1, \ this_id: -1, \
sg_tablesize: 25, \ sg_tablesize: MPT_SCSI_SG_DEPTH, \
cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \ cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \
unchecked_isa_dma: 0, \ unchecked_isa_dma: 0, \
use_clustering: ENABLE_CLUSTERING, \ use_clustering: ENABLE_CLUSTERING, \
use_new_eh_code: 1 \
} }
#else #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,1) */
#else /* MPT_SCSI_USE_NEW_EH */
#define MPT_SCSIHOST { \ #define MPT_SCSIHOST { \
next: NULL, \ next: NULL, \
...@@ -216,12 +282,12 @@ extern void x_scsi_taskmgmt_bh(void *); ...@@ -216,12 +282,12 @@ extern void x_scsi_taskmgmt_bh(void *);
bios_param: x_scsi_bios_param, \ bios_param: x_scsi_bios_param, \
can_queue: MPT_SCSI_CAN_QUEUE, \ can_queue: MPT_SCSI_CAN_QUEUE, \
this_id: -1, \ this_id: -1, \
sg_tablesize: 25, \ sg_tablesize: MPT_SCSI_SG_DEPTH, \
cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \ cmd_per_lun: MPT_SCSI_CMD_PER_LUN, \
unchecked_isa_dma: 0, \ unchecked_isa_dma: 0, \
use_clustering: ENABLE_CLUSTERING \ use_clustering: ENABLE_CLUSTERING \
} }
#endif #endif /* MPT_SCSI_USE_NEW_EH */
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
......
...@@ -4,11 +4,12 @@ ...@@ -4,11 +4,12 @@
* (Ultimately) SCSI-3 definitions; for now, inheriting * (Ultimately) SCSI-3 definitions; for now, inheriting
* SCSI-2 definitions. * SCSI-2 definitions.
* *
* Copyright (c) 1996-2001 Steven J. Ralston * Copyright (c) 1996-2002 Steven J. Ralston
* Written By: Steven J. Ralston (19960517) * Written By: Steven J. Ralston (19960517)
* (mailto:Steve.Ralston@lsil.com) * (mailto:sjralston1@netscape.net)
* (mailto:Pam.Delaney@lsil.com)
* *
* $Id: scsi3.h,v 1.5 2001/04/06 14:31:32 sralston Exp $ * $Id: scsi3.h,v 1.9 2002/02/27 18:45:02 sralston Exp $
*/ */
#ifndef SCSI3_H_INCLUDED #ifndef SCSI3_H_INCLUDED
...@@ -63,7 +64,10 @@ ...@@ -63,7 +64,10 @@
#define CMD_Write10 0x2A #define CMD_Write10 0x2A
#define CMD_WriteVerify 0x2E #define CMD_WriteVerify 0x2E
#define CMD_Verify 0x2F #define CMD_Verify 0x2F
#define CMD_SynchronizeCache 0x35
#define CMD_ReadDefectData 0x37 #define CMD_ReadDefectData 0x37
#define CMD_WriteBuffer 0x3B
#define CMD_ReadBuffer 0x3C
#define CMD_ReadLong 0x3E #define CMD_ReadLong 0x3E
#define CMD_LogSelect 0x4C #define CMD_LogSelect 0x4C
#define CMD_LogSense 0x4D #define CMD_LogSense 0x4D
......
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