Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /*******************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2)  * This file is part of the Emulex Linux Device Driver for         *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Fibre Channel Host Bus Adapters.                                *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.     *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * Copyright (C) 2010 Emulex.  All rights reserved.                *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  * EMULEX and SLI are trademarks of Emulex.                        *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * www.broadcom.com                                                *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  *                                                                 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  * This program is free software; you can redistribute it and/or   *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  * modify it under the terms of version 2 of the GNU General       *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * Public License as published by the Free Software Foundation.    *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  * This program is distributed in the hope that it will be useful. *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND          *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE      *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * TO BE LEGALLY INVALID.  See the GNU General Public License for  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  * more details, a copy of which can be found in the file COPYING  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  * included with this package.                                     *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  *******************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) /* Event definitions for RegisterForEvent */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #define FC_REG_LINK_EVENT		0x0001	/* link up / down events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define FC_REG_RSCN_EVENT		0x0002	/* RSCN events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #define FC_REG_CT_EVENT			0x0004	/* CT request events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #define FC_REG_DUMP_EVENT		0x0010	/* Dump events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define FC_REG_TEMPERATURE_EVENT	0x0020	/* temperature events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define FC_REG_VPORTRSCN_EVENT		0x0040	/* Vport RSCN events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define FC_REG_ELS_EVENT		0x0080	/* lpfc els events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #define FC_REG_FABRIC_EVENT		0x0100	/* lpfc fabric events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #define FC_REG_SCSI_EVENT		0x0200	/* lpfc scsi events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #define FC_REG_BOARD_EVENT		0x0400	/* lpfc board events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #define FC_REG_ADAPTER_EVENT		0x0800	/* lpfc adapter events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #define FC_REG_EVENT_MASK		(FC_REG_LINK_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 						FC_REG_RSCN_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 						FC_REG_CT_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 						FC_REG_DUMP_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 						FC_REG_TEMPERATURE_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 						FC_REG_VPORTRSCN_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 						FC_REG_ELS_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 						FC_REG_FABRIC_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 						FC_REG_SCSI_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 						FC_REG_BOARD_EVENT | \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 						FC_REG_ADAPTER_EVENT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) /* Temperature events */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) #define LPFC_CRIT_TEMP		0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #define LPFC_THRESHOLD_TEMP	0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #define LPFC_NORMAL_TEMP	0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)  * All net link event payloads will begin with and event type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)  * and subcategory. The event type must come first.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)  * The subcategory further defines the data that follows in the rest
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)  * of the payload. Each category will have its own unique header plus
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)  * any additional data unique to the subcategory.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)  * The payload sent via the fc transport is one-way driver->application.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) /* RSCN event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) struct lpfc_rscn_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	uint32_t payload_length; /* RSCN data length in bytes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	uint32_t rscn_payload[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) /* els event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) struct lpfc_els_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	uint32_t subcategory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	uint8_t wwpn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	uint8_t wwnn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) /* subcategory codes for FC_REG_ELS_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) #define LPFC_EVENT_PLOGI_RCV		0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) #define LPFC_EVENT_PRLO_RCV		0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) #define LPFC_EVENT_ADISC_RCV		0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) #define LPFC_EVENT_LSRJT_RCV		0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) #define LPFC_EVENT_LOGO_RCV		0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) /* special els lsrjt event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) struct lpfc_lsrjt_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	struct lpfc_els_event_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	uint32_t command;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	uint32_t reason_code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	uint32_t explanation;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) /* special els logo event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) struct lpfc_logo_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	struct lpfc_els_event_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	uint8_t logo_wwpn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) /* fabric event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) struct lpfc_fabric_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	uint32_t subcategory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	uint8_t wwpn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	uint8_t wwnn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) /* subcategory codes for FC_REG_FABRIC_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) #define LPFC_EVENT_FABRIC_BUSY		0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) #define LPFC_EVENT_PORT_BUSY		0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) #define LPFC_EVENT_FCPRDCHKERR		0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) /* special case fabric fcprdchkerr event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct lpfc_fcprdchkerr_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	struct lpfc_fabric_event_header header;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	uint32_t lun;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 	uint32_t opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 	uint32_t fcpiparam;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) /* scsi event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) struct lpfc_scsi_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	uint32_t subcategory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	uint32_t lun;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	uint8_t wwpn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	uint8_t wwnn[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /* subcategory codes for FC_REG_SCSI_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) #define LPFC_EVENT_QFULL	0x0001
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) #define LPFC_EVENT_DEVBSY	0x0002
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #define LPFC_EVENT_CHECK_COND	0x0004
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) #define LPFC_EVENT_LUNRESET	0x0008
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #define LPFC_EVENT_TGTRESET	0x0010
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) #define LPFC_EVENT_BUSRESET	0x0020
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) #define LPFC_EVENT_VARQUEDEPTH	0x0040
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) /* special case scsi varqueuedepth event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) struct lpfc_scsi_varqueuedepth_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	struct lpfc_scsi_event_header scsi_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	uint32_t oldval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	uint32_t newval;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) /* special case scsi check condition event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) struct lpfc_scsi_check_condition_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	struct lpfc_scsi_event_header scsi_event;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	uint8_t opcode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	uint8_t sense_key;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	uint8_t asc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	uint8_t ascq;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) /* event codes for FC_REG_BOARD_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #define LPFC_EVENT_PORTINTERR		0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) /* board event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) struct lpfc_board_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	uint32_t subcategory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /* event codes for FC_REG_ADAPTER_EVENT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define LPFC_EVENT_ARRIVAL	0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /* adapter event header */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) struct lpfc_adapter_event_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	uint32_t subcategory;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /* event codes for temp_event */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) #define LPFC_CRIT_TEMP		0x1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #define LPFC_THRESHOLD_TEMP	0x2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) #define LPFC_NORMAL_TEMP	0x3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) struct temp_event {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	uint32_t event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	uint32_t event_code;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	uint32_t data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)