aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:19:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 11:19:33 -0400
commitdf3d80f5a5c74168be42788364d13cf6c83c7b9c (patch)
tree892a964c2fd28d028f2fb7471e8543d3f4006a58 /drivers/message/fusion/mptbase.h
parent3d06f7a5f74a813cee817c4b30b5e6f0398da0be (diff)
parentc8e91b0a8fc8493e3bf3efcb3c8f866e9453cf1c (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: (207 commits) [SCSI] gdth: fix CONFIG_ISA build failure [SCSI] esp_scsi: remove __dev{init,exit} [SCSI] gdth: !use_sg cleanup and use of scsi accessors [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2 [SCSI] gdth: Setup proper per-command private data [SCSI] gdth: Remove gdth_ctr_tab[] [SCSI] gdth: switch to modern scsi host registration [SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes [SCSI] gdth: clean up host private data [SCSI] gdth: Remove virt hosts [SCSI] gdth: Reorder scsi_host_template intitializers [SCSI] gdth: kill gdth_{read,write}[bwl] wrappers [SCSI] gdth: Remove 2.4.x support, in-kernel changelog [SCSI] gdth: split out pci probing [SCSI] gdth: split out eisa probing [SCSI] gdth: split out isa probing gdth: Make one abuse of scsi_cmnd less obvious [SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation [SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE ...
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r--drivers/message/fusion/mptbase.h80
1 files changed, 56 insertions, 24 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 15ff22645844..d7682e083f59 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -3,9 +3,9 @@
3 * High performance SCSI + LAN / Fibre Channel device drivers. 3 * High performance SCSI + LAN / Fibre Channel device drivers.
4 * For use with PCI chip/adapter(s): 4 * For use with PCI chip/adapter(s):
5 * LSIFC9xx/LSI409xx Fibre Channel 5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Logic Corporation 8 * Copyright (c) 1999-2007 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
@@ -68,15 +68,15 @@
68/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 68/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
69 69
70#ifndef MODULEAUTHOR 70#ifndef MODULEAUTHOR
71#define MODULEAUTHOR "LSI Logic Corporation" 71#define MODULEAUTHOR "LSI Corporation"
72#endif 72#endif
73 73
74#ifndef COPYRIGHT 74#ifndef COPYRIGHT
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.05" 78#define MPT_LINUX_VERSION_COMMON "3.04.06"
79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.05" 79#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.06"
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) \
@@ -186,6 +186,7 @@
186 * MPT drivers. NOTE: Users of these macro defs must 186 * MPT drivers. NOTE: Users of these macro defs must
187 * themselves define their own MYNAM. 187 * themselves define their own MYNAM.
188 */ 188 */
189#define MYIOC_s_FMT MYNAM ": %s: "
189#define MYIOC_s_DEBUG_FMT KERN_DEBUG MYNAM ": %s: " 190#define MYIOC_s_DEBUG_FMT KERN_DEBUG MYNAM ": %s: "
190#define MYIOC_s_INFO_FMT KERN_INFO MYNAM ": %s: " 191#define MYIOC_s_INFO_FMT KERN_INFO MYNAM ": %s: "
191#define MYIOC_s_NOTE_FMT KERN_NOTICE MYNAM ": %s: " 192#define MYIOC_s_NOTE_FMT KERN_NOTICE MYNAM ": %s: "
@@ -194,6 +195,35 @@
194 195
195/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 196/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
196/* 197/*
198 * ATTO UL4D associated structures and defines
199 */
200#define ATTOFLAG_DISC 0x0001
201#define ATTOFLAG_TAGGED 0x0002
202#define ATTOFLAG_WIDE_ENB 0x0008
203#define ATTOFLAG_ID_ENB 0x0010
204#define ATTOFLAG_LUN_ENB 0x0060
205
206typedef struct _ATTO_DEVICE_INFO
207{
208 u8 Offset; /* 00h */
209 u8 Period; /* 01h */
210 u16 ATTOFlags; /* 02h */
211} ATTO_DEVICE_INFO, MPI_POINTER PTR_ATTO_DEVICE_INFO,
212 ATTODeviceInfo_t, MPI_POINTER pATTODeviceInfo_t;
213
214typedef struct _ATTO_CONFIG_PAGE_SCSI_PORT_2
215{
216 CONFIG_PAGE_HEADER Header; /* 00h */
217 u16 PortFlags; /* 04h */
218 u16 Unused1; /* 06h */
219 u32 Unused2; /* 08h */
220 ATTO_DEVICE_INFO DeviceSettings[16]; /* 0Ch */
221} fATTO_CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_ATTO_CONFIG_PAGE_SCSI_PORT_2,
222 ATTO_SCSIPortPage2_t, MPI_POINTER pATTO_SCSIPortPage2_t;
223
224
225/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
226/*
197 * MPT protocol driver defs... 227 * MPT protocol driver defs...
198 */ 228 */
199typedef enum { 229typedef enum {
@@ -307,7 +337,8 @@ typedef struct _SYSIF_REGS
307 u32 Reserved2[2]; /* 38-3F reserved for future use */ 337 u32 Reserved2[2]; /* 38-3F reserved for future use */
308 u32 RequestFifo; /* 40 Request Post/Free FIFO */ 338 u32 RequestFifo; /* 40 Request Post/Free FIFO */
309 u32 ReplyFifo; /* 44 Reply Post/Free FIFO */ 339 u32 ReplyFifo; /* 44 Reply Post/Free FIFO */
310 u32 Reserved3[2]; /* 48-4F reserved for future use */ 340 u32 RequestHiPriFifo; /* 48 Hi Priority Request FIFO */
341 u32 Reserved3; /* 4C-4F reserved for future use */
311 u32 HostIndex; /* 50 Host Index register */ 342 u32 HostIndex; /* 50 Host Index register */
312 u32 Reserved4[15]; /* 54-8F */ 343 u32 Reserved4[15]; /* 54-8F */
313 u32 Fubar; /* 90 For Fubar usage */ 344 u32 Fubar; /* 90 For Fubar usage */
@@ -649,9 +680,9 @@ typedef struct _MPT_ADAPTER
649 u8 reload_fw; /* Force a FW Reload on next reset */ 680 u8 reload_fw; /* Force a FW Reload on next reset */
650 u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */ 681 u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */
651 u8 pad1[4]; 682 u8 pad1[4];
652 int DoneCtx; 683 u8 DoneCtx;
653 int TaskCtx; 684 u8 TaskCtx;
654 int InternalCtx; 685 u8 InternalCtx;
655 spinlock_t initializing_hba_lock; 686 spinlock_t initializing_hba_lock;
656 int initializing_hba_lock_flag; 687 int initializing_hba_lock_flag;
657 struct list_head list; 688 struct list_head list;
@@ -668,10 +699,14 @@ typedef struct _MPT_ADAPTER
668 699
669 struct work_struct fc_setup_reset_work; 700 struct work_struct fc_setup_reset_work;
670 struct list_head fc_rports; 701 struct list_head fc_rports;
702 struct work_struct fc_lsc_work;
703 u8 fc_link_speed[2];
671 spinlock_t fc_rescan_work_lock; 704 spinlock_t fc_rescan_work_lock;
672 struct work_struct fc_rescan_work; 705 struct work_struct fc_rescan_work;
673 char fc_rescan_work_q_name[KOBJ_NAME_LEN]; 706 char fc_rescan_work_q_name[KOBJ_NAME_LEN];
674 struct workqueue_struct *fc_rescan_work_q; 707 struct workqueue_struct *fc_rescan_work_q;
708 struct scsi_cmnd **ScsiLookup;
709 spinlock_t scsi_lookup_lock;
675} MPT_ADAPTER; 710} MPT_ADAPTER;
676 711
677/* 712/*
@@ -785,7 +820,6 @@ typedef struct _MPT_SCSI_HOST {
785 MPT_ADAPTER *ioc; 820 MPT_ADAPTER *ioc;
786 int port; 821 int port;
787 u32 pad0; 822 u32 pad0;
788 struct scsi_cmnd **ScsiLookup;
789 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */ 823 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */
790 struct timer_list timer; 824 struct timer_list timer;
791 /* Pool of memory for holding SCpnts before doing 825 /* Pool of memory for holding SCpnts before doing
@@ -853,20 +887,21 @@ extern void mpt_detach(struct pci_dev *pdev);
853extern int mpt_suspend(struct pci_dev *pdev, pm_message_t state); 887extern int mpt_suspend(struct pci_dev *pdev, pm_message_t state);
854extern int mpt_resume(struct pci_dev *pdev); 888extern int mpt_resume(struct pci_dev *pdev);
855#endif 889#endif
856extern int mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass); 890extern u8 mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass);
857extern void mpt_deregister(int cb_idx); 891extern void mpt_deregister(u8 cb_idx);
858extern int mpt_event_register(int cb_idx, MPT_EVHANDLER ev_cbfunc); 892extern int mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc);
859extern void mpt_event_deregister(int cb_idx); 893extern void mpt_event_deregister(u8 cb_idx);
860extern int mpt_reset_register(int cb_idx, MPT_RESETHANDLER reset_func); 894extern int mpt_reset_register(u8 cb_idx, MPT_RESETHANDLER reset_func);
861extern void mpt_reset_deregister(int cb_idx); 895extern void mpt_reset_deregister(u8 cb_idx);
862extern int mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, int cb_idx); 896extern int mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, u8 cb_idx);
863extern void mpt_device_driver_deregister(int cb_idx); 897extern void mpt_device_driver_deregister(u8 cb_idx);
864extern MPT_FRAME_HDR *mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc); 898extern MPT_FRAME_HDR *mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc);
865extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); 899extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
866extern void mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf); 900extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
901extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
867extern void mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr); 902extern void mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr);
868 903
869extern int mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag); 904extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag);
870extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp); 905extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp);
871extern u32 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked); 906extern u32 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked);
872extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan); 907extern void mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan);
@@ -884,9 +919,6 @@ extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhys
884extern struct list_head ioc_list; 919extern struct list_head ioc_list;
885extern struct proc_dir_entry *mpt_proc_root_dir; 920extern struct proc_dir_entry *mpt_proc_root_dir;
886 921
887extern int mpt_lan_index; /* needed by mptlan.c */
888extern int mpt_stm_index; /* needed by mptstm.c */
889
890/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 922/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
891#endif /* } __KERNEL__ */ 923#endif /* } __KERNEL__ */
892 924