3 Macros and type definitions for LSI Fusion MPT SCSI devices.
5 Copyright (C) 2020, Oracle and/or its affiliates.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef __FUSION_MPT_SCSI_H__
12 #define __FUSION_MPT_SCSI_H__
15 // Device offsets and constants
18 #define LSI_LOGIC_PCI_VENDOR_ID 0x1000
19 #define LSI_53C1030_PCI_DEVICE_ID 0x0030
20 #define LSI_SAS1068_PCI_DEVICE_ID 0x0054
21 #define LSI_SAS1068E_PCI_DEVICE_ID 0x0058
23 #define MPT_REG_DOORBELL 0x00
24 #define MPT_REG_WRITE_SEQ 0x04
25 #define MPT_REG_HOST_DIAG 0x08
26 #define MPT_REG_TEST 0x0c
27 #define MPT_REG_DIAG_DATA 0x10
28 #define MPT_REG_DIAG_ADDR 0x14
29 #define MPT_REG_ISTATUS 0x30
30 #define MPT_REG_IMASK 0x34
31 #define MPT_REG_REQ_Q 0x40
32 #define MPT_REG_REP_Q 0x44
34 #define MPT_DOORBELL_RESET 0x40
35 #define MPT_DOORBELL_HANDSHAKE 0x42
37 #define MPT_IMASK_DOORBELL 0x01
38 #define MPT_IMASK_REPLY 0x08
40 #define MPT_MESSAGE_HDR_FUNCTION_SCSI_IO_REQUEST 0x00
41 #define MPT_MESSAGE_HDR_FUNCTION_IOC_INIT 0x02
43 #define MPT_SG_ENTRY_TYPE_SIMPLE 0x01
45 #define MPT_IOC_WHOINIT_ROM_BIOS 0x02
61 UINT32 MessageContext
;
62 UINT16 ReplyFrameSize
;
64 UINT32 HostMfaHighAddr
;
65 UINT32 SenseBufferHighAddr
;
66 } MPT_IO_CONTROLLER_INIT_REQUEST
;
77 UINT32 MessageContext
;
81 } MPT_IO_CONTROLLER_INIT_REPLY
;
89 UINT8 SenseBufferLength
;
92 UINT32 MessageContext
;
97 UINT32 SenseBufferLowAddress
;
98 } MPT_SCSI_IO_REQUEST
;
103 UINT32 Is64BitAddress
: 1;
105 // True when the buffer contains data to be transfered. Otherwise it's the
106 // destination buffer
108 UINT32 BufferContainsData
: 1;
109 UINT32 LocalAddress
: 1;
110 UINT32 ElementType
: 2;
111 UINT32 EndOfBuffer
: 1;
112 UINT32 LastElement
: 1;
113 UINT64 DataBufferAddress
;
114 } MPT_SG_ENTRY_SIMPLE
;
122 UINT8 SenseBufferLength
;
125 UINT32 MessageContext
;
130 UINT32 TransferCount
;
136 MPT_SCSI_IO_REQUEST Header
;
137 MPT_SG_ENTRY_SIMPLE Sg
;
138 } MPT_SCSI_REQUEST_WITH_SG
;
142 MPT_SCSI_IO_REPLY Data
;
143 UINT64 Uint64
; // 8 byte alignment required by HW
144 } MPT_SCSI_IO_REPLY_ALIGNED
;
147 MPT_SCSI_REQUEST_WITH_SG Data
;
148 UINT64 Uint64
; // 8 byte alignment required by HW
149 } MPT_SCSI_REQUEST_ALIGNED
;
151 #endif // __FUSION_MPT_SCSI_H__