aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r--drivers/message/fusion/mptbase.h47
1 files changed, 31 insertions, 16 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index e316708f76bd..e3a39272aad6 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -6,7 +6,7 @@
6 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Logic Corporation 8 * Copyright (c) 1999-2007 LSI Logic Corporation
9 * (mailto:mpt_linux_developer@lsil.com) 9 * (mailto:mpt_linux_developer@lsi.com)
10 * 10 *
11 */ 11 */
12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -75,8 +75,8 @@
75#define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR 75#define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR
76#endif 76#endif
77 77
78#define MPT_LINUX_VERSION_COMMON "3.04.03" 78#define MPT_LINUX_VERSION_COMMON "3.04.04"
79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.03" 79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.04"
80#define WHAT_MAGIC_STRING "@" "(" "#" ")" 80#define WHAT_MAGIC_STRING "@" "(" "#" ")"
81 81
82#define show_mptmod_ver(s,ver) \ 82#define show_mptmod_ver(s,ver) \
@@ -172,6 +172,9 @@
172#define MPT_SCSI_SG_DEPTH 40 172#define MPT_SCSI_SG_DEPTH 40
173#endif 173#endif
174 174
175/* debug print string length used for events and iocstatus */
176# define EVENT_DESCR_STR_SZ 100
177
175#ifdef __KERNEL__ /* { */ 178#ifdef __KERNEL__ /* { */
176/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 179/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
177 180
@@ -334,8 +337,8 @@ typedef struct _VirtTarget {
334 struct scsi_target *starget; 337 struct scsi_target *starget;
335 u8 tflags; 338 u8 tflags;
336 u8 ioc_id; 339 u8 ioc_id;
337 u8 target_id; 340 u8 id;
338 u8 bus_id; 341 u8 channel;
339 u8 minSyncFactor; /* 0xFF is async */ 342 u8 minSyncFactor; /* 0xFF is async */
340 u8 maxOffset; /* 0 if async */ 343 u8 maxOffset; /* 0 if async */
341 u8 maxWidth; /* 0 if narrow, 1 if wide */ 344 u8 maxWidth; /* 0 if narrow, 1 if wide */
@@ -344,13 +347,12 @@ typedef struct _VirtTarget {
344 u8 type; /* byte 0 of Inquiry data */ 347 u8 type; /* byte 0 of Inquiry data */
345 u8 deleted; /* target in process of being removed */ 348 u8 deleted; /* target in process of being removed */
346 u32 num_luns; 349 u32 num_luns;
347 u32 luns[8]; /* Max LUNs is 256 */
348} VirtTarget; 350} VirtTarget;
349 351
350typedef struct _VirtDevice { 352typedef struct _VirtDevice {
351 VirtTarget *vtarget; 353 VirtTarget *vtarget;
352 u8 configured_lun; 354 u8 configured_lun;
353 u32 lun; 355 int lun;
354} VirtDevice; 356} VirtDevice;
355 357
356/* 358/*
@@ -412,7 +414,7 @@ typedef struct _MPT_IOCTL {
412 u8 rsvd; 414 u8 rsvd;
413 u8 status; /* current command status */ 415 u8 status; /* current command status */
414 u8 reset; /* 1 if bus reset allowed */ 416 u8 reset; /* 1 if bus reset allowed */
415 u8 target; /* target for reset */ 417 u8 id; /* target for reset */
416 struct mutex ioctl_mutex; 418 struct mutex ioctl_mutex;
417} MPT_IOCTL; 419} MPT_IOCTL;
418 420
@@ -483,10 +485,24 @@ typedef struct _SasCfgData {
483 */ 485 */
484}SasCfgData; 486}SasCfgData;
485 487
488/*
489 * Inactive volume link list of raid component data
490 * @inactive_list
491 */
492struct inactive_raid_component_info {
493 struct list_head list;
494 u8 volumeID; /* volume target id */
495 u8 volumeBus; /* volume channel */
496 IOC_3_PHYS_DISK d; /* phys disk info */
497};
498
486typedef struct _RaidCfgData { 499typedef struct _RaidCfgData {
487 IOCPage2_t *pIocPg2; /* table of Raid Volumes */ 500 IOCPage2_t *pIocPg2; /* table of Raid Volumes */
488 IOCPage3_t *pIocPg3; /* table of physical disks */ 501 IOCPage3_t *pIocPg3; /* table of physical disks */
489 int isRaid; /* bit field, 1 if RAID */ 502 struct semaphore inactive_list_mutex;
503 struct list_head inactive_list; /* link list for physical
504 disk that belong in
505 inactive volumes */
490}RaidCfgData; 506}RaidCfgData;
491 507
492typedef struct _FcCfgData { 508typedef struct _FcCfgData {
@@ -528,6 +544,8 @@ typedef struct _MPT_ADAPTER
528 u32 mem_phys; /* == f4020000 (mmap) */ 544 u32 mem_phys; /* == f4020000 (mmap) */
529 u32 pio_mem_phys; /* Programmed IO (downloadboot) */ 545 u32 pio_mem_phys; /* Programmed IO (downloadboot) */
530 int mem_size; /* mmap memory size */ 546 int mem_size; /* mmap memory size */
547 int number_of_buses;
548 int devices_per_bus;
531 int alloc_total; 549 int alloc_total;
532 u32 last_state; 550 u32 last_state;
533 int active; 551 int active;
@@ -607,6 +625,8 @@ typedef struct _MPT_ADAPTER
607 u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */ 625 u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */
608 LANPage0_t lan_cnfg_page0; 626 LANPage0_t lan_cnfg_page0;
609 LANPage1_t lan_cnfg_page1; 627 LANPage1_t lan_cnfg_page1;
628
629 u8 ir_firmware; /* =1 if IR firmware detected */
610 /* 630 /*
611 * Description: errata_flag_1064 631 * Description: errata_flag_1064
612 * If a PCIX read occurs within 1 or 2 cycles after the chip receives 632 * If a PCIX read occurs within 1 or 2 cycles after the chip receives
@@ -790,12 +810,6 @@ typedef struct _mpt_sge {
790#define ddvprintk(x) 810#define ddvprintk(x)
791#endif 811#endif
792 812
793#ifdef MPT_DEBUG_NEGO
794#define dnegoprintk(x) printk x
795#else
796#define dnegoprintk(x)
797#endif
798
799#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY) 813#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)
800#define ddvtprintk(x) printk x 814#define ddvtprintk(x) printk x
801#else 815#else
@@ -957,7 +971,6 @@ typedef struct _MPT_SCSI_HOST {
957 int port; 971 int port;
958 u32 pad0; 972 u32 pad0;
959 struct scsi_cmnd **ScsiLookup; 973 struct scsi_cmnd **ScsiLookup;
960 VirtTarget **Targets;
961 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */ 974 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */
962 struct timer_list timer; 975 struct timer_list timer;
963 /* Pool of memory for holding SCpnts before doing 976 /* Pool of memory for holding SCpnts before doing
@@ -981,6 +994,7 @@ typedef struct _MPT_SCSI_HOST {
981 int scandv_wait_done; 994 int scandv_wait_done;
982 long last_queue_full; 995 long last_queue_full;
983 u16 tm_iocstatus; 996 u16 tm_iocstatus;
997 struct list_head target_reset_list;
984} MPT_SCSI_HOST; 998} MPT_SCSI_HOST;
985 999
986/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1000/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -1046,6 +1060,7 @@ extern void mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size);
1046extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); 1060extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);
1047extern int mpt_findImVolumes(MPT_ADAPTER *ioc); 1061extern int mpt_findImVolumes(MPT_ADAPTER *ioc);
1048extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); 1062extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
1063extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk);
1049 1064
1050/* 1065/*
1051 * Public data decl's... 1066 * Public data decl's...