aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-15 19:51:54 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-15 19:51:54 -0400
commitbc06cffdec85d487c77109dffcd2f285bdc502d3 (patch)
treeadc6e6398243da87e66c56102840597a329183a0 /drivers/message/fusion
parentd3502d7f25b22cfc9762bf1781faa9db1bb3be2e (diff)
parent9413d7b8aa777dd1fc7db9563ce5e80d769fe7b5 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits) [SCSI] ibmvscsi: convert to use the data buffer accessors [SCSI] dc395x: convert to use the data buffer accessors [SCSI] ncr53c8xx: convert to use the data buffer accessors [SCSI] sym53c8xx: convert to use the data buffer accessors [SCSI] ppa: coding police and printk levels [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c [SCSI] remove the dead CYBERSTORMIII_SCSI option [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA [SCSI] Clean up scsi_add_lun a bit [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs [SCSI] sni_53c710: Cleanup [SCSI] qla4xxx: Fix underrun/overrun conditions [SCSI] megaraid_mbox: use mutex instead of semaphore [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation. [SCSI] qla2xxx: update version to 8.02.00-k1. [SCSI] qla2xxx: add support for NPIV [SCSI] stex: use resid for xfer len information [SCSI] Add Brownie 1200U3P to blacklist [SCSI] scsi.c: convert to use the data buffer accessors ...
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/linux_compat.h9
-rw-r--r--drivers/message/fusion/lsi/mpi.h7
-rw-r--r--drivers/message/fusion/lsi/mpi_cnfg.h61
-rw-r--r--drivers/message/fusion/lsi/mpi_history.txt66
-rw-r--r--drivers/message/fusion/lsi/mpi_inb.h221
-rw-r--r--drivers/message/fusion/lsi/mpi_init.h10
-rw-r--r--drivers/message/fusion/lsi/mpi_ioc.h40
-rw-r--r--drivers/message/fusion/lsi/mpi_raid.h11
-rw-r--r--drivers/message/fusion/mptbase.c40
-rw-r--r--drivers/message/fusion/mptbase.h6
-rw-r--r--drivers/message/fusion/mptctl.c2
-rw-r--r--drivers/message/fusion/mptctl.h2
-rw-r--r--drivers/message/fusion/mptfc.c3
-rw-r--r--drivers/message/fusion/mptlan.c2
-rw-r--r--drivers/message/fusion/mptlan.h2
-rw-r--r--drivers/message/fusion/mptsas.c2
-rw-r--r--drivers/message/fusion/mptscsih.c264
-rw-r--r--drivers/message/fusion/mptscsih.h2
-rw-r--r--drivers/message/fusion/mptspi.c3
19 files changed, 328 insertions, 425 deletions
diff --git a/drivers/message/fusion/linux_compat.h b/drivers/message/fusion/linux_compat.h
deleted file mode 100644
index bb2bf5aa0b62..000000000000
--- a/drivers/message/fusion/linux_compat.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/* drivers/message/fusion/linux_compat.h */
2
3#ifndef FUSION_LINUX_COMPAT_H
4#define FUSION_LINUX_COMPAT_H
5
6#include <linux/version.h>
7#include <scsi/scsi_device.h>
8
9#endif /* _LINUX_COMPAT_H */
diff --git a/drivers/message/fusion/lsi/mpi.h b/drivers/message/fusion/lsi/mpi.h
index 75223bf24ae8..6a92e3d118fe 100644
--- a/drivers/message/fusion/lsi/mpi.h
+++ b/drivers/message/fusion/lsi/mpi.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2000-2006 LSI Logic Corporation. 2 * Copyright (c) 2000-2007 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi.h 5 * Name: mpi.h
6 * Title: MPI Message independent structures and definitions 6 * Title: MPI Message independent structures and definitions
7 * Creation Date: July 27, 2000 7 * Creation Date: July 27, 2000
8 * 8 *
9 * mpi.h Version: 01.05.12 9 * mpi.h Version: 01.05.13
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -78,6 +78,7 @@
78 * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target. 78 * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target.
79 * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT. 79 * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT.
80 * 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT. 80 * 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT.
81 * 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT.
81 * -------------------------------------------------------------------------- 82 * --------------------------------------------------------------------------
82 */ 83 */
83 84
@@ -108,7 +109,7 @@
108/* Note: The major versions of 0xe0 through 0xff are reserved */ 109/* Note: The major versions of 0xe0 through 0xff are reserved */
109 110
110/* versioning for this MPI header set */ 111/* versioning for this MPI header set */
111#define MPI_HEADER_VERSION_UNIT (0x0E) 112#define MPI_HEADER_VERSION_UNIT (0x10)
112#define MPI_HEADER_VERSION_DEV (0x00) 113#define MPI_HEADER_VERSION_DEV (0x00)
113#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00) 114#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)
114#define MPI_HEADER_VERSION_UNIT_SHIFT (8) 115#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
diff --git a/drivers/message/fusion/lsi/mpi_cnfg.h b/drivers/message/fusion/lsi/mpi_cnfg.h
index 0e4c8e77a81d..eda769730e39 100644
--- a/drivers/message/fusion/lsi/mpi_cnfg.h
+++ b/drivers/message/fusion/lsi/mpi_cnfg.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2000-2006 LSI Logic Corporation. 2 * Copyright (c) 2000-2007 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_cnfg.h 5 * Name: mpi_cnfg.h
6 * Title: MPI Config message, structures, and Pages 6 * Title: MPI Config message, structures, and Pages
7 * Creation Date: July 27, 2000 7 * Creation Date: July 27, 2000
8 * 8 *
9 * mpi_cnfg.h Version: 01.05.13 9 * mpi_cnfg.h Version: 01.05.15
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -293,6 +293,21 @@
293 * Added more AccessStatus values for SAS Device Page 0. 293 * Added more AccessStatus values for SAS Device Page 0.
294 * Added bit for SATA Asynchronous Notification Support in 294 * Added bit for SATA Asynchronous Notification Support in
295 * Flags field of SAS Device Page 0. 295 * Flags field of SAS Device Page 0.
296 * 02-28-07 01.05.14 Added ExtFlags field to Manufacturing Page 4.
297 * Added Disable SMART Polling for CapabilitiesFlags of
298 * IOC Page 6.
299 * Added Disable SMART Polling to DeviceSettings of BIOS
300 * Page 1.
301 * Added Multi-Port Domain bit for DiscoveryStatus field
302 * of SAS IO Unit Page.
303 * Added Multi-Port Domain Illegal flag for SAS IO Unit
304 * Page 1 AdditionalControlFlags field.
305 * 05-24-07 01.05.15 Added Hide Physical Disks with Non-Integrated RAID
306 * Metadata bit to Manufacturing Page 4 ExtFlags field.
307 * Added Internal Connector to End Device Present bit to
308 * Expander Page 0 Flags field.
309 * Fixed define for
310 * MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
296 * -------------------------------------------------------------------------- 311 * --------------------------------------------------------------------------
297 */ 312 */
298 313
@@ -639,7 +654,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
639 U8 InfoSize1; /* 0Bh */ 654 U8 InfoSize1; /* 0Bh */
640 U8 InquirySize; /* 0Ch */ 655 U8 InquirySize; /* 0Ch */
641 U8 Flags; /* 0Dh */ 656 U8 Flags; /* 0Dh */
642 U16 Reserved2; /* 0Eh */ 657 U16 ExtFlags; /* 0Eh */
643 U8 InquiryData[56]; /* 10h */ 658 U8 InquiryData[56]; /* 10h */
644 U32 ISVolumeSettings; /* 48h */ 659 U32 ISVolumeSettings; /* 48h */
645 U32 IMEVolumeSettings; /* 4Ch */ 660 U32 IMEVolumeSettings; /* 4Ch */
@@ -658,7 +673,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
658} CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4, 673} CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4,
659 ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t; 674 ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t;
660 675
661#define MPI_MANUFACTURING4_PAGEVERSION (0x04) 676#define MPI_MANUFACTURING4_PAGEVERSION (0x05)
662 677
663/* defines for the Flags field */ 678/* defines for the Flags field */
664#define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE (0x80) 679#define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE (0x80)
@@ -670,6 +685,12 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_4
670#define MPI_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x02) 685#define MPI_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x02)
671#define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01) 686#define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01)
672 687
688/* defines for the ExtFlags field */
689#define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA (0x0008)
690#define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE (0x0004)
691#define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE (0x0002)
692#define MPI_MANPAGE4_EXTFLAGS_LEGACY_MODE (0x0001)
693
673 694
674#ifndef MPI_MANPAGE5_NUM_FORCEWWID 695#ifndef MPI_MANPAGE5_NUM_FORCEWWID
675#define MPI_MANPAGE5_NUM_FORCEWWID (1) 696#define MPI_MANPAGE5_NUM_FORCEWWID (1)
@@ -781,7 +802,7 @@ typedef struct _CONFIG_PAGE_MANUFACTURING_9
781} CONFIG_PAGE_MANUFACTURING_9, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_9, 802} CONFIG_PAGE_MANUFACTURING_9, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_9,
782 ManufacturingPage9_t, MPI_POINTER pManufacturingPage9_t; 803 ManufacturingPage9_t, MPI_POINTER pManufacturingPage9_t;
783 804
784#define MPI_MANUFACTURING6_PAGEVERSION (0x00) 805#define MPI_MANUFACTURING9_PAGEVERSION (0x00)
785 806
786 807
787typedef struct _CONFIG_PAGE_MANUFACTURING_10 808typedef struct _CONFIG_PAGE_MANUFACTURING_10
@@ -1138,6 +1159,8 @@ typedef struct _CONFIG_PAGE_IOC_6
1138 1159
1139/* IOC Page 6 Capabilities Flags */ 1160/* IOC Page 6 Capabilities Flags */
1140 1161
1162#define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING (0x00000008)
1163
1141#define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE (0x00000006) 1164#define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE (0x00000006)
1142#define MPI_IOCPAGE6_CAP_FLAGS_64MB_METADATA_SIZE (0x00000000) 1165#define MPI_IOCPAGE6_CAP_FLAGS_64MB_METADATA_SIZE (0x00000000)
1143#define MPI_IOCPAGE6_CAP_FLAGS_512MB_METADATA_SIZE (0x00000002) 1166#define MPI_IOCPAGE6_CAP_FLAGS_512MB_METADATA_SIZE (0x00000002)
@@ -1208,6 +1231,7 @@ typedef struct _CONFIG_PAGE_BIOS_1
1208#define MPI_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008) 1231#define MPI_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008)
1209 1232
1210/* values for the DeviceSettings field */ 1233/* values for the DeviceSettings field */
1234#define MPI_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING (0x00000010)
1211#define MPI_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008) 1235#define MPI_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008)
1212#define MPI_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004) 1236#define MPI_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004)
1213#define MPI_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002) 1237#define MPI_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002)
@@ -2281,11 +2305,11 @@ typedef struct _CONFIG_PAGE_RAID_VOL_0
2281typedef struct _CONFIG_PAGE_RAID_VOL_1 2305typedef struct _CONFIG_PAGE_RAID_VOL_1
2282{ 2306{
2283 CONFIG_PAGE_HEADER Header; /* 00h */ 2307 CONFIG_PAGE_HEADER Header; /* 00h */
2284 U8 VolumeID; /* 01h */ 2308 U8 VolumeID; /* 04h */
2285 U8 VolumeBus; /* 02h */ 2309 U8 VolumeBus; /* 05h */
2286 U8 VolumeIOC; /* 03h */ 2310 U8 VolumeIOC; /* 06h */
2287 U8 Reserved0; /* 04h */ 2311 U8 Reserved0; /* 07h */
2288 U8 GUID[24]; /* 05h */ 2312 U8 GUID[24]; /* 08h */
2289 U8 Name[32]; /* 20h */ 2313 U8 Name[32]; /* 20h */
2290 U64 WWID; /* 40h */ 2314 U64 WWID; /* 40h */
2291 U32 Reserved1; /* 48h */ 2315 U32 Reserved1; /* 48h */
@@ -2340,7 +2364,7 @@ typedef struct _RAID_PHYS_DISK0_STATUS
2340} RAID_PHYS_DISK0_STATUS, MPI_POINTER PTR_RAID_PHYS_DISK0_STATUS, 2364} RAID_PHYS_DISK0_STATUS, MPI_POINTER PTR_RAID_PHYS_DISK0_STATUS,
2341 RaidPhysDiskStatus_t, MPI_POINTER pRaidPhysDiskStatus_t; 2365 RaidPhysDiskStatus_t, MPI_POINTER pRaidPhysDiskStatus_t;
2342 2366
2343/* RAID Volume 2 IM Physical Disk DiskStatus flags */ 2367/* RAID Physical Disk PhysDiskStatus flags */
2344 2368
2345#define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x01) 2369#define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x01)
2346#define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED (0x02) 2370#define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED (0x02)
@@ -2544,6 +2568,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0
2544#define MPI_SAS_IOUNIT0_DS_TABLE_LINK (0x00000400) 2568#define MPI_SAS_IOUNIT0_DS_TABLE_LINK (0x00000400)
2545#define MPI_SAS_IOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800) 2569#define MPI_SAS_IOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800)
2546#define MPI_SAS_IOUNIT0_DS_MAX_SATA_TARGETS (0x00001000) 2570#define MPI_SAS_IOUNIT0_DS_MAX_SATA_TARGETS (0x00001000)
2571#define MPI_SAS_IOUNIT0_DS_MULTI_PORT_DOMAIN (0x00002000)
2547 2572
2548 2573
2549typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA 2574typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA
@@ -2607,6 +2632,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1
2607#define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001) 2632#define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001)
2608 2633
2609/* values for SAS IO Unit Page 1 AdditionalControlFlags */ 2634/* values for SAS IO Unit Page 1 AdditionalControlFlags */
2635#define MPI_SAS_IOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080)
2610#define MPI_SAS_IOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040) 2636#define MPI_SAS_IOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040)
2611#define MPI_SAS_IOUNIT1_ACONTROL_HIDE_NONZERO_ATTACHED_PHY_IDENT (0x0020) 2637#define MPI_SAS_IOUNIT1_ACONTROL_HIDE_NONZERO_ATTACHED_PHY_IDENT (0x0020)
2612#define MPI_SAS_IOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010) 2638#define MPI_SAS_IOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010)
@@ -2734,6 +2760,7 @@ typedef struct _CONFIG_PAGE_SAS_EXPANDER_0
2734#define MPI_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800) 2760#define MPI_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800)
2735 2761
2736/* values for SAS Expander Page 0 Flags field */ 2762/* values for SAS Expander Page 0 Flags field */
2763#define MPI_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x04)
2737#define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x02) 2764#define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x02)
2738#define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x01) 2765#define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x01)
2739 2766
@@ -2774,7 +2801,7 @@ typedef struct _CONFIG_PAGE_SAS_EXPANDER_1
2774/* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */ 2801/* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */
2775 2802
2776/* values for SAS Expander Page 1 DiscoveryInfo field */ 2803/* values for SAS Expander Page 1 DiscoveryInfo field */
2777#define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY DISABLED (0x04) 2804#define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04)
2778#define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02) 2805#define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02)
2779#define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01) 2806#define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01)
2780 2807
@@ -2895,11 +2922,11 @@ typedef struct _CONFIG_PAGE_SAS_PHY_0
2895 U8 AttachedPhyIdentifier; /* 16h */ 2922 U8 AttachedPhyIdentifier; /* 16h */
2896 U8 Reserved2; /* 17h */ 2923 U8 Reserved2; /* 17h */
2897 U32 AttachedDeviceInfo; /* 18h */ 2924 U32 AttachedDeviceInfo; /* 18h */
2898 U8 ProgrammedLinkRate; /* 20h */ 2925 U8 ProgrammedLinkRate; /* 1Ch */
2899 U8 HwLinkRate; /* 21h */ 2926 U8 HwLinkRate; /* 1Dh */
2900 U8 ChangeCount; /* 22h */ 2927 U8 ChangeCount; /* 1Eh */
2901 U8 Flags; /* 23h */ 2928 U8 Flags; /* 1Fh */
2902 U32 PhyInfo; /* 24h */ 2929 U32 PhyInfo; /* 20h */
2903} CONFIG_PAGE_SAS_PHY_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_0, 2930} CONFIG_PAGE_SAS_PHY_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_0,
2904 SasPhyPage0_t, MPI_POINTER pSasPhyPage0_t; 2931 SasPhyPage0_t, MPI_POINTER pSasPhyPage0_t;
2905 2932
diff --git a/drivers/message/fusion/lsi/mpi_history.txt b/drivers/message/fusion/lsi/mpi_history.txt
index ddc7ae029dd3..a1f479057ea3 100644
--- a/drivers/message/fusion/lsi/mpi_history.txt
+++ b/drivers/message/fusion/lsi/mpi_history.txt
@@ -3,28 +3,28 @@
3 MPI Header File Change History 3 MPI Header File Change History
4 ============================== 4 ==============================
5 5
6 Copyright (c) 2000-2006 LSI Logic Corporation. 6 Copyright (c) 2000-2007 LSI Logic Corporation.
7 7
8 --------------------------------------- 8 ---------------------------------------
9 Header Set Release Version: 01.05.14 9 Header Set Release Version: 01.05.16
10 Header Set Release Date: 10-11-06 10 Header Set Release Date: 05-24-07
11 --------------------------------------- 11 ---------------------------------------
12 12
13 Filename Current version Prior version 13 Filename Current version Prior version
14 ---------- --------------- ------------- 14 ---------- --------------- -------------
15 mpi.h 01.05.12 01.05.11 15 mpi.h 01.05.13 01.05.12
16 mpi_ioc.h 01.05.12 01.05.11 16 mpi_ioc.h 01.05.14 01.05.13
17 mpi_cnfg.h 01.05.13 01.05.12 17 mpi_cnfg.h 01.05.15 01.05.14
18 mpi_init.h 01.05.08 01.05.07 18 mpi_init.h 01.05.09 01.05.09
19 mpi_targ.h 01.05.06 01.05.06 19 mpi_targ.h 01.05.06 01.05.06
20 mpi_fc.h 01.05.01 01.05.01 20 mpi_fc.h 01.05.01 01.05.01
21 mpi_lan.h 01.05.01 01.05.01 21 mpi_lan.h 01.05.01 01.05.01
22 mpi_raid.h 01.05.02 01.05.02 22 mpi_raid.h 01.05.03 01.05.03
23 mpi_tool.h 01.05.03 01.05.03 23 mpi_tool.h 01.05.03 01.05.03
24 mpi_inb.h 01.05.01 01.05.01 24 mpi_inb.h 01.05.01 01.05.01
25 mpi_sas.h 01.05.04 01.05.03 25 mpi_sas.h 01.05.04 01.05.04
26 mpi_type.h 01.05.02 01.05.02 26 mpi_type.h 01.05.02 01.05.02
27 mpi_history.txt 01.05.14 01.05.13 27 mpi_history.txt 01.05.14 01.05.14
28 28
29 29
30 * Date Version Description 30 * Date Version Description
@@ -95,6 +95,7 @@ mpi.h
95 * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target. 95 * 08-30-05 01.05.10 Added 2 new IOCStatus codes for Target.
96 * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT. 96 * 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT.
97 * 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT. 97 * 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT.
98 * 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT.
98 * -------------------------------------------------------------------------- 99 * --------------------------------------------------------------------------
99 100
100mpi_ioc.h 101mpi_ioc.h
@@ -191,6 +192,13 @@ mpi_ioc.h
191 * data structure. 192 * data structure.
192 * Added new ImageType values for FWDownload and FWUpload 193 * Added new ImageType values for FWDownload and FWUpload
193 * requests. 194 * requests.
195 * 02-28-07 01.05.13 Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS
196 * Broadcast Event Data (replacing _RESERVED2).
197 * For Discovery Error Event Data DiscoveryStatus field,
198 * replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and
199 * added _MULTI_PORT_DOMAIN.
200 * 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
201 * Added Common Boot Block type to FWUpload Request.
194 * -------------------------------------------------------------------------- 202 * --------------------------------------------------------------------------
195 203
196mpi_cnfg.h 204mpi_cnfg.h
@@ -473,6 +481,21 @@ mpi_cnfg.h
473 * Added more AccessStatus values for SAS Device Page 0. 481 * Added more AccessStatus values for SAS Device Page 0.
474 * Added bit for SATA Asynchronous Notification Support in 482 * Added bit for SATA Asynchronous Notification Support in
475 * Flags field of SAS Device Page 0. 483 * Flags field of SAS Device Page 0.
484 * 02-28-07 01.05.14 Added ExtFlags field to Manufacturing Page 4.
485 * Added Disable SMART Polling for CapabilitiesFlags of
486 * IOC Page 6.
487 * Added Disable SMART Polling to DeviceSettings of BIOS
488 * Page 1.
489 * Added Multi-Port Domain bit for DiscoveryStatus field
490 * of SAS IO Unit Page.
491 * Added Multi-Port Domain Illegal flag for SAS IO Unit
492 * Page 1 AdditionalControlFlags field.
493 * 05-24-07 01.05.15 Added Hide Physical Disks with Non-Integrated RAID
494 * Metadata bit to Manufacturing Page 4 ExtFlags field.
495 * Added Internal Connector to End Device Present bit to
496 * Expander Page 0 Flags field.
497 * Fixed define for
498 * MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
476 * -------------------------------------------------------------------------- 499 * --------------------------------------------------------------------------
477 500
478mpi_init.h 501mpi_init.h
@@ -517,6 +540,8 @@ mpi_init.h
517 * unique in the first 32 characters. 540 * unique in the first 32 characters.
518 * 03-27-06 01.05.07 Added Task Management type of Clear ACA. 541 * 03-27-06 01.05.07 Added Task Management type of Clear ACA.
519 * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA. 542 * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA.
543 * 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management
544 * Request: Do Not Send Task IU and Soft Reset Option.
520 * -------------------------------------------------------------------------- 545 * --------------------------------------------------------------------------
521 546
522mpi_targ.h 547mpi_targ.h
@@ -571,7 +596,7 @@ mpi_fc.h
571 * 11-02-00 01.01.01 Original release for post 1.0 work 596 * 11-02-00 01.01.01 Original release for post 1.0 work
572 * 12-04-00 01.01.02 Added messages for Common Transport Send and 597 * 12-04-00 01.01.02 Added messages for Common Transport Send and
573 * Primitive Send. 598 * Primitive Send.
574 * 01-09-01 01.01.03 Modified some of the new flags to have an MPI prefix 599 * 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix
575 * and modified the FcPrimitiveSend flags. 600 * and modified the FcPrimitiveSend flags.
576 * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger 601 * 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger
577 * field. 602 * field.
@@ -634,6 +659,8 @@ mpi_raid.h
634 * 08-19-04 01.05.01 Original release for MPI v1.5. 659 * 08-19-04 01.05.01 Original release for MPI v1.5.
635 * 01-15-05 01.05.02 Added defines for the two new RAID Actions for 660 * 01-15-05 01.05.02 Added defines for the two new RAID Actions for
636 * _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE. 661 * _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
662 * 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
663 * associated defines.
637 * -------------------------------------------------------------------------- 664 * --------------------------------------------------------------------------
638 665
639mpi_tool.h 666mpi_tool.h
@@ -682,7 +709,22 @@ mpi_type.h
682 709
683mpi_history.txt Parts list history 710mpi_history.txt Parts list history
684 711
685Filename 01.05.13 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09 712Filename 01.05.15 01.05.15
713---------- -------- --------
714mpi.h 01.05.12 01.05.13
715mpi_ioc.h 01.05.13 01.05.14
716mpi_cnfg.h 01.05.14 01.05.15
717mpi_init.h 01.05.09 01.05.09
718mpi_targ.h 01.05.06 01.05.06
719mpi_fc.h 01.05.01 01.05.01
720mpi_lan.h 01.05.01 01.05.01
721mpi_raid.h 01.05.03 01.05.03
722mpi_tool.h 01.05.03 01.05.03
723mpi_inb.h 01.05.01 01.05.01
724mpi_sas.h 01.05.04 01.05.04
725mpi_type.h 01.05.02 01.05.02
726
727Filename 01.05.14 01.05.13 01.05.12 01.05.11 01.05.10 01.05.09
686---------- -------- -------- -------- -------- -------- -------- 728---------- -------- -------- -------- -------- -------- --------
687mpi.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.08 01.05.07 729mpi.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.08 01.05.07
688mpi_ioc.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.09 01.05.08 730mpi_ioc.h 01.05.12 01.05.11 01.05.10 01.05.09 01.05.09 01.05.08
diff --git a/drivers/message/fusion/lsi/mpi_inb.h b/drivers/message/fusion/lsi/mpi_inb.h
deleted file mode 100644
index ff167309ba27..000000000000
--- a/drivers/message/fusion/lsi/mpi_inb.h
+++ /dev/null
@@ -1,221 +0,0 @@
1/*
2 * Copyright (c) 2003-2004 LSI Logic Corporation.
3 *
4 *
5 * Name: mpi_inb.h
6 * Title: MPI Inband structures and definitions
7 * Creation Date: September 30, 2003
8 *
9 * mpi_inb.h Version: 01.05.01
10 *
11 * Version History
12 * ---------------
13 *
14 * Date Version Description
15 * -------- -------- ------------------------------------------------------
16 * 05-11-04 01.03.01 Original release.
17 * 08-19-04 01.05.01 Original release for MPI v1.5.
18 * --------------------------------------------------------------------------
19 */
20
21#ifndef MPI_INB_H
22#define MPI_INB_H
23
24/******************************************************************************
25*
26* I n b a n d M e s s a g e s
27*
28*******************************************************************************/
29
30
31/****************************************************************************/
32/* Inband Buffer Post Request */
33/****************************************************************************/
34
35typedef struct _MSG_INBAND_BUFFER_POST_REQUEST
36{
37 U8 Reserved1; /* 00h */
38 U8 BufferCount; /* 01h */
39 U8 ChainOffset; /* 02h */
40 U8 Function; /* 03h */
41 U16 Reserved2; /* 04h */
42 U8 Reserved3; /* 06h */
43 U8 MsgFlags; /* 07h */
44 U32 MsgContext; /* 08h */
45 U32 Reserved4; /* 0Ch */
46 SGE_TRANS_SIMPLE_UNION SGL; /* 10h */
47} MSG_INBAND_BUFFER_POST_REQUEST, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REQUEST,
48 MpiInbandBufferPostRequest_t , MPI_POINTER pMpiInbandBufferPostRequest_t;
49
50
51typedef struct _WWN_FC_FORMAT
52{
53 U64 NodeName; /* 00h */
54 U64 PortName; /* 08h */
55} WWN_FC_FORMAT, MPI_POINTER PTR_WWN_FC_FORMAT,
56 WwnFcFormat_t, MPI_POINTER pWwnFcFormat_t;
57
58typedef struct _WWN_SAS_FORMAT
59{
60 U64 WorldWideID; /* 00h */
61 U32 Reserved1; /* 08h */
62 U32 Reserved2; /* 0Ch */
63} WWN_SAS_FORMAT, MPI_POINTER PTR_WWN_SAS_FORMAT,
64 WwnSasFormat_t, MPI_POINTER pWwnSasFormat_t;
65
66typedef union _WWN_INBAND_FORMAT
67{
68 WWN_FC_FORMAT Fc;
69 WWN_SAS_FORMAT Sas;
70} WWN_INBAND_FORMAT, MPI_POINTER PTR_WWN_INBAND_FORMAT,
71 WwnInbandFormat, MPI_POINTER pWwnInbandFormat;
72
73
74/* Inband Buffer Post reply message */
75
76typedef struct _MSG_INBAND_BUFFER_POST_REPLY
77{
78 U16 Reserved1; /* 00h */
79 U8 MsgLength; /* 02h */
80 U8 Function; /* 03h */
81 U16 Reserved2; /* 04h */
82 U8 Reserved3; /* 06h */
83 U8 MsgFlags; /* 07h */
84 U32 MsgContext; /* 08h */
85 U16 Reserved4; /* 0Ch */
86 U16 IOCStatus; /* 0Eh */
87 U32 IOCLogInfo; /* 10h */
88 U32 TransferLength; /* 14h */
89 U32 TransactionContext; /* 18h */
90 WWN_INBAND_FORMAT Wwn; /* 1Ch */
91 U32 IOCIdentifier[4]; /* 2Ch */
92} MSG_INBAND_BUFFER_POST_REPLY, MPI_POINTER PTR_MSG_INBAND_BUFFER_POST_REPLY,
93 MpiInbandBufferPostReply_t, MPI_POINTER pMpiInbandBufferPostReply_t;
94
95
96/****************************************************************************/
97/* Inband Send Request */
98/****************************************************************************/
99
100typedef struct _MSG_INBAND_SEND_REQUEST
101{
102 U16 Reserved1; /* 00h */
103 U8 ChainOffset; /* 02h */
104 U8 Function; /* 03h */
105 U16 Reserved2; /* 04h */
106 U8 Reserved3; /* 06h */
107 U8 MsgFlags; /* 07h */
108 U32 MsgContext; /* 08h */
109 U32 Reserved4; /* 0Ch */
110 WWN_INBAND_FORMAT Wwn; /* 10h */
111 U32 Reserved5; /* 20h */
112 SGE_IO_UNION SGL; /* 24h */
113} MSG_INBAND_SEND_REQUEST, MPI_POINTER PTR_MSG_INBAND_SEND_REQUEST,
114 MpiInbandSendRequest_t , MPI_POINTER pMpiInbandSendRequest_t;
115
116
117/* Inband Send reply message */
118
119typedef struct _MSG_INBAND_SEND_REPLY
120{
121 U16 Reserved1; /* 00h */
122 U8 MsgLength; /* 02h */
123 U8 Function; /* 03h */
124 U16 Reserved2; /* 04h */
125 U8 Reserved3; /* 06h */
126 U8 MsgFlags; /* 07h */
127 U32 MsgContext; /* 08h */
128 U16 Reserved4; /* 0Ch */
129 U16 IOCStatus; /* 0Eh */
130 U32 IOCLogInfo; /* 10h */
131 U32 ResponseLength; /* 14h */
132} MSG_INBAND_SEND_REPLY, MPI_POINTER PTR_MSG_INBAND_SEND_REPLY,
133 MpiInbandSendReply_t, MPI_POINTER pMpiInbandSendReply_t;
134
135
136/****************************************************************************/
137/* Inband Response Request */
138/****************************************************************************/
139
140typedef struct _MSG_INBAND_RSP_REQUEST
141{
142 U16 Reserved1; /* 00h */
143 U8 ChainOffset; /* 02h */
144 U8 Function; /* 03h */
145 U16 Reserved2; /* 04h */
146 U8 Reserved3; /* 06h */
147 U8 MsgFlags; /* 07h */
148 U32 MsgContext; /* 08h */
149 U32 Reserved4; /* 0Ch */
150 WWN_INBAND_FORMAT Wwn; /* 10h */
151 U32 IOCIdentifier[4]; /* 20h */
152 U32 ResponseLength; /* 30h */
153 SGE_IO_UNION SGL; /* 34h */
154} MSG_INBAND_RSP_REQUEST, MPI_POINTER PTR_MSG_INBAND_RSP_REQUEST,
155 MpiInbandRspRequest_t , MPI_POINTER pMpiInbandRspRequest_t;
156
157
158/* Inband Response reply message */
159
160typedef struct _MSG_INBAND_RSP_REPLY
161{
162 U16 Reserved1; /* 00h */
163 U8 MsgLength; /* 02h */
164 U8 Function; /* 03h */
165 U16 Reserved2; /* 04h */
166 U8 Reserved3; /* 06h */
167 U8 MsgFlags; /* 07h */
168 U32 MsgContext; /* 08h */
169 U16 Reserved4; /* 0Ch */
170 U16 IOCStatus; /* 0Eh */
171 U32 IOCLogInfo; /* 10h */
172} MSG_INBAND_RSP_REPLY, MPI_POINTER PTR_MSG_INBAND_RSP_REPLY,
173 MpiInbandRspReply_t, MPI_POINTER pMpiInbandRspReply_t;
174
175
176/****************************************************************************/
177/* Inband Abort Request */
178/****************************************************************************/
179
180typedef struct _MSG_INBAND_ABORT_REQUEST
181{
182 U8 Reserved1; /* 00h */
183 U8 AbortType; /* 01h */
184 U8 ChainOffset; /* 02h */
185 U8 Function; /* 03h */
186 U16 Reserved2; /* 04h */
187 U8 Reserved3; /* 06h */
188 U8 MsgFlags; /* 07h */
189 U32 MsgContext; /* 08h */
190 U32 Reserved4; /* 0Ch */
191 U32 ContextToAbort; /* 10h */
192} MSG_INBAND_ABORT_REQUEST, MPI_POINTER PTR_MSG_INBAND_ABORT_REQUEST,
193 MpiInbandAbortRequest_t , MPI_POINTER pMpiInbandAbortRequest_t;
194
195#define MPI_INBAND_ABORT_TYPE_ALL_BUFFERS (0x00)
196#define MPI_INBAND_ABORT_TYPE_EXACT_BUFFER (0x01)
197#define MPI_INBAND_ABORT_TYPE_SEND_REQUEST (0x02)
198#define MPI_INBAND_ABORT_TYPE_RESPONSE_REQUEST (0x03)
199
200
201/* Inband Abort reply message */
202
203typedef struct _MSG_INBAND_ABORT_REPLY
204{
205 U8 Reserved1; /* 00h */
206 U8 AbortType; /* 01h */
207 U8 MsgLength; /* 02h */
208 U8 Function; /* 03h */
209 U16 Reserved2; /* 04h */
210 U8 Reserved3; /* 06h */
211 U8 MsgFlags; /* 07h */
212 U32 MsgContext; /* 08h */
213 U16 Reserved4; /* 0Ch */
214 U16 IOCStatus; /* 0Eh */
215 U32 IOCLogInfo; /* 10h */
216} MSG_INBAND_ABORT_REPLY, MPI_POINTER PTR_MSG_INBAND_ABORT_REPLY,
217 MpiInbandAbortReply_t, MPI_POINTER pMpiInbandAbortReply_t;
218
219
220#endif
221
diff --git a/drivers/message/fusion/lsi/mpi_init.h b/drivers/message/fusion/lsi/mpi_init.h
index ec9dff2249a7..3a02615f12d6 100644
--- a/drivers/message/fusion/lsi/mpi_init.h
+++ b/drivers/message/fusion/lsi/mpi_init.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2000-2006 LSI Logic Corporation. 2 * Copyright (c) 2000-2007 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_init.h 5 * Name: mpi_init.h
6 * Title: MPI initiator mode messages and structures 6 * Title: MPI initiator mode messages and structures
7 * Creation Date: June 8, 2000 7 * Creation Date: June 8, 2000
8 * 8 *
9 * mpi_init.h Version: 01.05.08 9 * mpi_init.h Version: 01.05.09
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -54,6 +54,8 @@
54 * unique in the first 32 characters. 54 * unique in the first 32 characters.
55 * 03-27-06 01.05.07 Added Task Management type of Clear ACA. 55 * 03-27-06 01.05.07 Added Task Management type of Clear ACA.
56 * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA. 56 * 10-11-06 01.05.08 Shortened define for Task Management type of Clear ACA.
57 * 02-28-07 01.05.09 Defined two new MsgFlags bits for SCSI Task Management
58 * Request: Do Not Send Task IU and Soft Reset Option.
57 * -------------------------------------------------------------------------- 59 * --------------------------------------------------------------------------
58 */ 60 */
59 61
@@ -432,10 +434,14 @@ typedef struct _MSG_SCSI_TASK_MGMT
432#define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08) 434#define MPI_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08)
433 435
434/* MsgFlags bits */ 436/* MsgFlags bits */
437#define MPI_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU (0x01)
438
435#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00) 439#define MPI_SCSITASKMGMT_MSGFLAGS_TARGET_RESET_OPTION (0x00)
436#define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION (0x02) 440#define MPI_SCSITASKMGMT_MSGFLAGS_LIP_RESET_OPTION (0x02)
437#define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04) 441#define MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION (0x04)
438 442
443#define MPI_SCSITASKMGMT_MSGFLAGS_SOFT_RESET_OPTION (0x08)
444
439/* SCSI Task Management Reply */ 445/* SCSI Task Management Reply */
440typedef struct _MSG_SCSI_TASK_MGMT_REPLY 446typedef struct _MSG_SCSI_TASK_MGMT_REPLY
441{ 447{
diff --git a/drivers/message/fusion/lsi/mpi_ioc.h b/drivers/message/fusion/lsi/mpi_ioc.h
index 6c33e3353375..b1893d185bc4 100644
--- a/drivers/message/fusion/lsi/mpi_ioc.h
+++ b/drivers/message/fusion/lsi/mpi_ioc.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2000-2006 LSI Logic Corporation. 2 * Copyright (c) 2000-2007 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_ioc.h 5 * Name: mpi_ioc.h
6 * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages 6 * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
7 * Creation Date: August 11, 2000 7 * Creation Date: August 11, 2000
8 * 8 *
9 * mpi_ioc.h Version: 01.05.12 9 * mpi_ioc.h Version: 01.05.14
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -106,6 +106,13 @@
106 * data structure. 106 * data structure.
107 * Added new ImageType values for FWDownload and FWUpload 107 * Added new ImageType values for FWDownload and FWUpload
108 * requests. 108 * requests.
109 * 02-28-07 01.05.13 Added MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT for SAS
110 * Broadcast Event Data (replacing _RESERVED2).
111 * For Discovery Error Event Data DiscoveryStatus field,
112 * replaced _MULTPL_PATHS with _UNSUPPORTED_DEVICE and
113 * added _MULTI_PORT_DOMAIN.
114 * 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request.
115 * Added Common Boot Block type to FWUpload Request.
109 * -------------------------------------------------------------------------- 116 * --------------------------------------------------------------------------
110 */ 117 */
111 118
@@ -792,7 +799,7 @@ typedef struct _EVENT_DATA_SAS_BROADCAST_PRIMITIVE
792 799
793#define MPI_EVENT_PRIMITIVE_CHANGE (0x01) 800#define MPI_EVENT_PRIMITIVE_CHANGE (0x01)
794#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03) 801#define MPI_EVENT_PRIMITIVE_EXPANDER (0x03)
795#define MPI_EVENT_PRIMITIVE_RESERVED2 (0x04) 802#define MPI_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
796#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05) 803#define MPI_EVENT_PRIMITIVE_RESERVED3 (0x05)
797#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06) 804#define MPI_EVENT_PRIMITIVE_RESERVED4 (0x06)
798#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07) 805#define MPI_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
@@ -857,8 +864,9 @@ typedef struct _EVENT_DATA_DISCOVERY_ERROR
857#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100) 864#define MPI_EVENT_DSCVRY_ERR_DS_SMP_CRC_ERROR (0x00000100)
858#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200) 865#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_SUBTRACTIVE (0x00000200)
859#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400) 866#define MPI_EVENT_DSCVRY_ERR_DS_TABLE_TO_TABLE (0x00000400)
860#define MPI_EVENT_DSCVRY_ERR_DS_MULTPL_PATHS (0x00000800) 867#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800)
861#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000) 868#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)
869#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000)
862 870
863/* SAS SMP Error Event data */ 871/* SAS SMP Error Event data */
864 872
@@ -990,6 +998,7 @@ typedef struct _MSG_FW_DOWNLOAD
990#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07) 998#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
991#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08) 999#define MPI_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
992#define MPI_FW_DOWNLOAD_ITYPE_MEGARAID (0x09) 1000#define MPI_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
1001#define MPI_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
993 1002
994 1003
995typedef struct _FWDownloadTCSGE 1004typedef struct _FWDownloadTCSGE
@@ -1038,17 +1047,18 @@ typedef struct _MSG_FW_UPLOAD
1038} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD, 1047} MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
1039 FWUpload_t, MPI_POINTER pFWUpload_t; 1048 FWUpload_t, MPI_POINTER pFWUpload_t;
1040 1049
1041#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00) 1050#define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
1042#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01) 1051#define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
1043#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02) 1052#define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
1044#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03) 1053#define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
1045#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04) 1054#define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
1046#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05) 1055#define MPI_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
1047#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06) 1056#define MPI_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
1048#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07) 1057#define MPI_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
1049#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08) 1058#define MPI_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
1050#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09) 1059#define MPI_FW_UPLOAD_ITYPE_MEGARAID (0x09)
1051#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A) 1060#define MPI_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
1061#define MPI_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
1052 1062
1053typedef struct _FWUploadTCSGE 1063typedef struct _FWUploadTCSGE
1054{ 1064{
diff --git a/drivers/message/fusion/lsi/mpi_raid.h b/drivers/message/fusion/lsi/mpi_raid.h
index 802255d2747c..32819b1ec8ec 100644
--- a/drivers/message/fusion/lsi/mpi_raid.h
+++ b/drivers/message/fusion/lsi/mpi_raid.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * Copyright (c) 2001-2005 LSI Logic Corporation. 2 * Copyright (c) 2001-2007 LSI Logic Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_raid.h 5 * Name: mpi_raid.h
6 * Title: MPI RAID message and structures 6 * Title: MPI RAID message and structures
7 * Creation Date: February 27, 2001 7 * Creation Date: February 27, 2001
8 * 8 *
9 * mpi_raid.h Version: 01.05.02 9 * mpi_raid.h Version: 01.05.03
10 * 10 *
11 * Version History 11 * Version History
12 * --------------- 12 * ---------------
@@ -32,6 +32,8 @@
32 * 08-19-04 01.05.01 Original release for MPI v1.5. 32 * 08-19-04 01.05.01 Original release for MPI v1.5.
33 * 01-15-05 01.05.02 Added defines for the two new RAID Actions for 33 * 01-15-05 01.05.02 Added defines for the two new RAID Actions for
34 * _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE. 34 * _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE.
35 * 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and
36 * associated defines.
35 * -------------------------------------------------------------------------- 37 * --------------------------------------------------------------------------
36 */ 38 */
37 39
@@ -90,6 +92,7 @@ typedef struct _MSG_RAID_ACTION
90#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12) 92#define MPI_RAID_ACTION_INACTIVATE_VOLUME (0x12)
91#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13) 93#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)
92#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14) 94#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)
95#define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15)
93 96
94/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ 97/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */
95#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001) 98#define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
@@ -111,6 +114,10 @@ typedef struct _MSG_RAID_ACTION
111/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */ 114/* ActionDataWord defines for use with MPI_RAID_ACTION_SET_DATA_SCRUB_RATE action */
112#define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF) 115#define MPI_RAID_ACTION_ADATA_DATA_SCRUB_RATE_MASK (0x000000FF)
113 116
117/* ActionDataWord defines for use with MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE action */
118#define MPI_RAID_ACTION_ADATA_ENABLE_FW_UPDATE (0x00000001)
119#define MPI_RAID_ACTION_ADATA_MASK_FW_UPDATE_TIMEOUT (0x0000FF00)
120#define MPI_RAID_ACTION_ADATA_SHIFT_FW_UPDATE_TIMEOUT (8)
114 121
115 122
116/* RAID Action reply message */ 123/* RAID Action reply message */
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 5021d1a2a1d4..5a10c87239c2 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -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@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -64,6 +64,7 @@
64#endif 64#endif
65 65
66#include "mptbase.h" 66#include "mptbase.h"
67#include "lsi/mpi_log_fc.h"
67 68
68/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 69/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
69#define my_NAME "Fusion MPT base driver" 70#define my_NAME "Fusion MPT base driver"
@@ -6349,14 +6350,37 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
6349static void 6350static void
6350mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info) 6351mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
6351{ 6352{
6352 static char *subcl_str[8] = { 6353 char *desc = "unknown";
6353 "FCP Initiator", "FCP Target", "LAN", "MPI Message Layer", 6354
6354 "FC Link", "Context Manager", "Invalid Field Offset", "State Change Info" 6355 switch (log_info & 0xFF000000) {
6355 }; 6356 case MPI_IOCLOGINFO_FC_INIT_BASE:
6356 u8 subcl = (log_info >> 24) & 0x7; 6357 desc = "FCP Initiator";
6358 break;
6359 case MPI_IOCLOGINFO_FC_TARGET_BASE:
6360 desc = "FCP Target";
6361 break;
6362 case MPI_IOCLOGINFO_FC_LAN_BASE:
6363 desc = "LAN";
6364 break;
6365 case MPI_IOCLOGINFO_FC_MSG_BASE:
6366 desc = "MPI Message Layer";
6367 break;
6368 case MPI_IOCLOGINFO_FC_LINK_BASE:
6369 desc = "FC Link";
6370 break;
6371 case MPI_IOCLOGINFO_FC_CTX_BASE:
6372 desc = "Context Manager";
6373 break;
6374 case MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET:
6375 desc = "Invalid Field Offset";
6376 break;
6377 case MPI_IOCLOGINFO_FC_STATE_CHANGE:
6378 desc = "State Change Info";
6379 break;
6380 }
6357 6381
6358 printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}\n", 6382 printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubClass={%s}, Value=(0x%06x)\n",
6359 ioc->name, log_info, subcl_str[subcl]); 6383 ioc->name, log_info, desc, (log_info & 0xFFFFFF));
6360} 6384}
6361 6385
6362/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 6386/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 165f81d16d00..05eb6e528753 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@lsi.com) 9 * (mailto:DL-MPTFusionLinux@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.04" 78#define MPT_LINUX_VERSION_COMMON "3.04.05"
79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.04" 79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.05"
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) \
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 9d0f30478e46..58e6c319cc76 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -5,7 +5,7 @@
5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 1999-2007 LSI Logic Corporation 7 * Copyright (c) 1999-2007 LSI Logic Corporation
8 * (mailto:mpt_linux_developer@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptctl.h b/drivers/message/fusion/mptctl.h
index f7e72c5e47de..180b3c156247 100644
--- a/drivers/message/fusion/mptctl.h
+++ b/drivers/message/fusion/mptctl.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@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 0caaf6403993..b766445f19aa 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -4,7 +4,7 @@
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Logic Corporation 6 * Copyright (c) 1999-2007 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -43,7 +43,6 @@
43 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 43 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44*/ 44*/
45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
46#include "linux_compat.h" /* linux-2.6 tweaks */
47#include <linux/module.h> 46#include <linux/module.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
49#include <linux/init.h> 48#include <linux/init.h>
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 7dd34bd28efc..7e8a90cb484e 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -5,7 +5,7 @@
5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 2000-2007 LSI Logic Corporation 7 * Copyright (c) 2000-2007 LSI Logic Corporation
8 * (mailto:mpt_linux_developer@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h
index fe438bf119f6..8d08c2bed24a 100644
--- a/drivers/message/fusion/mptlan.h
+++ b/drivers/message/fusion/mptlan.h
@@ -5,7 +5,7 @@
5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 2000-2007 LSI Logic Corporation 7 * Copyright (c) 2000-2007 LSI Logic Corporation
8 * (mailto:mpt_linux_developer@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 1d2d03f77894..9e5424e1871f 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -4,7 +4,7 @@
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Logic Corporation 6 * Copyright (c) 1999-2007 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * Copyright (c) 2005-2007 Dell 8 * Copyright (c) 2005-2007 Dell
9 */ 9 */
10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 3bd94f11e7d6..d35617376f87 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -4,7 +4,7 @@
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Logic Corporation 6 * Copyright (c) 1999-2007 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -44,7 +44,6 @@
44*/ 44*/
45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
46 46
47#include "linux_compat.h" /* linux-2.6 tweaks */
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
50#include <linux/init.h> 49#include <linux/init.h>
@@ -260,30 +259,13 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
260 /* Map the data portion, if any. 259 /* Map the data portion, if any.
261 * sges_left = 0 if no data transfer. 260 * sges_left = 0 if no data transfer.
262 */ 261 */
263 if ( (sges_left = SCpnt->use_sg) ) { 262 sges_left = scsi_dma_map(SCpnt);
264 sges_left = pci_map_sg(ioc->pcidev, 263 if (sges_left < 0)
265 (struct scatterlist *) SCpnt->request_buffer, 264 return FAILED;
266 SCpnt->use_sg,
267 SCpnt->sc_data_direction);
268 if (sges_left == 0)
269 return FAILED;
270 } else if (SCpnt->request_bufflen) {
271 SCpnt->SCp.dma_handle = pci_map_single(ioc->pcidev,
272 SCpnt->request_buffer,
273 SCpnt->request_bufflen,
274 SCpnt->sc_data_direction);
275 dsgprintk((MYIOC_s_INFO_FMT "SG: non-SG for %p, len=%d\n",
276 ioc->name, SCpnt, SCpnt->request_bufflen));
277 mptscsih_add_sge((char *) &pReq->SGL,
278 0xD1000000|MPT_SGE_FLAGS_ADDRESSING|sgdir|SCpnt->request_bufflen,
279 SCpnt->SCp.dma_handle);
280
281 return SUCCESS;
282 }
283 265
284 /* Handle the SG case. 266 /* Handle the SG case.
285 */ 267 */
286 sg = (struct scatterlist *) SCpnt->request_buffer; 268 sg = scsi_sglist(SCpnt);
287 sg_done = 0; 269 sg_done = 0;
288 sgeOffset = sizeof(SCSIIORequest_t) - sizeof(SGE_IO_UNION); 270 sgeOffset = sizeof(SCSIIORequest_t) - sizeof(SGE_IO_UNION);
289 chainSge = NULL; 271 chainSge = NULL;
@@ -465,7 +447,12 @@ mptscsih_issue_sep_command(MPT_ADAPTER *ioc, VirtTarget *vtarget,
465 MPT_FRAME_HDR *mf; 447 MPT_FRAME_HDR *mf;
466 SEPRequest_t *SEPMsg; 448 SEPRequest_t *SEPMsg;
467 449
468 if (ioc->bus_type == FC) 450 if (ioc->bus_type != SAS)
451 return;
452
453 /* Not supported for hidden raid components
454 */
455 if (vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT)
469 return; 456 return;
470 457
471 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) { 458 if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
@@ -662,7 +649,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
662 scsi_state = pScsiReply->SCSIState; 649 scsi_state = pScsiReply->SCSIState;
663 scsi_status = pScsiReply->SCSIStatus; 650 scsi_status = pScsiReply->SCSIStatus;
664 xfer_cnt = le32_to_cpu(pScsiReply->TransferCount); 651 xfer_cnt = le32_to_cpu(pScsiReply->TransferCount);
665 sc->resid = sc->request_bufflen - xfer_cnt; 652 scsi_set_resid(sc, scsi_bufflen(sc) - xfer_cnt);
666 log_info = le32_to_cpu(pScsiReply->IOCLogInfo); 653 log_info = le32_to_cpu(pScsiReply->IOCLogInfo);
667 654
668 /* 655 /*
@@ -767,7 +754,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
767 break; 754 break;
768 755
769 case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH: /* 0x0049 */ 756 case MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH: /* 0x0049 */
770 sc->resid = sc->request_bufflen - xfer_cnt; 757 scsi_set_resid(sc, scsi_bufflen(sc) - xfer_cnt);
771 if((xfer_cnt==0)||(sc->underflow > xfer_cnt)) 758 if((xfer_cnt==0)||(sc->underflow > xfer_cnt))
772 sc->result=DID_SOFT_ERROR << 16; 759 sc->result=DID_SOFT_ERROR << 16;
773 else /* Sufficient data transfer occurred */ 760 else /* Sufficient data transfer occurred */
@@ -816,7 +803,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
816 break; 803 break;
817 804
818 case MPI_IOCSTATUS_SCSI_DATA_OVERRUN: /* 0x0044 */ 805 case MPI_IOCSTATUS_SCSI_DATA_OVERRUN: /* 0x0044 */
819 sc->resid=0; 806 scsi_set_resid(sc, 0);
820 case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ 807 case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */
821 case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ 808 case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */
822 sc->result = (DID_OK << 16) | scsi_status; 809 sc->result = (DID_OK << 16) | scsi_status;
@@ -899,23 +886,18 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
899 scsi_state, scsi_status, log_info)); 886 scsi_state, scsi_status, log_info));
900 887
901 dreplyprintk(("%s: [%d:%d:%d:%d] resid=%d " 888 dreplyprintk(("%s: [%d:%d:%d:%d] resid=%d "
902 "bufflen=%d xfer_cnt=%d\n", __FUNCTION__, 889 "bufflen=%d xfer_cnt=%d\n", __FUNCTION__,
903 sc->device->host->host_no, sc->device->channel, sc->device->id, 890 sc->device->host->host_no,
904 sc->device->lun, sc->resid, sc->request_bufflen, 891 sc->device->channel, sc->device->id,
905 xfer_cnt)); 892 sc->device->lun, scsi_get_resid(sc),
893 scsi_bufflen(sc), xfer_cnt));
906 } 894 }
907#endif 895#endif
908 896
909 } /* end of address reply case */ 897 } /* end of address reply case */
910 898
911 /* Unmap the DMA buffers, if any. */ 899 /* Unmap the DMA buffers, if any. */
912 if (sc->use_sg) { 900 scsi_dma_unmap(sc);
913 pci_unmap_sg(ioc->pcidev, (struct scatterlist *) sc->request_buffer,
914 sc->use_sg, sc->sc_data_direction);
915 } else if (sc->request_bufflen) {
916 pci_unmap_single(ioc->pcidev, sc->SCp.dma_handle,
917 sc->request_bufflen, sc->sc_data_direction);
918 }
919 901
920 sc->scsi_done(sc); /* Issue the command callback */ 902 sc->scsi_done(sc); /* Issue the command callback */
921 903
@@ -970,17 +952,8 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
970 /* Set status, free OS resources (SG DMA buffers) 952 /* Set status, free OS resources (SG DMA buffers)
971 * Do OS callback 953 * Do OS callback
972 */ 954 */
973 if (SCpnt->use_sg) { 955 scsi_dma_unmap(SCpnt);
974 pci_unmap_sg(ioc->pcidev, 956
975 (struct scatterlist *) SCpnt->request_buffer,
976 SCpnt->use_sg,
977 SCpnt->sc_data_direction);
978 } else if (SCpnt->request_bufflen) {
979 pci_unmap_single(ioc->pcidev,
980 SCpnt->SCp.dma_handle,
981 SCpnt->request_bufflen,
982 SCpnt->sc_data_direction);
983 }
984 SCpnt->result = DID_RESET << 16; 957 SCpnt->result = DID_RESET << 16;
985 SCpnt->host_scribble = NULL; 958 SCpnt->host_scribble = NULL;
986 959
@@ -1023,14 +996,19 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
1023 mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii); 996 mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii);
1024 if (mf == NULL) 997 if (mf == NULL)
1025 continue; 998 continue;
999 /* If the device is a hidden raid component, then its
1000 * expected that the mf->function will be RAID_SCSI_IO
1001 */
1002 if (vdevice->vtarget->tflags &
1003 MPT_TARGET_FLAGS_RAID_COMPONENT && mf->Function !=
1004 MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)
1005 continue;
1006
1026 int_to_scsilun(vdevice->lun, &lun); 1007 int_to_scsilun(vdevice->lun, &lun);
1027 if ((mf->Bus != vdevice->vtarget->channel) || 1008 if ((mf->Bus != vdevice->vtarget->channel) ||
1028 (mf->TargetID != vdevice->vtarget->id) || 1009 (mf->TargetID != vdevice->vtarget->id) ||
1029 memcmp(lun.scsi_lun, mf->LUN, 8)) 1010 memcmp(lun.scsi_lun, mf->LUN, 8))
1030 continue; 1011 continue;
1031 dsprintk(( "search_running: found (sc=%p, mf = %p) "
1032 "channel %d id %d, lun %d \n", hd->ScsiLookup[ii],
1033 mf, mf->Bus, mf->TargetID, vdevice->lun));
1034 1012
1035 /* Cleanup 1013 /* Cleanup
1036 */ 1014 */
@@ -1039,19 +1017,12 @@ mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
1039 mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf); 1017 mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf);
1040 if ((unsigned char *)mf != sc->host_scribble) 1018 if ((unsigned char *)mf != sc->host_scribble)
1041 continue; 1019 continue;
1042 if (sc->use_sg) { 1020 scsi_dma_unmap(sc);
1043 pci_unmap_sg(hd->ioc->pcidev,
1044 (struct scatterlist *) sc->request_buffer,
1045 sc->use_sg,
1046 sc->sc_data_direction);
1047 } else if (sc->request_bufflen) {
1048 pci_unmap_single(hd->ioc->pcidev,
1049 sc->SCp.dma_handle,
1050 sc->request_bufflen,
1051 sc->sc_data_direction);
1052 }
1053 sc->host_scribble = NULL; 1021 sc->host_scribble = NULL;
1054 sc->result = DID_NO_CONNECT << 16; 1022 sc->result = DID_NO_CONNECT << 16;
1023 dsprintk(( "search_running: found (sc=%p, mf = %p) "
1024 "channel %d id %d, lun %d \n", sc, mf,
1025 vdevice->vtarget->channel, vdevice->vtarget->id, vdevice->lun));
1055 sc->scsi_done(sc); 1026 sc->scsi_done(sc);
1056 } 1027 }
1057 } 1028 }
@@ -1380,10 +1351,10 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
1380 * will be no data transfer! GRRRRR... 1351 * will be no data transfer! GRRRRR...
1381 */ 1352 */
1382 if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) { 1353 if (SCpnt->sc_data_direction == DMA_FROM_DEVICE) {
1383 datalen = SCpnt->request_bufflen; 1354 datalen = scsi_bufflen(SCpnt);
1384 scsidir = MPI_SCSIIO_CONTROL_READ; /* DATA IN (host<--ioc<--dev) */ 1355 scsidir = MPI_SCSIIO_CONTROL_READ; /* DATA IN (host<--ioc<--dev) */
1385 } else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) { 1356 } else if (SCpnt->sc_data_direction == DMA_TO_DEVICE) {
1386 datalen = SCpnt->request_bufflen; 1357 datalen = scsi_bufflen(SCpnt);
1387 scsidir = MPI_SCSIIO_CONTROL_WRITE; /* DATA OUT (host-->ioc-->dev) */ 1358 scsidir = MPI_SCSIIO_CONTROL_WRITE; /* DATA OUT (host-->ioc-->dev) */
1388 } else { 1359 } else {
1389 datalen = 0; 1360 datalen = 0;
@@ -1768,20 +1739,45 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1768 u32 ctx2abort; 1739 u32 ctx2abort;
1769 int scpnt_idx; 1740 int scpnt_idx;
1770 int retval; 1741 int retval;
1771 VirtDevice *vdev; 1742 VirtDevice *vdevice;
1772 ulong sn = SCpnt->serial_number; 1743 ulong sn = SCpnt->serial_number;
1744 MPT_ADAPTER *ioc;
1773 1745
1774 /* If we can't locate our host adapter structure, return FAILED status. 1746 /* If we can't locate our host adapter structure, return FAILED status.
1775 */ 1747 */
1776 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) { 1748 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) {
1777 SCpnt->result = DID_RESET << 16; 1749 SCpnt->result = DID_RESET << 16;
1778 SCpnt->scsi_done(SCpnt); 1750 SCpnt->scsi_done(SCpnt);
1779 dfailprintk((KERN_INFO MYNAM ": mptscsih_abort: " 1751 dfailprintk((KERN_INFO MYNAM ": mptscsih_abort: Can't locate "
1780 "Can't locate host! (sc=%p)\n", 1752 "host! (sc=%p)\n", SCpnt));
1781 SCpnt));
1782 return FAILED; 1753 return FAILED;
1783 } 1754 }
1784 1755
1756 ioc = hd->ioc;
1757 printk(MYIOC_s_INFO_FMT "attempting task abort! (sc=%p)\n",
1758 ioc->name, SCpnt);
1759 scsi_print_command(SCpnt);
1760
1761 vdevice = SCpnt->device->hostdata;
1762 if (!vdevice || !vdevice->vtarget) {
1763 dtmprintk((MYIOC_s_DEBUG_FMT "task abort: device has been "
1764 "deleted (sc=%p)\n", ioc->name, SCpnt));
1765 SCpnt->result = DID_NO_CONNECT << 16;
1766 SCpnt->scsi_done(SCpnt);
1767 retval = 0;
1768 goto out;
1769 }
1770
1771 /* Task aborts are not supported for hidden raid components.
1772 */
1773 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
1774 dtmprintk((MYIOC_s_DEBUG_FMT "task abort: hidden raid "
1775 "component (sc=%p)\n", ioc->name, SCpnt));
1776 SCpnt->result = DID_RESET << 16;
1777 retval = FAILED;
1778 goto out;
1779 }
1780
1785 /* Find this command 1781 /* Find this command
1786 */ 1782 */
1787 if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(SCpnt)) < 0) { 1783 if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(SCpnt)) < 0) {
@@ -1790,21 +1786,20 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1790 */ 1786 */
1791 SCpnt->result = DID_RESET << 16; 1787 SCpnt->result = DID_RESET << 16;
1792 dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: " 1788 dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: "
1793 "Command not in the active list! (sc=%p)\n", 1789 "Command not in the active list! (sc=%p)\n", ioc->name,
1794 hd->ioc->name, SCpnt)); 1790 SCpnt));
1795 return SUCCESS; 1791 retval = 0;
1792 goto out;
1796 } 1793 }
1797 1794
1798 if (hd->resetPending) 1795 if (hd->resetPending) {
1799 return FAILED; 1796 retval = FAILED;
1797 goto out;
1798 }
1800 1799
1801 if (hd->timeouts < -1) 1800 if (hd->timeouts < -1)
1802 hd->timeouts++; 1801 hd->timeouts++;
1803 1802
1804 printk(KERN_WARNING MYNAM ": %s: attempting task abort! (sc=%p)\n",
1805 hd->ioc->name, SCpnt);
1806 scsi_print_command(SCpnt);
1807
1808 /* Most important! Set TaskMsgContext to SCpnt's MsgContext! 1803 /* Most important! Set TaskMsgContext to SCpnt's MsgContext!
1809 * (the IO to be ABORT'd) 1804 * (the IO to be ABORT'd)
1810 * 1805 *
@@ -1817,18 +1812,17 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1817 1812
1818 hd->abortSCpnt = SCpnt; 1813 hd->abortSCpnt = SCpnt;
1819 1814
1820 vdev = SCpnt->device->hostdata;
1821 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK, 1815 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
1822 vdev->vtarget->channel, vdev->vtarget->id, vdev->lun, 1816 vdevice->vtarget->channel, vdevice->vtarget->id, vdevice->lun,
1823 ctx2abort, mptscsih_get_tm_timeout(hd->ioc)); 1817 ctx2abort, mptscsih_get_tm_timeout(ioc));
1824 1818
1825 if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx && 1819 if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx &&
1826 SCpnt->serial_number == sn) 1820 SCpnt->serial_number == sn)
1827 retval = FAILED; 1821 retval = FAILED;
1828 1822
1829 printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n", 1823 out:
1830 hd->ioc->name, 1824 printk(MYIOC_s_INFO_FMT "task abort: %s (sc=%p)\n",
1831 ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); 1825 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
1832 1826
1833 if (retval == 0) 1827 if (retval == 0)
1834 return SUCCESS; 1828 return SUCCESS;
@@ -1850,32 +1844,47 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
1850{ 1844{
1851 MPT_SCSI_HOST *hd; 1845 MPT_SCSI_HOST *hd;
1852 int retval; 1846 int retval;
1853 VirtDevice *vdev; 1847 VirtDevice *vdevice;
1848 MPT_ADAPTER *ioc;
1854 1849
1855 /* If we can't locate our host adapter structure, return FAILED status. 1850 /* If we can't locate our host adapter structure, return FAILED status.
1856 */ 1851 */
1857 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 1852 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
1858 dtmprintk((KERN_INFO MYNAM ": mptscsih_dev_reset: " 1853 dtmprintk((KERN_INFO MYNAM ": mptscsih_dev_reset: Can't "
1859 "Can't locate host! (sc=%p)\n", 1854 "locate host! (sc=%p)\n", SCpnt));
1860 SCpnt));
1861 return FAILED; 1855 return FAILED;
1862 } 1856 }
1863 1857
1864 if (hd->resetPending) 1858 ioc = hd->ioc;
1865 return FAILED; 1859 printk(MYIOC_s_INFO_FMT "attempting target reset! (sc=%p)\n",
1866 1860 ioc->name, SCpnt);
1867 printk(KERN_WARNING MYNAM ": %s: attempting target reset! (sc=%p)\n",
1868 hd->ioc->name, SCpnt);
1869 scsi_print_command(SCpnt); 1861 scsi_print_command(SCpnt);
1870 1862
1871 vdev = SCpnt->device->hostdata; 1863 if (hd->resetPending) {
1864 retval = FAILED;
1865 goto out;
1866 }
1867
1868 vdevice = SCpnt->device->hostdata;
1869 if (!vdevice || !vdevice->vtarget) {
1870 retval = 0;
1871 goto out;
1872 }
1873
1874 /* Target reset to hidden raid component is not supported
1875 */
1876 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT) {
1877 retval = FAILED;
1878 goto out;
1879 }
1880
1872 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 1881 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
1873 vdev->vtarget->channel, vdev->vtarget->id, 1882 vdevice->vtarget->channel, vdevice->vtarget->id, 0, 0,
1874 0, 0, mptscsih_get_tm_timeout(hd->ioc)); 1883 mptscsih_get_tm_timeout(ioc));
1875 1884
1876 printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n", 1885 out:
1877 hd->ioc->name, 1886 printk (MYIOC_s_INFO_FMT "target reset: %s (sc=%p)\n",
1878 ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt); 1887 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
1879 1888
1880 if (retval == 0) 1889 if (retval == 0)
1881 return SUCCESS; 1890 return SUCCESS;
@@ -1899,18 +1908,19 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1899 MPT_SCSI_HOST *hd; 1908 MPT_SCSI_HOST *hd;
1900 int retval; 1909 int retval;
1901 VirtDevice *vdev; 1910 VirtDevice *vdev;
1911 MPT_ADAPTER *ioc;
1902 1912
1903 /* If we can't locate our host adapter structure, return FAILED status. 1913 /* If we can't locate our host adapter structure, return FAILED status.
1904 */ 1914 */
1905 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 1915 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
1906 dtmprintk((KERN_INFO MYNAM ": mptscsih_bus_reset: " 1916 dtmprintk((KERN_INFO MYNAM ": mptscsih_bus_reset: Can't "
1907 "Can't locate host! (sc=%p)\n", 1917 "locate host! (sc=%p)\n", SCpnt ));
1908 SCpnt ) );
1909 return FAILED; 1918 return FAILED;
1910 } 1919 }
1911 1920
1912 printk(KERN_WARNING MYNAM ": %s: attempting bus reset! (sc=%p)\n", 1921 ioc = hd->ioc;
1913 hd->ioc->name, SCpnt); 1922 printk(MYIOC_s_INFO_FMT "attempting bus reset! (sc=%p)\n",
1923 ioc->name, SCpnt);
1914 scsi_print_command(SCpnt); 1924 scsi_print_command(SCpnt);
1915 1925
1916 if (hd->timeouts < -1) 1926 if (hd->timeouts < -1)
@@ -1918,11 +1928,10 @@ mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
1918 1928
1919 vdev = SCpnt->device->hostdata; 1929 vdev = SCpnt->device->hostdata;
1920 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS, 1930 retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
1921 vdev->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(hd->ioc)); 1931 vdev->vtarget->channel, 0, 0, 0, mptscsih_get_tm_timeout(ioc));
1922 1932
1923 printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n", 1933 printk(MYIOC_s_INFO_FMT "bus reset: %s (sc=%p)\n",
1924 hd->ioc->name, 1934 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
1925 ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
1926 1935
1927 if (retval == 0) 1936 if (retval == 0)
1928 return SUCCESS; 1937 return SUCCESS;
@@ -1943,37 +1952,38 @@ int
1943mptscsih_host_reset(struct scsi_cmnd *SCpnt) 1952mptscsih_host_reset(struct scsi_cmnd *SCpnt)
1944{ 1953{
1945 MPT_SCSI_HOST * hd; 1954 MPT_SCSI_HOST * hd;
1946 int status = SUCCESS; 1955 int retval;
1956 MPT_ADAPTER *ioc;
1947 1957
1948 /* If we can't locate the host to reset, then we failed. */ 1958 /* If we can't locate the host to reset, then we failed. */
1949 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ 1959 if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
1950 dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: " 1960 dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: Can't "
1951 "Can't locate host! (sc=%p)\n", 1961 "locate host! (sc=%p)\n", SCpnt));
1952 SCpnt ) );
1953 return FAILED; 1962 return FAILED;
1954 } 1963 }
1955 1964
1956 printk(KERN_WARNING MYNAM ": %s: Attempting host reset! (sc=%p)\n", 1965 ioc = hd->ioc;
1957 hd->ioc->name, SCpnt); 1966 printk(MYIOC_s_INFO_FMT "attempting host reset! (sc=%p)\n",
1967 ioc->name, SCpnt);
1958 1968
1959 /* If our attempts to reset the host failed, then return a failed 1969 /* If our attempts to reset the host failed, then return a failed
1960 * status. The host will be taken off line by the SCSI mid-layer. 1970 * status. The host will be taken off line by the SCSI mid-layer.
1961 */ 1971 */
1962 if (mpt_HardResetHandler(hd->ioc, CAN_SLEEP) < 0){ 1972 if (mpt_HardResetHandler(hd->ioc, CAN_SLEEP) < 0) {
1963 status = FAILED; 1973 retval = FAILED;
1964 } else { 1974 } else {
1965 /* Make sure TM pending is cleared and TM state is set to 1975 /* Make sure TM pending is cleared and TM state is set to
1966 * NONE. 1976 * NONE.
1967 */ 1977 */
1978 retval = 0;
1968 hd->tmPending = 0; 1979 hd->tmPending = 0;
1969 hd->tmState = TM_STATE_NONE; 1980 hd->tmState = TM_STATE_NONE;
1970 } 1981 }
1971 1982
1972 dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: " 1983 printk(MYIOC_s_INFO_FMT "host reset: %s (sc=%p)\n",
1973 "Status = %s\n", 1984 ioc->name, ((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
1974 (status == SUCCESS) ? "SUCCESS" : "FAILED" ) );
1975 1985
1976 return status; 1986 return retval;
1977} 1987}
1978 1988
1979/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 1989/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -3150,6 +3160,16 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
3150{ 3160{
3151 INTERNAL_CMD iocmd; 3161 INTERNAL_CMD iocmd;
3152 3162
3163 /* Ignore hidden raid components, this is handled when the command
3164 * is sent to the volume
3165 */
3166 if (vdevice->vtarget->tflags & MPT_TARGET_FLAGS_RAID_COMPONENT)
3167 return;
3168
3169 if (vdevice->vtarget->type != TYPE_DISK || vdevice->vtarget->deleted ||
3170 !vdevice->configured_lun)
3171 return;
3172
3153 /* Following parameters will not change 3173 /* Following parameters will not change
3154 * in this routine. 3174 * in this routine.
3155 */ 3175 */
@@ -3164,9 +3184,7 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
3164 iocmd.id = vdevice->vtarget->id; 3184 iocmd.id = vdevice->vtarget->id;
3165 iocmd.lun = vdevice->lun; 3185 iocmd.lun = vdevice->lun;
3166 3186
3167 if ((vdevice->vtarget->type == TYPE_DISK) && 3187 mptscsih_do_cmd(hd, &iocmd);
3168 (vdevice->configured_lun))
3169 mptscsih_do_cmd(hd, &iocmd);
3170} 3188}
3171 3189
3172EXPORT_SYMBOL(mptscsih_remove); 3190EXPORT_SYMBOL(mptscsih_remove);
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
index 843c01a6aa0e..8eccdfe5701a 100644
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.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@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 37bf65348372..6b3e0c00952b 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -4,7 +4,7 @@
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Logic Corporation 6 * Copyright (c) 1999-2007 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 10/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -44,7 +44,6 @@
44*/ 44*/
45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 45/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
46 46
47#include "linux_compat.h" /* linux-2.6 tweaks */
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
50#include <linux/init.h> 49#include <linux/init.h>