mpt3sas_trigger_pages.h (3872B)
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2 3/* 4 * This is the Fusion MPT base driver providing common API layer interface 5 * to store diag trigger values into persistent driver triggers pages 6 * for MPT (Message Passing Technology) based controllers. 7 * 8 * Copyright (C) 2020 Broadcom Inc. 9 * 10 * Authors: Broadcom Inc. 11 * Sreekanth Reddy <sreekanth.reddy@broadcom.com> 12 * 13 * Send feedback to : MPT-FusionLinux.pdl@broadcom.com) 14 */ 15 16#include "mpi/mpi2_cnfg.h" 17 18#ifndef MPI2_TRIGGER_PAGES_H 19#define MPI2_TRIGGER_PAGES_H 20 21#define MPI2_CONFIG_EXTPAGETYPE_DRIVER_PERSISTENT_TRIGGER (0xE0) 22#define MPI26_DRIVER_TRIGGER_PAGE0_PAGEVERSION (0x01) 23typedef struct _MPI26_CONFIG_PAGE_DRIVER_TIGGER_0 { 24 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ 25 U16 TriggerFlags; /* 0x08 */ 26 U16 Reserved0xA; /* 0x0A */ 27 U32 Reserved0xC[61]; /* 0x0C */ 28} _MPI26_CONFIG_PAGE_DRIVER_TIGGER_0, Mpi26DriverTriggerPage0_t; 29 30/* Trigger Flags */ 31#define MPI26_DRIVER_TRIGGER0_FLAG_MASTER_TRIGGER_VALID (0x0001) 32#define MPI26_DRIVER_TRIGGER0_FLAG_MPI_EVENT_TRIGGER_VALID (0x0002) 33#define MPI26_DRIVER_TRIGGER0_FLAG_SCSI_SENSE_TRIGGER_VALID (0x0004) 34#define MPI26_DRIVER_TRIGGER0_FLAG_LOGINFO_TRIGGER_VALID (0x0008) 35 36#define MPI26_DRIVER_TRIGGER_PAGE1_PAGEVERSION (0x01) 37typedef struct _MPI26_DRIVER_MASTER_TIGGER_ENTRY { 38 U32 MasterTriggerFlags; 39} MPI26_DRIVER_MASTER_TIGGER_ENTRY; 40 41#define MPI26_MAX_MASTER_TRIGGERS (1) 42typedef struct _MPI26_CONFIG_PAGE_DRIVER_TIGGER_1 { 43 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ 44 U16 NumMasterTrigger; /* 0x08 */ 45 U16 Reserved0xA; /* 0x0A */ 46 MPI26_DRIVER_MASTER_TIGGER_ENTRY MasterTriggers[MPI26_MAX_MASTER_TRIGGERS]; /* 0x0C */ 47} MPI26_CONFIG_PAGE_DRIVER_TIGGER_1, Mpi26DriverTriggerPage1_t; 48 49#define MPI26_DRIVER_TRIGGER_PAGE2_PAGEVERSION (0x01) 50typedef struct _MPI26_DRIVER_MPI_EVENT_TIGGER_ENTRY { 51 U16 MPIEventCode; /* 0x00 */ 52 U16 MPIEventCodeSpecific; /* 0x02 */ 53} MPI26_DRIVER_MPI_EVENT_TIGGER_ENTRY; 54 55#define MPI26_MAX_MPI_EVENT_TRIGGERS (20) 56typedef struct _MPI26_CONFIG_PAGE_DRIVER_TIGGER_2 { 57 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ 58 U16 NumMPIEventTrigger; /* 0x08 */ 59 U16 Reserved0xA; /* 0x0A */ 60 MPI26_DRIVER_MPI_EVENT_TIGGER_ENTRY MPIEventTriggers[MPI26_MAX_MPI_EVENT_TRIGGERS]; /* 0x0C */ 61} MPI26_CONFIG_PAGE_DRIVER_TIGGER_2, Mpi26DriverTriggerPage2_t; 62 63#define MPI26_DRIVER_TRIGGER_PAGE3_PAGEVERSION (0x01) 64typedef struct _MPI26_DRIVER_SCSI_SENSE_TIGGER_ENTRY { 65 U8 ASCQ; /* 0x00 */ 66 U8 ASC; /* 0x01 */ 67 U8 SenseKey; /* 0x02 */ 68 U8 Reserved; /* 0x03 */ 69} MPI26_DRIVER_SCSI_SENSE_TIGGER_ENTRY; 70 71#define MPI26_MAX_SCSI_SENSE_TRIGGERS (20) 72typedef struct _MPI26_CONFIG_PAGE_DRIVER_TIGGER_3 { 73 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ 74 U16 NumSCSISenseTrigger; /* 0x08 */ 75 U16 Reserved0xA; /* 0x0A */ 76 MPI26_DRIVER_SCSI_SENSE_TIGGER_ENTRY SCSISenseTriggers[MPI26_MAX_SCSI_SENSE_TRIGGERS]; /* 0x0C */ 77} MPI26_CONFIG_PAGE_DRIVER_TIGGER_3, Mpi26DriverTriggerPage3_t; 78 79#define MPI26_DRIVER_TRIGGER_PAGE4_PAGEVERSION (0x01) 80typedef struct _MPI26_DRIVER_IOCSTATUS_LOGINFO_TIGGER_ENTRY { 81 U16 IOCStatus; /* 0x00 */ 82 U16 Reserved; /* 0x02 */ 83 U32 LogInfo; /* 0x04 */ 84} MPI26_DRIVER_IOCSTATUS_LOGINFO_TIGGER_ENTRY; 85 86#define MPI26_MAX_LOGINFO_TRIGGERS (20) 87typedef struct _MPI26_CONFIG_PAGE_DRIVER_TIGGER_4 { 88 MPI2_CONFIG_EXTENDED_PAGE_HEADER Header; /* 0x00 */ 89 U16 NumIOCStatusLogInfoTrigger; /* 0x08 */ 90 U16 Reserved0xA; /* 0x0A */ 91 MPI26_DRIVER_IOCSTATUS_LOGINFO_TIGGER_ENTRY IOCStatusLoginfoTriggers[MPI26_MAX_LOGINFO_TRIGGERS]; /* 0x0C */ 92} MPI26_CONFIG_PAGE_DRIVER_TIGGER_4, Mpi26DriverTriggerPage4_t; 93 94#endif