aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.h
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-08-20 03:53:49 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 10:36:13 -0400
commited79f1280d1bc54f168abcffc8c3e0bf8ffb1873 (patch)
tree61974bec8071cd483cd562bd465ed8a2adb09896 /drivers/scsi/mpt2sas/mpt2sas_base.h
parent34a03bef2202d0c9983a8da0a8abaee37d285847 (diff)
[SCSI] mpt2sas: Raid 10 Volume is showing as Raid 1E in dmesg
This patch modifies the slave_configure callback so the messages that get sent to system log for RAID1E volumes contain the string "RAID10" instead of "RAID1E". These messages contain information regarding what kind of scsi device is being added. Certain OEMS can enable displaying the RAID10 string instead of RAID1E via manufacturing page 10. The driver will read this config page at driver load time, then determine from the GenericFlags0 bits whether display the RAID10 or RAID1E string, also even drive count is taken into consideration. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Reviewed-by: Eric Moore <Eric.moore@lsi.com> Cc: Stable Tree <stable@kernel.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 1f3efd6569d3..ff05ae1e43ba 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -197,6 +197,38 @@ struct MPT2SAS_TARGET {
197 * @block: device is in SDEV_BLOCK state 197 * @block: device is in SDEV_BLOCK state
198 * @tlr_snoop_check: flag used in determining whether to disable TLR 198 * @tlr_snoop_check: flag used in determining whether to disable TLR
199 */ 199 */
200
201/* OEM Identifiers */
202#define MFG10_OEM_ID_INVALID (0x00000000)
203#define MFG10_OEM_ID_DELL (0x00000001)
204#define MFG10_OEM_ID_FSC (0x00000002)
205#define MFG10_OEM_ID_SUN (0x00000003)
206#define MFG10_OEM_ID_IBM (0x00000004)
207
208/* GENERIC Flags 0*/
209#define MFG10_GF0_OCE_DISABLED (0x00000001)
210#define MFG10_GF0_R1E_DRIVE_COUNT (0x00000002)
211#define MFG10_GF0_R10_DISPLAY (0x00000004)
212#define MFG10_GF0_SSD_DATA_SCRUB_DISABLE (0x00000008)
213#define MFG10_GF0_SINGLE_DRIVE_R0 (0x00000010)
214
215/* OEM Specific Flags will come from OEM specific header files */
216typedef struct _MPI2_CONFIG_PAGE_MAN_10 {
217 MPI2_CONFIG_PAGE_HEADER Header; /* 00h */
218 U8 OEMIdentifier; /* 04h */
219 U8 Reserved1; /* 05h */
220 U16 Reserved2; /* 08h */
221 U32 Reserved3; /* 0Ch */
222 U32 GenericFlags0; /* 10h */
223 U32 GenericFlags1; /* 14h */
224 U32 Reserved4; /* 18h */
225 U32 OEMSpecificFlags0; /* 1Ch */
226 U32 OEMSpecificFlags1; /* 20h */
227 U32 Reserved5[18]; /* 24h-60h*/
228} MPI2_CONFIG_PAGE_MAN_10,
229 MPI2_POINTER PTR_MPI2_CONFIG_PAGE_MAN_10,
230 Mpi2ManufacturingPage10_t, MPI2_POINTER pMpi2ManufacturingPage10_t;
231
200struct MPT2SAS_DEVICE { 232struct MPT2SAS_DEVICE {
201 struct MPT2SAS_TARGET *sas_target; 233 struct MPT2SAS_TARGET *sas_target;
202 unsigned int lun; 234 unsigned int lun;
@@ -461,6 +493,7 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
461 * @facts: static facts data 493 * @facts: static facts data
462 * @pfacts: static port facts data 494 * @pfacts: static port facts data
463 * @manu_pg0: static manufacturing page 0 495 * @manu_pg0: static manufacturing page 0
496 * @manu_pg10: static manufacturing page 10
464 * @bios_pg2: static bios page 2 497 * @bios_pg2: static bios page 2
465 * @bios_pg3: static bios page 3 498 * @bios_pg3: static bios page 3
466 * @ioc_pg8: static ioc page 8 499 * @ioc_pg8: static ioc page 8
@@ -663,6 +696,7 @@ struct MPT2SAS_ADAPTER {
663 dma_addr_t diag_buffer_dma[MPI2_DIAG_BUF_TYPE_COUNT]; 696 dma_addr_t diag_buffer_dma[MPI2_DIAG_BUF_TYPE_COUNT];
664 u8 diag_buffer_status[MPI2_DIAG_BUF_TYPE_COUNT]; 697 u8 diag_buffer_status[MPI2_DIAG_BUF_TYPE_COUNT];
665 u32 unique_id[MPI2_DIAG_BUF_TYPE_COUNT]; 698 u32 unique_id[MPI2_DIAG_BUF_TYPE_COUNT];
699 Mpi2ManufacturingPage10_t manu_pg10;
666 u32 product_specific[MPI2_DIAG_BUF_TYPE_COUNT][23]; 700 u32 product_specific[MPI2_DIAG_BUF_TYPE_COUNT][23];
667 u32 diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT]; 701 u32 diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT];
668}; 702};
@@ -734,6 +768,8 @@ void mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 re
734int mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys); 768int mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys);
735int mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc, 769int mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc,
736 Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage0_t *config_page); 770 Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage0_t *config_page);
771int mpt2sas_config_get_manufacturing_pg10(struct MPT2SAS_ADAPTER *ioc,
772 Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage10_t *config_page);
737int mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t 773int mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
738 *mpi_reply, Mpi2BiosPage2_t *config_page); 774 *mpi_reply, Mpi2BiosPage2_t *config_page);
739int mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t 775int mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
@@ -776,7 +812,6 @@ int mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle,
776 u16 *volume_handle); 812 u16 *volume_handle);
777int mpt2sas_config_get_volume_wwid(struct MPT2SAS_ADAPTER *ioc, u16 volume_handle, 813int mpt2sas_config_get_volume_wwid(struct MPT2SAS_ADAPTER *ioc, u16 volume_handle,
778 u64 *wwid); 814 u64 *wwid);
779
780/* ctl shared API */ 815/* ctl shared API */
781extern struct device_attribute *mpt2sas_host_attrs[]; 816extern struct device_attribute *mpt2sas_host_attrs[];
782extern struct device_attribute *mpt2sas_dev_attrs[]; 817extern struct device_attribute *mpt2sas_dev_attrs[];