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