diff options
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.h | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h index acdcff150a35..2faab1e690e9 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.h +++ b/drivers/scsi/mpt2sas/mpt2sas_base.h | |||
@@ -69,10 +69,10 @@ | |||
69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" | 69 | #define MPT2SAS_DRIVER_NAME "mpt2sas" |
70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" | 70 | #define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>" |
71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" | 71 | #define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver" |
72 | #define MPT2SAS_DRIVER_VERSION "01.100.04.00" | 72 | #define MPT2SAS_DRIVER_VERSION "01.100.06.00" |
73 | #define MPT2SAS_MAJOR_VERSION 01 | 73 | #define MPT2SAS_MAJOR_VERSION 01 |
74 | #define MPT2SAS_MINOR_VERSION 100 | 74 | #define MPT2SAS_MINOR_VERSION 100 |
75 | #define MPT2SAS_BUILD_VERSION 04 | 75 | #define MPT2SAS_BUILD_VERSION 06 |
76 | #define MPT2SAS_RELEASE_VERSION 00 | 76 | #define MPT2SAS_RELEASE_VERSION 00 |
77 | 77 | ||
78 | /* | 78 | /* |
@@ -119,6 +119,7 @@ | |||
119 | #define MPT2_IOC_PRE_RESET 1 /* prior to host reset */ | 119 | #define MPT2_IOC_PRE_RESET 1 /* prior to host reset */ |
120 | #define MPT2_IOC_AFTER_RESET 2 /* just after host reset */ | 120 | #define MPT2_IOC_AFTER_RESET 2 /* just after host reset */ |
121 | #define MPT2_IOC_DONE_RESET 3 /* links re-initialized */ | 121 | #define MPT2_IOC_DONE_RESET 3 /* links re-initialized */ |
122 | #define MPT2_IOC_RUNNING 4 /* shost running */ | ||
122 | 123 | ||
123 | /* | 124 | /* |
124 | * logging format | 125 | * logging format |
@@ -196,6 +197,38 @@ struct MPT2SAS_TARGET { | |||
196 | * @block: device is in SDEV_BLOCK state | 197 | * @block: device is in SDEV_BLOCK state |
197 | * @tlr_snoop_check: flag used in determining whether to disable TLR | 198 | * @tlr_snoop_check: flag used in determining whether to disable TLR |
198 | */ | 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 */ | ||
216 | typedef 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 | |||
199 | struct MPT2SAS_DEVICE { | 232 | struct MPT2SAS_DEVICE { |
200 | struct MPT2SAS_TARGET *sas_target; | 233 | struct MPT2SAS_TARGET *sas_target; |
201 | unsigned int lun; | 234 | unsigned int lun; |
@@ -431,7 +464,7 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr); | |||
431 | * @fw_event_list: list of fw events | 464 | * @fw_event_list: list of fw events |
432 | * @aen_event_read_flag: event log was read | 465 | * @aen_event_read_flag: event log was read |
433 | * @broadcast_aen_busy: broadcast aen waiting to be serviced | 466 | * @broadcast_aen_busy: broadcast aen waiting to be serviced |
434 | * @ioc_reset_in_progress: host reset in progress | 467 | * @shost_recovery: host reset in progress |
435 | * @ioc_reset_in_progress_lock: | 468 | * @ioc_reset_in_progress_lock: |
436 | * @ioc_link_reset_in_progress: phy/hard reset in progress | 469 | * @ioc_link_reset_in_progress: phy/hard reset in progress |
437 | * @ignore_loginfos: ignore loginfos during task managment | 470 | * @ignore_loginfos: ignore loginfos during task managment |
@@ -460,6 +493,7 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr); | |||
460 | * @facts: static facts data | 493 | * @facts: static facts data |
461 | * @pfacts: static port facts data | 494 | * @pfacts: static port facts data |
462 | * @manu_pg0: static manufacturing page 0 | 495 | * @manu_pg0: static manufacturing page 0 |
496 | * @manu_pg10: static manufacturing page 10 | ||
463 | * @bios_pg2: static bios page 2 | 497 | * @bios_pg2: static bios page 2 |
464 | * @bios_pg3: static bios page 3 | 498 | * @bios_pg3: static bios page 3 |
465 | * @ioc_pg8: static ioc page 8 | 499 | * @ioc_pg8: static ioc page 8 |
@@ -544,7 +578,6 @@ struct MPT2SAS_ADAPTER { | |||
544 | /* misc flags */ | 578 | /* misc flags */ |
545 | int aen_event_read_flag; | 579 | int aen_event_read_flag; |
546 | u8 broadcast_aen_busy; | 580 | u8 broadcast_aen_busy; |
547 | u8 ioc_reset_in_progress; | ||
548 | u8 shost_recovery; | 581 | u8 shost_recovery; |
549 | spinlock_t ioc_reset_in_progress_lock; | 582 | spinlock_t ioc_reset_in_progress_lock; |
550 | u8 ioc_link_reset_in_progress; | 583 | u8 ioc_link_reset_in_progress; |
@@ -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 | |||
734 | int mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys); | 768 | int mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys); |
735 | int mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc, | 769 | int 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); |
771 | int mpt2sas_config_get_manufacturing_pg10(struct MPT2SAS_ADAPTER *ioc, | ||
772 | Mpi2ConfigReply_t *mpi_reply, Mpi2ManufacturingPage10_t *config_page); | ||
737 | int mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 773 | int 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); |
739 | int mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 775 | int mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t |
@@ -749,7 +785,7 @@ int mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRep | |||
749 | int mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 785 | int mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t |
750 | *mpi_reply, Mpi2IOUnitPage1_t *config_page); | 786 | *mpi_reply, Mpi2IOUnitPage1_t *config_page); |
751 | int mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 787 | int mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t |
752 | *mpi_reply, Mpi2IOUnitPage1_t config_page); | 788 | *mpi_reply, Mpi2IOUnitPage1_t *config_page); |
753 | int mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 789 | int mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t |
754 | *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz); | 790 | *mpi_reply, Mpi2SasIOUnitPage1_t *config_page, u16 sz); |
755 | int mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t | 791 | int mpt2sas_config_get_ioc_pg8(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); |
777 | int mpt2sas_config_get_volume_wwid(struct MPT2SAS_ADAPTER *ioc, u16 volume_handle, | 813 | int 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 */ |
781 | extern struct device_attribute *mpt2sas_host_attrs[]; | 816 | extern struct device_attribute *mpt2sas_host_attrs[]; |
782 | extern struct device_attribute *mpt2sas_dev_attrs[]; | 817 | extern struct device_attribute *mpt2sas_dev_attrs[]; |
@@ -798,9 +833,11 @@ int mpt2sas_transport_add_host_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy | |||
798 | *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev); | 833 | *mpt2sas_phy, Mpi2SasPhyPage0_t phy_pg0, struct device *parent_dev); |
799 | int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy | 834 | int mpt2sas_transport_add_expander_phy(struct MPT2SAS_ADAPTER *ioc, struct _sas_phy |
800 | *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev); | 835 | *mpt2sas_phy, Mpi2ExpanderPage1_t expander_pg1, struct device *parent_dev); |
801 | void mpt2sas_transport_update_phy_link_change(struct MPT2SAS_ADAPTER *ioc, u16 handle, | 836 | void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, u16 handle, |
802 | u16 attached_handle, u8 phy_number, u8 link_rate); | 837 | u16 attached_handle, u8 phy_number, u8 link_rate); |
803 | extern struct sas_function_template mpt2sas_transport_functions; | 838 | extern struct sas_function_template mpt2sas_transport_functions; |
804 | extern struct scsi_transport_template *mpt2sas_transport_template; | 839 | extern struct scsi_transport_template *mpt2sas_transport_template; |
840 | extern int scsi_internal_device_block(struct scsi_device *sdev); | ||
841 | extern int scsi_internal_device_unblock(struct scsi_device *sdev); | ||
805 | 842 | ||
806 | #endif /* MPT2SAS_BASE_H_INCLUDED */ | 843 | #endif /* MPT2SAS_BASE_H_INCLUDED */ |