aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.h
diff options
context:
space:
mode:
authornagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>2011-10-19 06:06:26 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-30 04:35:57 -0400
commit921cd8024b908f8f49f772c8d3a02381b4db2ed2 (patch)
treea26f56a4a359cfe11551549f591469f5578abe6a /drivers/scsi/mpt2sas/mpt2sas_base.h
parentf9d979ce10c98dfd6d8d2a26217c3c4885ef97f6 (diff)
[SCSI] mpt2sas: New feature - Fast Load Support
New feature Fast Load Support. (1)Asynchronous SCSI scanning: This will allow the drivers to scan for devices in parallel while other device drivers are loading at the same time. This will improve the amount of time it takes for the OS to load. (2) Reporting Devices while port enable is active: This feature will allow devices to be reported to OS immediately while port enable is active. The previous implementation waits for port enable to complete, and then report devices. This feature is only enabled on IT firmware configurations when there are no boot device configured in BIOS Configuration Utility, else the driver will wait till port enable completes reporting devices. For IR firmware, this feature is turned off. This feature is to address large SAS topologies (>100 drives) when the boot OS is using onboard SATA device, in other words, the boot devices is not connected to our controller. (3) Scanning for devices after diagnostic reset completes: A new routine _scsih_scan_start is added. This will scan the expander pages, IR pages, and sas device pages, then reporting new devices to SCSI Mid layer. It seems the driver is not supporting adding devices while diagnostic reset is active. Apparently this is due to the sanity checks on ioc->shost_recovery flag throughout the context of kernel work thread FIFO, and the mpt2sas_fw_work. Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.h')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 59354dba68c0..ce2bd9bf40f7 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -655,7 +655,12 @@ enum mutex_type {
655 * @ignore_loginfos: ignore loginfos during task management 655 * @ignore_loginfos: ignore loginfos during task management
656 * @remove_host: flag for when driver unloads, to avoid sending dev resets 656 * @remove_host: flag for when driver unloads, to avoid sending dev resets
657 * @pci_error_recovery: flag to prevent ioc access until slot reset completes 657 * @pci_error_recovery: flag to prevent ioc access until slot reset completes
658 * @wait_for_port_enable_to_complete: 658 * @wait_for_discovery_to_complete: flag set at driver load time when
659 * waiting on reporting devices
660 * @is_driver_loading: flag set at driver load time
661 * @port_enable_failed: flag set when port enable has failed
662 * @start_scan: flag set from scan_start callback, cleared from _mpt2sas_fw_work
663 * @start_scan_failed: means port enable failed, return's the ioc_status
659 * @msix_enable: flag indicating msix is enabled 664 * @msix_enable: flag indicating msix is enabled
660 * @msix_vector_count: number msix vectors 665 * @msix_vector_count: number msix vectors
661 * @cpu_msix_table: table for mapping cpus to msix index 666 * @cpu_msix_table: table for mapping cpus to msix index
@@ -790,15 +795,20 @@ struct MPT2SAS_ADAPTER {
790 u8 shost_recovery; 795 u8 shost_recovery;
791 796
792 struct mutex reset_in_progress_mutex; 797 struct mutex reset_in_progress_mutex;
793 struct completion shost_recovery_done;
794 spinlock_t ioc_reset_in_progress_lock; 798 spinlock_t ioc_reset_in_progress_lock;
795 u8 ioc_link_reset_in_progress; 799 u8 ioc_link_reset_in_progress;
796 int ioc_reset_in_progress_status; 800 u8 ioc_reset_in_progress_status;
797 801
798 u8 ignore_loginfos; 802 u8 ignore_loginfos;
799 u8 remove_host; 803 u8 remove_host;
800 u8 pci_error_recovery; 804 u8 pci_error_recovery;
801 u8 wait_for_port_enable_to_complete; 805 u8 wait_for_discovery_to_complete;
806 struct completion port_enable_done;
807 u8 is_driver_loading;
808 u8 port_enable_failed;
809
810 u8 start_scan;
811 u16 start_scan_failed;
802 812
803 u8 msix_enable; 813 u8 msix_enable;
804 u16 msix_vector_count; 814 u16 msix_vector_count;
@@ -814,11 +824,13 @@ struct MPT2SAS_ADAPTER {
814 u8 scsih_cb_idx; 824 u8 scsih_cb_idx;
815 u8 ctl_cb_idx; 825 u8 ctl_cb_idx;
816 u8 base_cb_idx; 826 u8 base_cb_idx;
827 u8 port_enable_cb_idx;
817 u8 config_cb_idx; 828 u8 config_cb_idx;
818 u8 tm_tr_cb_idx; 829 u8 tm_tr_cb_idx;
819 u8 tm_tr_volume_cb_idx; 830 u8 tm_tr_volume_cb_idx;
820 u8 tm_sas_control_cb_idx; 831 u8 tm_sas_control_cb_idx;
821 struct _internal_cmd base_cmds; 832 struct _internal_cmd base_cmds;
833 struct _internal_cmd port_enable_cmds;
822 struct _internal_cmd transport_cmds; 834 struct _internal_cmd transport_cmds;
823 struct _internal_cmd scsih_cmds; 835 struct _internal_cmd scsih_cmds;
824 struct _internal_cmd tm_cmds; 836 struct _internal_cmd tm_cmds;
@@ -1001,6 +1013,8 @@ void mpt2sas_base_release_callback_handler(u8 cb_idx);
1001 1013
1002u8 mpt2sas_base_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, 1014u8 mpt2sas_base_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index,
1003 u32 reply); 1015 u32 reply);
1016u8 mpt2sas_port_enable_done(struct MPT2SAS_ADAPTER *ioc, u16 smid,
1017 u8 msix_index, u32 reply);
1004void *mpt2sas_base_get_reply_virt_addr(struct MPT2SAS_ADAPTER *ioc, u32 phys_addr); 1018void *mpt2sas_base_get_reply_virt_addr(struct MPT2SAS_ADAPTER *ioc, u32 phys_addr);
1005 1019
1006u32 mpt2sas_base_get_iocstate(struct MPT2SAS_ADAPTER *ioc, int cooked); 1020u32 mpt2sas_base_get_iocstate(struct MPT2SAS_ADAPTER *ioc, int cooked);
@@ -1015,6 +1029,8 @@ void mpt2sas_base_validate_event_type(struct MPT2SAS_ADAPTER *ioc, u32 *event_ty
1015 1029
1016void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc); 1030void mpt2sas_halt_firmware(struct MPT2SAS_ADAPTER *ioc);
1017 1031
1032int mpt2sas_port_enable(struct MPT2SAS_ADAPTER *ioc);
1033
1018/* scsih shared API */ 1034/* scsih shared API */
1019u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index, 1035u8 mpt2sas_scsih_event_callback(struct MPT2SAS_ADAPTER *ioc, u8 msix_index,
1020 u32 reply); 1036 u32 reply);
@@ -1032,6 +1048,8 @@ struct _sas_node *mpt2sas_scsih_expander_find_by_sas_address(struct MPT2SAS_ADAP
1032struct _sas_device *mpt2sas_scsih_sas_device_find_by_sas_address( 1048struct _sas_device *mpt2sas_scsih_sas_device_find_by_sas_address(
1033 struct MPT2SAS_ADAPTER *ioc, u64 sas_address); 1049 struct MPT2SAS_ADAPTER *ioc, u64 sas_address);
1034 1050
1051void mpt2sas_port_enable_complete(struct MPT2SAS_ADAPTER *ioc);
1052
1035void mpt2sas_scsih_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase); 1053void mpt2sas_scsih_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase);
1036 1054
1037/* config shared API */ 1055/* config shared API */