Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpi3mr/mpi/mpi30_ioc.h
/* | /* | ||||
* SPDX-License-Identifier: BSD-2-Clause | * SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||||
* | * | ||||
* Copyright (c) 2016-2023, Broadcom Inc. All rights reserved. | * Copyright (c) 2016-2024, Broadcom Inc. All rights reserved. | ||||
* Support: <fbsd-storage-driver.pdl@broadcom.com> | * Support: <fbsd-storage-driver.pdl@broadcom.com> | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
* modification, are permitted provided that the following conditions are | * modification, are permitted provided that the following conditions are | ||||
* met: | * met: | ||||
* | * | ||||
* 1. Redistributions of source code must retain the above copyright notice, | * 1. Redistributions of source code must retain the above copyright notice, | ||||
* this list of conditions and the following disclaimer. | * this list of conditions and the following disclaimer. | ||||
Show All 20 Lines | |||||
* those of the authors and should not be interpreted as representing | * those of the authors and should not be interpreted as representing | ||||
* official policies,either expressed or implied, of the FreeBSD Project. | * official policies,either expressed or implied, of the FreeBSD Project. | ||||
* | * | ||||
* Mail to: Broadcom Inc 1320 Ridder Park Dr, San Jose, CA 95131 | * Mail to: Broadcom Inc 1320 Ridder Park Dr, San Jose, CA 95131 | ||||
* | * | ||||
* Broadcom Inc. (Broadcom) MPI3MR Adapter FreeBSD | * Broadcom Inc. (Broadcom) MPI3MR Adapter FreeBSD | ||||
* | * | ||||
*/ | */ | ||||
#ifndef MPI30_IOC_H | #ifndef MPI30_IOC_H | ||||
#define MPI30_IOC_H 1 | #define MPI30_IOC_H 1 | ||||
/***************************************************************************** | /***************************************************************************** | ||||
* IOC Messages * | * IOC Messages * | ||||
****************************************************************************/ | ****************************************************************************/ | ||||
/***************************************************************************** | /***************************************************************************** | ||||
Show All 21 Lines | typedef struct _MPI3_IOC_INIT_REQUEST | ||||
U16 SenseBufferFreeQueueDepth; /* 0x2C */ | U16 SenseBufferFreeQueueDepth; /* 0x2C */ | ||||
U16 SenseBufferLength; /* 0x2E */ | U16 SenseBufferLength; /* 0x2E */ | ||||
U64 SenseBufferFreeQueueAddress; /* 0x30 */ | U64 SenseBufferFreeQueueAddress; /* 0x30 */ | ||||
U64 DriverInformationAddress; /* 0x38 */ | U64 DriverInformationAddress; /* 0x38 */ | ||||
} MPI3_IOC_INIT_REQUEST, MPI3_POINTER PTR_MPI3_IOC_INIT_REQUEST, | } MPI3_IOC_INIT_REQUEST, MPI3_POINTER PTR_MPI3_IOC_INIT_REQUEST, | ||||
Mpi3IOCInitRequest_t, MPI3_POINTER pMpi3IOCInitRequest_t; | Mpi3IOCInitRequest_t, MPI3_POINTER pMpi3IOCInitRequest_t; | ||||
/**** Defines for the MsgFlags field ****/ | /**** Defines for the MsgFlags field ****/ | ||||
#define MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED (0x08) | |||||
#define MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED (0x04) | |||||
#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03) | #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03) | ||||
#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00) | #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00) | ||||
#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SEPARATED (0x01) | #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SEPARATED (0x01) | ||||
#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_INLINE (0x02) | #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_INLINE (0x02) | ||||
#define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_BOTH (0x03) | #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_BOTH (0x03) | ||||
/**** Defines for the WhoInit field ****/ | /**** Defines for the WhoInit field ****/ | ||||
#define MPI3_WHOINIT_NOT_INITIALIZED (0x00) | #define MPI3_WHOINIT_NOT_INITIALIZED (0x00) | ||||
#define MPI3_WHOINIT_ROM_BIOS (0x02) | #define MPI3_WHOINIT_ROM_BIOS (0x02) | ||||
#define MPI3_WHOINIT_HOST_DRIVER (0x03) | #define MPI3_WHOINIT_HOST_DRIVER (0x03) | ||||
#define MPI3_WHOINIT_MANUFACTURER (0x04) | #define MPI3_WHOINIT_MANUFACTURER (0x04) | ||||
/**** Defines for the DriverInformationAddress field */ | /**** Defines for the DriverInformationAddress field */ | ||||
typedef struct _MPI3_DRIVER_INFO_LAYOUT | typedef struct _MPI3_DRIVER_INFO_LAYOUT | ||||
{ | { | ||||
U32 InformationLength; /* 0x00 */ | U32 InformationLength; /* 0x00 */ | ||||
U8 DriverSignature[12]; /* 0x04 */ | U8 DriverSignature[12]; /* 0x04 */ | ||||
U8 OsName[16]; /* 0x10 */ | U8 OsName[16]; /* 0x10 */ | ||||
U8 OsVersion[12]; /* 0x20 */ | U8 OsVersion[12]; /* 0x20 */ | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | typedef struct _MPI3_IOC_FACTS_DATA | ||||
U8 MaxHostPDNsCount; /* 0x5C */ | U8 MaxHostPDNsCount; /* 0x5C */ | ||||
U8 MaxAdvHostPDNsCount; /* 0x5D */ | U8 MaxAdvHostPDNsCount; /* 0x5D */ | ||||
U8 MaxRAIDPDNsCount; /* 0x5E */ | U8 MaxRAIDPDNsCount; /* 0x5E */ | ||||
U8 MaxDevicesPerThrottleGroup; /* 0x5F */ | U8 MaxDevicesPerThrottleGroup; /* 0x5F */ | ||||
U16 IOThrottleDataLength; /* 0x60 */ | U16 IOThrottleDataLength; /* 0x60 */ | ||||
U16 MaxIOThrottleGroup; /* 0x62 */ | U16 MaxIOThrottleGroup; /* 0x62 */ | ||||
U16 IOThrottleLow; /* 0x64 */ | U16 IOThrottleLow; /* 0x64 */ | ||||
U16 IOThrottleHigh; /* 0x66 */ | U16 IOThrottleHigh; /* 0x66 */ | ||||
U32 DiagFdlSize; /* 0x68 */ | |||||
U32 DiagTtySize; /* 0x6C */ | |||||
} MPI3_IOC_FACTS_DATA, MPI3_POINTER PTR_MPI3_IOC_FACTS_DATA, | } MPI3_IOC_FACTS_DATA, MPI3_POINTER PTR_MPI3_IOC_FACTS_DATA, | ||||
Mpi3IOCFactsData_t, MPI3_POINTER pMpi3IOCFactsData_t; | Mpi3IOCFactsData_t, MPI3_POINTER pMpi3IOCFactsData_t; | ||||
/**** Defines for the IOCCapabilities field ****/ | /**** Defines for the IOCCapabilities field ****/ | ||||
#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_MASK (0x80000000) | #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_MASK (0x80000000) | ||||
#define MPI3_IOCFACTS_CAPABILITY_SUPERVISOR_IOC (0x00000000) | #define MPI3_IOCFACTS_CAPABILITY_SUPERVISOR_IOC (0x00000000) | ||||
#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x80000000) | #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x80000000) | ||||
#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_MASK (0x00000600) | #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_MASK (0x00000600) | ||||
#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_FIXED_THRESHOLD (0x00000000) | #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_FIXED_THRESHOLD (0x00000000) | ||||
#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_OUTSTANDING_IO (0x00000200) | #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_OUTSTANDING_IO (0x00000200) | ||||
#define MPI3_IOCFACTS_CAPABILITY_COMPLETE_RESET_CAPABLE (0x00000100) | #define MPI3_IOCFACTS_CAPABILITY_COMPLETE_RESET_SUPPORTED (0x00000100) | ||||
#define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_TRACE_ENABLED (0x00000080) | #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_TRACE_SUPPORTED (0x00000080) | ||||
#define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_FW_ENABLED (0x00000040) | #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_FW_SUPPORTED (0x00000040) | ||||
#define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_DRIVER_ENABLED (0x00000020) | #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_DRIVER_SUPPORTED (0x00000020) | ||||
#define MPI3_IOCFACTS_CAPABILITY_ADVANCED_HOST_PD_ENABLED (0x00000010) | #define MPI3_IOCFACTS_CAPABILITY_ADVANCED_HOST_PD_SUPPORTED (0x00000010) | ||||
#define MPI3_IOCFACTS_CAPABILITY_RAID_CAPABLE (0x00000008) | #define MPI3_IOCFACTS_CAPABILITY_RAID_SUPPORTED (0x00000008) | ||||
#define MPI3_IOCFACTS_CAPABILITY_MULTIPATH_ENABLED (0x00000002) | #define MPI3_IOCFACTS_CAPABILITY_MULTIPATH_SUPPORTED (0x00000002) | ||||
#define MPI3_IOCFACTS_CAPABILITY_COALESCE_CTRL_SUPPORTED (0x00000001) | #define MPI3_IOCFACTS_CAPABILITY_COALESCE_CTRL_SUPPORTED (0x00000001) | ||||
/**** WhoInit values are defined under IOCInit Request Message definition ****/ | /**** WhoInit values are defined under IOCInit Request Message definition ****/ | ||||
/**** Defines for the ProductID field ****/ | /**** Defines for the ProductID field ****/ | ||||
#define MPI3_IOCFACTS_PID_TYPE_MASK (0xF000) | #define MPI3_IOCFACTS_PID_TYPE_MASK (0xF000) | ||||
#define MPI3_IOCFACTS_PID_TYPE_SHIFT (12) | #define MPI3_IOCFACTS_PID_TYPE_SHIFT (12) | ||||
#define MPI3_IOCFACTS_PID_PRODUCT_MASK (0x0F00) | #define MPI3_IOCFACTS_PID_PRODUCT_MASK (0x0F00) | ||||
Show All 28 Lines | |||||
#define MPI3_IOCFACTS_PROTOCOL_NVME (0x0004) | #define MPI3_IOCFACTS_PROTOCOL_NVME (0x0004) | ||||
#define MPI3_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002) | #define MPI3_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002) | ||||
#define MPI3_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001) | #define MPI3_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001) | ||||
/**** Defines for the MaxDataLength field ****/ | /**** Defines for the MaxDataLength field ****/ | ||||
#define MPI3_IOCFACTS_MAX_DATA_LENGTH_NOT_REPORTED (0x0000) | #define MPI3_IOCFACTS_MAX_DATA_LENGTH_NOT_REPORTED (0x0000) | ||||
/**** Defines for the Flags field ****/ | /**** Defines for the Flags field ****/ | ||||
#define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000) | #define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000) | ||||
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000FF00) | #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000FF00) | ||||
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8) | #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8) | ||||
#define MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT (0x00000040) | |||||
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030) | #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030) | ||||
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000) | #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000) | ||||
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_IN_PROGRESS (0x00000010) | #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_IN_PROGRESS (0x00000010) | ||||
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_COMPLETE (0x00000020) | #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_COMPLETE (0x00000020) | ||||
#define MPI3_IOCFACTS_FLAGS_PERSONALITY_MASK (0x0000000F) | #define MPI3_IOCFACTS_FLAGS_PERSONALITY_MASK (0x0000000F) | ||||
#define MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA (0x00000000) | #define MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA (0x00000000) | ||||
#define MPI3_IOCFACTS_FLAGS_PERSONALITY_RAID_DDR (0x00000002) | #define MPI3_IOCFACTS_FLAGS_PERSONALITY_RAID_DDR (0x00000002) | ||||
/**** Defines for the IOThrottleDataLength field ****/ | /**** Defines for the IOThrottleDataLength field ****/ | ||||
#define MPI3_IOCFACTS_IO_THROTTLE_DATA_LENGTH_NOT_REQUIRED (0x0000) | #define MPI3_IOCFACTS_IO_THROTTLE_DATA_LENGTH_NOT_REQUIRED (0x0000) | ||||
/**** Defines for the IOThrottleDataLength field ****/ | /**** Defines for the MaxIOThrottleGroup field ****/ | ||||
#define MPI3_IOCFACTS_MAX_IO_THROTTLE_GROUP_NOT_REQUIRED (0x0000) | #define MPI3_IOCFACTS_MAX_IO_THROTTLE_GROUP_NOT_REQUIRED (0x0000) | ||||
/**** Defines for the DiagFdlSize field ****/ | |||||
#define MPI3_IOCFACTS_DIAGFDLSIZE_NOT_SUPPORTED (0x00000000) | |||||
/**** Defines for the DiagTtySize field ****/ | |||||
#define MPI3_IOCFACTS_DIAGTTYSIZE_NOT_SUPPORTED (0x00000000) | |||||
/***************************************************************************** | /***************************************************************************** | ||||
* Management Passthrough Request Message * | * Management Passthrough Request Message * | ||||
****************************************************************************/ | ****************************************************************************/ | ||||
typedef struct _MPI3_MGMT_PASSTHROUGH_REQUEST | typedef struct _MPI3_MGMT_PASSTHROUGH_REQUEST | ||||
{ | { | ||||
U16 HostTag; /* 0x00 */ | U16 HostTag; /* 0x00 */ | ||||
U8 IOCUseOnly02; /* 0x02 */ | U8 IOCUseOnly02; /* 0x02 */ | ||||
U8 Function; /* 0x03 */ | U8 Function; /* 0x03 */ | ||||
▲ Show 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | typedef struct _MPI3_EVENT_NOTIFICATION_REQUEST | ||||
U16 ChangeCount; /* 0x08 */ | U16 ChangeCount; /* 0x08 */ | ||||
U16 Reserved0A; /* 0x0A */ | U16 Reserved0A; /* 0x0A */ | ||||
U16 SASBroadcastPrimitiveMasks; /* 0x0C */ | U16 SASBroadcastPrimitiveMasks; /* 0x0C */ | ||||
U16 SASNotifyPrimitiveMasks; /* 0x0E */ | U16 SASNotifyPrimitiveMasks; /* 0x0E */ | ||||
U32 EventMasks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS]; /* 0x10 */ | U32 EventMasks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS]; /* 0x10 */ | ||||
} MPI3_EVENT_NOTIFICATION_REQUEST, MPI3_POINTER PTR_MPI3_EVENT_NOTIFICATION_REQUEST, | } MPI3_EVENT_NOTIFICATION_REQUEST, MPI3_POINTER PTR_MPI3_EVENT_NOTIFICATION_REQUEST, | ||||
Mpi3EventNotificationRequest_t, MPI3_POINTER pMpi3EventNotificationRequest_t; | Mpi3EventNotificationRequest_t, MPI3_POINTER pMpi3EventNotificationRequest_t; | ||||
/**** Defines for the SASBroadcastPrimitiveMasks field - use MPI3_EVENT_PRIMITIVE_ values ****/ | /**** Defines for the SASBroadcastPrimitiveMasks field - use MPI3_EVENT_BROADCAST_PRIMITIVE_ values ****/ | ||||
/**** Defines for the SASNotifyPrimitiveMasks field - use MPI3_EVENT_NOTIFY_ values ****/ | /**** Defines for the SASNotifyPrimitiveMasks field - use MPI3_EVENT_NOTIFY_PRIMITIVE_ values ****/ | ||||
/**** Defines for the EventMasks field - use MPI3_EVENT_ values ****/ | /**** Defines for the EventMasks field - use MPI3_EVENT_ values ****/ | ||||
/***************************************************************************** | /***************************************************************************** | ||||
* Event Notification Reply Message * | * Event Notification Reply Message * | ||||
****************************************************************************/ | ****************************************************************************/ | ||||
typedef struct _MPI3_EVENT_NOTIFICATION_REPLY | typedef struct _MPI3_EVENT_NOTIFICATION_REPLY | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | |||||
#ifndef MPI3_EVENT_SAS_TOPO_PHY_COUNT | #ifndef MPI3_EVENT_SAS_TOPO_PHY_COUNT | ||||
#define MPI3_EVENT_SAS_TOPO_PHY_COUNT (1) | #define MPI3_EVENT_SAS_TOPO_PHY_COUNT (1) | ||||
#endif /* MPI3_EVENT_SAS_TOPO_PHY_COUNT */ | #endif /* MPI3_EVENT_SAS_TOPO_PHY_COUNT */ | ||||
typedef struct _MPI3_EVENT_SAS_TOPO_PHY_ENTRY | typedef struct _MPI3_EVENT_SAS_TOPO_PHY_ENTRY | ||||
{ | { | ||||
U16 AttachedDevHandle; /* 0x00 */ | U16 AttachedDevHandle; /* 0x00 */ | ||||
U8 LinkRate; /* 0x02 */ | U8 LinkRate; /* 0x02 */ | ||||
U8 Status; /* 0x03 */ | U8 PhyStatus; /* 0x03 */ | ||||
} MPI3_EVENT_SAS_TOPO_PHY_ENTRY, MPI3_POINTER PTR_MPI3_EVENT_SAS_TOPO_PHY_ENTRY, | } MPI3_EVENT_SAS_TOPO_PHY_ENTRY, MPI3_POINTER PTR_MPI3_EVENT_SAS_TOPO_PHY_ENTRY, | ||||
Mpi3EventSasTopoPhyEntry_t, MPI3_POINTER pMpi3EventSasTopoPhyEntry_t; | Mpi3EventSasTopoPhyEntry_t, MPI3_POINTER pMpi3EventSasTopoPhyEntry_t; | ||||
/**** Defines for the LinkRate field ****/ | /**** Defines for the LinkRate field ****/ | ||||
#define MPI3_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0) | #define MPI3_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0) | ||||
#define MPI3_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4) | #define MPI3_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4) | ||||
#define MPI3_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F) | #define MPI3_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F) | ||||
#define MPI3_EVENT_SAS_TOPO_LR_PREV_SHIFT (0) | #define MPI3_EVENT_SAS_TOPO_LR_PREV_SHIFT (0) | ||||
▲ Show 20 Lines • Show All 888 Lines • Show Last 20 Lines |