diff options
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r-- | drivers/message/fusion/mptbase.h | 180 |
1 files changed, 110 insertions, 70 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index b3e981d2a506..1c8514dc31ca 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -76,8 +76,8 @@ | |||
76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR | 76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define MPT_LINUX_VERSION_COMMON "3.04.07" | 79 | #define MPT_LINUX_VERSION_COMMON "3.04.10" |
80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.07" | 80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.09" |
81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
82 | 82 | ||
83 | #define show_mptmod_ver(s,ver) \ | 83 | #define show_mptmod_ver(s,ver) \ |
@@ -104,6 +104,7 @@ | |||
104 | #endif | 104 | #endif |
105 | 105 | ||
106 | #define MPT_NAME_LENGTH 32 | 106 | #define MPT_NAME_LENGTH 32 |
107 | #define MPT_KOBJ_NAME_LEN 20 | ||
107 | 108 | ||
108 | #define MPT_PROCFS_MPTBASEDIR "mpt" | 109 | #define MPT_PROCFS_MPTBASEDIR "mpt" |
109 | /* chg it to "driver/fusion" ? */ | 110 | /* chg it to "driver/fusion" ? */ |
@@ -134,6 +135,7 @@ | |||
134 | 135 | ||
135 | #define MPT_COALESCING_TIMEOUT 0x10 | 136 | #define MPT_COALESCING_TIMEOUT 0x10 |
136 | 137 | ||
138 | |||
137 | /* | 139 | /* |
138 | * SCSI transfer rate defines. | 140 | * SCSI transfer rate defines. |
139 | */ | 141 | */ |
@@ -161,10 +163,10 @@ | |||
161 | /* | 163 | /* |
162 | * Set the MAX_SGE value based on user input. | 164 | * Set the MAX_SGE value based on user input. |
163 | */ | 165 | */ |
164 | #ifdef CONFIG_FUSION_MAX_SGE | 166 | #ifdef CONFIG_FUSION_MAX_SGE |
165 | #if CONFIG_FUSION_MAX_SGE < 16 | 167 | #if CONFIG_FUSION_MAX_SGE < 16 |
166 | #define MPT_SCSI_SG_DEPTH 16 | 168 | #define MPT_SCSI_SG_DEPTH 16 |
167 | #elif CONFIG_FUSION_MAX_SGE > 128 | 169 | #elif CONFIG_FUSION_MAX_SGE > 128 |
168 | #define MPT_SCSI_SG_DEPTH 128 | 170 | #define MPT_SCSI_SG_DEPTH 128 |
169 | #else | 171 | #else |
170 | #define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE | 172 | #define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE |
@@ -173,6 +175,18 @@ | |||
173 | #define MPT_SCSI_SG_DEPTH 40 | 175 | #define MPT_SCSI_SG_DEPTH 40 |
174 | #endif | 176 | #endif |
175 | 177 | ||
178 | #ifdef CONFIG_FUSION_MAX_FC_SGE | ||
179 | #if CONFIG_FUSION_MAX_FC_SGE < 16 | ||
180 | #define MPT_SCSI_FC_SG_DEPTH 16 | ||
181 | #elif CONFIG_FUSION_MAX_FC_SGE > 256 | ||
182 | #define MPT_SCSI_FC_SG_DEPTH 256 | ||
183 | #else | ||
184 | #define MPT_SCSI_FC_SG_DEPTH CONFIG_FUSION_MAX_FC_SGE | ||
185 | #endif | ||
186 | #else | ||
187 | #define MPT_SCSI_FC_SG_DEPTH 40 | ||
188 | #endif | ||
189 | |||
176 | /* debug print string length used for events and iocstatus */ | 190 | /* debug print string length used for events and iocstatus */ |
177 | # define EVENT_DESCR_STR_SZ 100 | 191 | # define EVENT_DESCR_STR_SZ 100 |
178 | 192 | ||
@@ -431,38 +445,36 @@ do { \ | |||
431 | * IOCTL structure and associated defines | 445 | * IOCTL structure and associated defines |
432 | */ | 446 | */ |
433 | 447 | ||
434 | #define MPT_IOCTL_STATUS_DID_IOCRESET 0x01 /* IOC Reset occurred on the current*/ | ||
435 | #define MPT_IOCTL_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */ | ||
436 | #define MPT_IOCTL_STATUS_TIMER_ACTIVE 0x04 /* The timer is running */ | ||
437 | #define MPT_IOCTL_STATUS_SENSE_VALID 0x08 /* Sense data is valid */ | ||
438 | #define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */ | ||
439 | #define MPT_IOCTL_STATUS_TMTIMER_ACTIVE 0x20 /* The TM timer is running */ | ||
440 | #define MPT_IOCTL_STATUS_TM_FAILED 0x40 /* User TM request failed */ | ||
441 | |||
442 | #define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ | 448 | #define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */ |
443 | 449 | ||
444 | typedef struct _MPT_IOCTL { | 450 | #define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */ |
445 | struct _MPT_ADAPTER *ioc; | 451 | #define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */ |
446 | u8 ReplyFrame[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ | 452 | #define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */ |
447 | u8 sense[MPT_SENSE_BUFFER_ALLOC]; | 453 | #define MPT_MGMT_STATUS_DID_IOCRESET 0x08 /* IOC Reset occurred |
448 | int wait_done; /* wake-up value for this ioc */ | 454 | on the current*/ |
449 | u8 rsvd; | 455 | #define MPT_MGMT_STATUS_SENSE_VALID 0x10 /* valid sense info */ |
450 | u8 status; /* current command status */ | 456 | #define MPT_MGMT_STATUS_TIMER_ACTIVE 0x20 /* obsolete */ |
451 | u8 reset; /* 1 if bus reset allowed */ | 457 | #define MPT_MGMT_STATUS_FREE_MF 0x40 /* free the mf from |
452 | u8 id; /* target for reset */ | 458 | complete routine */ |
453 | struct mutex ioctl_mutex; | 459 | |
454 | } MPT_IOCTL; | 460 | #define INITIALIZE_MGMT_STATUS(status) \ |
455 | 461 | status = MPT_MGMT_STATUS_PENDING; | |
456 | #define MPT_SAS_MGMT_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */ | 462 | #define CLEAR_MGMT_STATUS(status) \ |
457 | #define MPT_SAS_MGMT_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */ | 463 | status = 0; |
458 | #define MPT_SAS_MGMT_STATUS_TM_FAILED 0x40 /* User TM request failed */ | 464 | #define CLEAR_MGMT_PENDING_STATUS(status) \ |
459 | 465 | status &= ~MPT_MGMT_STATUS_PENDING; | |
460 | typedef struct _MPT_SAS_MGMT { | 466 | #define SET_MGMT_MSG_CONTEXT(msg_context, value) \ |
467 | msg_context = value; | ||
468 | |||
469 | typedef struct _MPT_MGMT { | ||
461 | struct mutex mutex; | 470 | struct mutex mutex; |
462 | struct completion done; | 471 | struct completion done; |
463 | u8 reply[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ | 472 | u8 reply[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */ |
473 | u8 sense[MPT_SENSE_BUFFER_ALLOC]; | ||
464 | u8 status; /* current command status */ | 474 | u8 status; /* current command status */ |
465 | }MPT_SAS_MGMT; | 475 | int completion_code; |
476 | u32 msg_context; | ||
477 | } MPT_MGMT; | ||
466 | 478 | ||
467 | /* | 479 | /* |
468 | * Event Structure and define | 480 | * Event Structure and define |
@@ -564,6 +576,10 @@ struct mptfc_rport_info | |||
564 | u8 flags; | 576 | u8 flags; |
565 | }; | 577 | }; |
566 | 578 | ||
579 | typedef void (*MPT_ADD_SGE)(void *pAddr, u32 flagslength, dma_addr_t dma_addr); | ||
580 | typedef void (*MPT_ADD_CHAIN)(void *pAddr, u8 next, u16 length, | ||
581 | dma_addr_t dma_addr); | ||
582 | |||
567 | /* | 583 | /* |
568 | * Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS | 584 | * Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS |
569 | */ | 585 | */ |
@@ -573,6 +589,10 @@ typedef struct _MPT_ADAPTER | |||
573 | int pci_irq; /* This irq */ | 589 | int pci_irq; /* This irq */ |
574 | char name[MPT_NAME_LENGTH]; /* "iocN" */ | 590 | char name[MPT_NAME_LENGTH]; /* "iocN" */ |
575 | char prod_name[MPT_NAME_LENGTH]; /* "LSIFC9x9" */ | 591 | char prod_name[MPT_NAME_LENGTH]; /* "LSIFC9x9" */ |
592 | #ifdef CONFIG_FUSION_LOGGING | ||
593 | /* used in mpt_display_event_info */ | ||
594 | char evStr[EVENT_DESCR_STR_SZ]; | ||
595 | #endif | ||
576 | char board_name[16]; | 596 | char board_name[16]; |
577 | char board_assembly[16]; | 597 | char board_assembly[16]; |
578 | char board_tracer[16]; | 598 | char board_tracer[16]; |
@@ -600,6 +620,10 @@ typedef struct _MPT_ADAPTER | |||
600 | int reply_depth; /* Num Allocated reply frames */ | 620 | int reply_depth; /* Num Allocated reply frames */ |
601 | int reply_sz; /* Reply frame size */ | 621 | int reply_sz; /* Reply frame size */ |
602 | int num_chain; /* Number of chain buffers */ | 622 | int num_chain; /* Number of chain buffers */ |
623 | MPT_ADD_SGE add_sge; /* Pointer to add_sge | ||
624 | function */ | ||
625 | MPT_ADD_CHAIN add_chain; /* Pointer to add_chain | ||
626 | function */ | ||
603 | /* Pool of buffers for chaining. ReqToChain | 627 | /* Pool of buffers for chaining. ReqToChain |
604 | * and ChainToChain track index of chain buffers. | 628 | * and ChainToChain track index of chain buffers. |
605 | * ChainBuffer (DMA) virt/phys addresses. | 629 | * ChainBuffer (DMA) virt/phys addresses. |
@@ -640,11 +664,8 @@ typedef struct _MPT_ADAPTER | |||
640 | RaidCfgData raid_data; /* Raid config. data */ | 664 | RaidCfgData raid_data; /* Raid config. data */ |
641 | SasCfgData sas_data; /* Sas config. data */ | 665 | SasCfgData sas_data; /* Sas config. data */ |
642 | FcCfgData fc_data; /* Fc config. data */ | 666 | FcCfgData fc_data; /* Fc config. data */ |
643 | MPT_IOCTL *ioctl; /* ioctl data pointer */ | ||
644 | struct proc_dir_entry *ioc_dentry; | 667 | struct proc_dir_entry *ioc_dentry; |
645 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ | 668 | struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */ |
646 | spinlock_t diagLock; /* diagnostic reset lock */ | ||
647 | int diagPending; | ||
648 | u32 biosVersion; /* BIOS version from IO Unit Page 2 */ | 669 | u32 biosVersion; /* BIOS version from IO Unit Page 2 */ |
649 | int eventTypes; /* Event logging parameters */ | 670 | int eventTypes; /* Event logging parameters */ |
650 | int eventContext; /* Next event context */ | 671 | int eventContext; /* Next event context */ |
@@ -652,7 +673,6 @@ typedef struct _MPT_ADAPTER | |||
652 | struct _mpt_ioctl_events *events; /* pointer to event log */ | 673 | struct _mpt_ioctl_events *events; /* pointer to event log */ |
653 | u8 *cached_fw; /* Pointer to FW */ | 674 | u8 *cached_fw; /* Pointer to FW */ |
654 | dma_addr_t cached_fw_dma; | 675 | dma_addr_t cached_fw_dma; |
655 | struct list_head configQ; /* linked list of config. requests */ | ||
656 | int hs_reply_idx; | 676 | int hs_reply_idx; |
657 | #ifndef MFCNT | 677 | #ifndef MFCNT |
658 | u32 pad0; | 678 | u32 pad0; |
@@ -665,9 +685,6 @@ typedef struct _MPT_ADAPTER | |||
665 | IOCFactsReply_t facts; | 685 | IOCFactsReply_t facts; |
666 | PortFactsReply_t pfacts[2]; | 686 | PortFactsReply_t pfacts[2]; |
667 | FCPortPage0_t fc_port_page0[2]; | 687 | FCPortPage0_t fc_port_page0[2]; |
668 | struct timer_list persist_timer; /* persist table timer */ | ||
669 | int persist_wait_done; /* persist completion flag */ | ||
670 | u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */ | ||
671 | LANPage0_t lan_cnfg_page0; | 688 | LANPage0_t lan_cnfg_page0; |
672 | LANPage1_t lan_cnfg_page1; | 689 | LANPage1_t lan_cnfg_page1; |
673 | 690 | ||
@@ -682,23 +699,44 @@ typedef struct _MPT_ADAPTER | |||
682 | int aen_event_read_flag; /* flag to indicate event log was read*/ | 699 | int aen_event_read_flag; /* flag to indicate event log was read*/ |
683 | u8 FirstWhoInit; | 700 | u8 FirstWhoInit; |
684 | u8 upload_fw; /* If set, do a fw upload */ | 701 | u8 upload_fw; /* If set, do a fw upload */ |
685 | u8 reload_fw; /* Force a FW Reload on next reset */ | ||
686 | u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ | 702 | u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ |
687 | u8 pad1[4]; | 703 | u8 pad1[4]; |
688 | u8 DoneCtx; | 704 | u8 DoneCtx; |
689 | u8 TaskCtx; | 705 | u8 TaskCtx; |
690 | u8 InternalCtx; | 706 | u8 InternalCtx; |
691 | spinlock_t initializing_hba_lock; | ||
692 | int initializing_hba_lock_flag; | ||
693 | struct list_head list; | 707 | struct list_head list; |
694 | struct net_device *netdev; | 708 | struct net_device *netdev; |
695 | struct list_head sas_topology; | 709 | struct list_head sas_topology; |
696 | struct mutex sas_topology_mutex; | 710 | struct mutex sas_topology_mutex; |
711 | |||
712 | struct workqueue_struct *fw_event_q; | ||
713 | struct list_head fw_event_list; | ||
714 | spinlock_t fw_event_lock; | ||
715 | u8 fw_events_off; /* if '1', then ignore events */ | ||
716 | char fw_event_q_name[MPT_KOBJ_NAME_LEN]; | ||
717 | |||
697 | struct mutex sas_discovery_mutex; | 718 | struct mutex sas_discovery_mutex; |
698 | u8 sas_discovery_runtime; | 719 | u8 sas_discovery_runtime; |
699 | u8 sas_discovery_ignore_events; | 720 | u8 sas_discovery_ignore_events; |
721 | |||
722 | /* port_info object for the host */ | ||
723 | struct mptsas_portinfo *hba_port_info; | ||
724 | u64 hba_port_sas_addr; | ||
725 | u16 hba_port_num_phy; | ||
726 | struct list_head sas_device_info_list; | ||
727 | struct mutex sas_device_info_mutex; | ||
728 | u8 old_sas_discovery_protocal; | ||
729 | u8 sas_discovery_quiesce_io; | ||
700 | int sas_index; /* index refrencing */ | 730 | int sas_index; /* index refrencing */ |
701 | MPT_SAS_MGMT sas_mgmt; | 731 | MPT_MGMT sas_mgmt; |
732 | MPT_MGMT mptbase_cmds; /* for sending config pages */ | ||
733 | MPT_MGMT internal_cmds; | ||
734 | MPT_MGMT taskmgmt_cmds; | ||
735 | MPT_MGMT ioctl_cmds; | ||
736 | spinlock_t taskmgmt_lock; /* diagnostic reset lock */ | ||
737 | int taskmgmt_in_progress; | ||
738 | u8 taskmgmt_quiesce_io; | ||
739 | u8 ioc_reset_in_progress; | ||
702 | struct work_struct sas_persist_task; | 740 | struct work_struct sas_persist_task; |
703 | 741 | ||
704 | struct work_struct fc_setup_reset_work; | 742 | struct work_struct fc_setup_reset_work; |
@@ -707,15 +745,27 @@ typedef struct _MPT_ADAPTER | |||
707 | u8 fc_link_speed[2]; | 745 | u8 fc_link_speed[2]; |
708 | spinlock_t fc_rescan_work_lock; | 746 | spinlock_t fc_rescan_work_lock; |
709 | struct work_struct fc_rescan_work; | 747 | struct work_struct fc_rescan_work; |
710 | char fc_rescan_work_q_name[20]; | 748 | char fc_rescan_work_q_name[MPT_KOBJ_NAME_LEN]; |
711 | struct workqueue_struct *fc_rescan_work_q; | 749 | struct workqueue_struct *fc_rescan_work_q; |
750 | |||
751 | /* driver forced bus resets count */ | ||
752 | unsigned long hard_resets; | ||
753 | /* fw/external bus resets count */ | ||
754 | unsigned long soft_resets; | ||
755 | /* cmd timeouts */ | ||
756 | unsigned long timeouts; | ||
757 | |||
712 | struct scsi_cmnd **ScsiLookup; | 758 | struct scsi_cmnd **ScsiLookup; |
713 | spinlock_t scsi_lookup_lock; | 759 | spinlock_t scsi_lookup_lock; |
714 | 760 | u64 dma_mask; | |
715 | char reset_work_q_name[20]; | 761 | u32 broadcast_aen_busy; |
762 | char reset_work_q_name[MPT_KOBJ_NAME_LEN]; | ||
716 | struct workqueue_struct *reset_work_q; | 763 | struct workqueue_struct *reset_work_q; |
717 | struct delayed_work fault_reset_work; | 764 | struct delayed_work fault_reset_work; |
718 | spinlock_t fault_reset_work_lock; | 765 | |
766 | u8 sg_addr_size; | ||
767 | u8 in_rescan; | ||
768 | u8 SGE_size; | ||
719 | 769 | ||
720 | } MPT_ADAPTER; | 770 | } MPT_ADAPTER; |
721 | 771 | ||
@@ -753,13 +803,14 @@ typedef struct _mpt_sge { | |||
753 | dma_addr_t Address; | 803 | dma_addr_t Address; |
754 | } MptSge_t; | 804 | } MptSge_t; |
755 | 805 | ||
756 | #define mpt_addr_size() \ | ||
757 | ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SGE_FLAGS_64_BIT_ADDRESSING : \ | ||
758 | MPI_SGE_FLAGS_32_BIT_ADDRESSING) | ||
759 | 806 | ||
760 | #define mpt_msg_flags() \ | 807 | #define mpt_msg_flags(ioc) \ |
761 | ((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \ | 808 | (ioc->sg_addr_size == sizeof(u64)) ? \ |
762 | MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32) | 809 | MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \ |
810 | MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 | ||
811 | |||
812 | #define MPT_SGE_FLAGS_64_BIT_ADDRESSING \ | ||
813 | (MPI_SGE_FLAGS_64_BIT_ADDRESSING << MPI_SGE_FLAGS_SHIFT) | ||
763 | 814 | ||
764 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 815 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
765 | /* | 816 | /* |
@@ -835,22 +886,14 @@ typedef struct _MPT_SCSI_HOST { | |||
835 | /* Pool of memory for holding SCpnts before doing | 886 | /* Pool of memory for holding SCpnts before doing |
836 | * OS callbacks. freeQ is the free pool. | 887 | * OS callbacks. freeQ is the free pool. |
837 | */ | 888 | */ |
838 | u8 tmPending; | ||
839 | u8 resetPending; | ||
840 | u8 negoNvram; /* DV disabled, nego NVRAM */ | 889 | u8 negoNvram; /* DV disabled, nego NVRAM */ |
841 | u8 pad1; | 890 | u8 pad1; |
842 | u8 tmState; | ||
843 | u8 rsvd[2]; | 891 | u8 rsvd[2]; |
844 | MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */ | 892 | MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */ |
845 | struct scsi_cmnd *abortSCpnt; | 893 | struct scsi_cmnd *abortSCpnt; |
846 | MPT_LOCAL_REPLY localReply; /* internal cmd reply struct */ | 894 | MPT_LOCAL_REPLY localReply; /* internal cmd reply struct */ |
847 | unsigned long hard_resets; /* driver forced bus resets count */ | ||
848 | unsigned long soft_resets; /* fw/external bus resets count */ | ||
849 | unsigned long timeouts; /* cmd timeouts */ | ||
850 | ushort sel_timeout[MPT_MAX_FC_DEVICES]; | 895 | ushort sel_timeout[MPT_MAX_FC_DEVICES]; |
851 | char *info_kbuf; | 896 | char *info_kbuf; |
852 | wait_queue_head_t scandv_waitq; | ||
853 | int scandv_wait_done; | ||
854 | long last_queue_full; | 897 | long last_queue_full; |
855 | u16 tm_iocstatus; | 898 | u16 tm_iocstatus; |
856 | u16 spi_pending; | 899 | u16 spi_pending; |
@@ -870,21 +913,16 @@ struct scsi_cmnd; | |||
870 | * Generic structure passed to the base mpt_config function. | 913 | * Generic structure passed to the base mpt_config function. |
871 | */ | 914 | */ |
872 | typedef struct _x_config_parms { | 915 | typedef struct _x_config_parms { |
873 | struct list_head linkage; /* linked list */ | ||
874 | struct timer_list timer; /* timer function for this request */ | ||
875 | union { | 916 | union { |
876 | ConfigExtendedPageHeader_t *ehdr; | 917 | ConfigExtendedPageHeader_t *ehdr; |
877 | ConfigPageHeader_t *hdr; | 918 | ConfigPageHeader_t *hdr; |
878 | } cfghdr; | 919 | } cfghdr; |
879 | dma_addr_t physAddr; | 920 | dma_addr_t physAddr; |
880 | int wait_done; /* wait for this request */ | ||
881 | u32 pageAddr; /* properly formatted */ | 921 | u32 pageAddr; /* properly formatted */ |
922 | u16 status; | ||
882 | u8 action; | 923 | u8 action; |
883 | u8 dir; | 924 | u8 dir; |
884 | u8 timeout; /* seconds */ | 925 | u8 timeout; /* seconds */ |
885 | u8 pad1; | ||
886 | u16 status; | ||
887 | u16 pad2; | ||
888 | } CONFIGPARMS; | 926 | } CONFIGPARMS; |
889 | 927 | ||
890 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 928 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
@@ -909,7 +947,6 @@ extern MPT_FRAME_HDR *mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc); | |||
909 | extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); | 947 | extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); |
910 | extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); | 948 | extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); |
911 | extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); | 949 | extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); |
912 | extern void mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr); | ||
913 | 950 | ||
914 | extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag); | 951 | extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag); |
915 | extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp); | 952 | extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp); |
@@ -922,6 +959,12 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc); | |||
922 | extern int mpt_findImVolumes(MPT_ADAPTER *ioc); | 959 | extern int mpt_findImVolumes(MPT_ADAPTER *ioc); |
923 | extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); | 960 | extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode); |
924 | extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk); | 961 | extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk); |
962 | extern int mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num, | ||
963 | pRaidPhysDiskPage1_t phys_disk); | ||
964 | extern int mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc, | ||
965 | u8 phys_disk_num); | ||
966 | extern int mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc); | ||
967 | extern void mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc); | ||
925 | extern void mpt_halt_firmware(MPT_ADAPTER *ioc); | 968 | extern void mpt_halt_firmware(MPT_ADAPTER *ioc); |
926 | 969 | ||
927 | 970 | ||
@@ -959,7 +1002,6 @@ extern int mpt_fwfault_debug; | |||
959 | #define MPT_SGE_FLAGS_END_OF_BUFFER (0x40000000) | 1002 | #define MPT_SGE_FLAGS_END_OF_BUFFER (0x40000000) |
960 | #define MPT_SGE_FLAGS_LOCAL_ADDRESS (0x08000000) | 1003 | #define MPT_SGE_FLAGS_LOCAL_ADDRESS (0x08000000) |
961 | #define MPT_SGE_FLAGS_DIRECTION (0x04000000) | 1004 | #define MPT_SGE_FLAGS_DIRECTION (0x04000000) |
962 | #define MPT_SGE_FLAGS_ADDRESSING (mpt_addr_size() << MPI_SGE_FLAGS_SHIFT) | ||
963 | #define MPT_SGE_FLAGS_END_OF_LIST (0x01000000) | 1005 | #define MPT_SGE_FLAGS_END_OF_LIST (0x01000000) |
964 | 1006 | ||
965 | #define MPT_SGE_FLAGS_TRANSACTION_ELEMENT (0x00000000) | 1007 | #define MPT_SGE_FLAGS_TRANSACTION_ELEMENT (0x00000000) |
@@ -972,14 +1014,12 @@ extern int mpt_fwfault_debug; | |||
972 | MPT_SGE_FLAGS_END_OF_BUFFER | \ | 1014 | MPT_SGE_FLAGS_END_OF_BUFFER | \ |
973 | MPT_SGE_FLAGS_END_OF_LIST | \ | 1015 | MPT_SGE_FLAGS_END_OF_LIST | \ |
974 | MPT_SGE_FLAGS_SIMPLE_ELEMENT | \ | 1016 | MPT_SGE_FLAGS_SIMPLE_ELEMENT | \ |
975 | MPT_SGE_FLAGS_ADDRESSING | \ | ||
976 | MPT_TRANSFER_IOC_TO_HOST) | 1017 | MPT_TRANSFER_IOC_TO_HOST) |
977 | #define MPT_SGE_FLAGS_SSIMPLE_WRITE \ | 1018 | #define MPT_SGE_FLAGS_SSIMPLE_WRITE \ |
978 | (MPT_SGE_FLAGS_LAST_ELEMENT | \ | 1019 | (MPT_SGE_FLAGS_LAST_ELEMENT | \ |
979 | MPT_SGE_FLAGS_END_OF_BUFFER | \ | 1020 | MPT_SGE_FLAGS_END_OF_BUFFER | \ |
980 | MPT_SGE_FLAGS_END_OF_LIST | \ | 1021 | MPT_SGE_FLAGS_END_OF_LIST | \ |
981 | MPT_SGE_FLAGS_SIMPLE_ELEMENT | \ | 1022 | MPT_SGE_FLAGS_SIMPLE_ELEMENT | \ |
982 | MPT_SGE_FLAGS_ADDRESSING | \ | ||
983 | MPT_TRANSFER_HOST_TO_IOC) | 1023 | MPT_TRANSFER_HOST_TO_IOC) |
984 | 1024 | ||
985 | /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1025 | /*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |