be_cmds.h 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170
  1. /*
  2. * Copyright (C) 2005 - 2014 Emulex
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License version 2
  7. * as published by the Free Software Foundation. The full GNU General
  8. * Public License is included in this distribution in the file called COPYING.
  9. *
  10. * Contact Information:
  11. * linux-drivers@emulex.com
  12. *
  13. * Emulex
  14. * 3333 Susan Street
  15. * Costa Mesa, CA 92626
  16. */
  17. /*
  18. * The driver sends configuration and managements command requests to the
  19. * firmware in the BE. These requests are communicated to the processor
  20. * using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one
  21. * WRB inside a MAILBOX.
  22. * The commands are serviced by the ARM processor in the BladeEngine's MPU.
  23. */
  24. struct be_sge {
  25. u32 pa_lo;
  26. u32 pa_hi;
  27. u32 len;
  28. };
  29. #define MCC_WRB_EMBEDDED_MASK 1 /* bit 0 of dword 0*/
  30. #define MCC_WRB_SGE_CNT_SHIFT 3 /* bits 3 - 7 of dword 0 */
  31. #define MCC_WRB_SGE_CNT_MASK 0x1F /* bits 3 - 7 of dword 0 */
  32. struct be_mcc_wrb {
  33. u32 embedded; /* dword 0 */
  34. u32 payload_length; /* dword 1 */
  35. u32 tag0; /* dword 2 */
  36. u32 tag1; /* dword 3 */
  37. u32 rsvd; /* dword 4 */
  38. union {
  39. u8 embedded_payload[236]; /* used by embedded cmds */
  40. struct be_sge sgl[19]; /* used by non-embedded cmds */
  41. } payload;
  42. };
  43. #define CQE_FLAGS_VALID_MASK (1 << 31)
  44. #define CQE_FLAGS_ASYNC_MASK (1 << 30)
  45. #define CQE_FLAGS_COMPLETED_MASK (1 << 28)
  46. #define CQE_FLAGS_CONSUMED_MASK (1 << 27)
  47. /* Completion Status */
  48. enum mcc_base_status {
  49. MCC_STATUS_SUCCESS = 0,
  50. MCC_STATUS_FAILED = 1,
  51. MCC_STATUS_ILLEGAL_REQUEST = 2,
  52. MCC_STATUS_ILLEGAL_FIELD = 3,
  53. MCC_STATUS_INSUFFICIENT_BUFFER = 4,
  54. MCC_STATUS_UNAUTHORIZED_REQUEST = 5,
  55. MCC_STATUS_NOT_SUPPORTED = 66
  56. };
  57. /* Additional status */
  58. enum mcc_addl_status {
  59. MCC_ADDL_STATUS_INSUFFICIENT_RESOURCES = 0x16,
  60. MCC_ADDL_STATUS_FLASH_IMAGE_CRC_MISMATCH = 0x4d,
  61. MCC_ADDL_STATUS_TOO_MANY_INTERFACES = 0x4a
  62. };
  63. #define CQE_BASE_STATUS_MASK 0xFFFF
  64. #define CQE_BASE_STATUS_SHIFT 0 /* bits 0 - 15 */
  65. #define CQE_ADDL_STATUS_MASK 0xFF
  66. #define CQE_ADDL_STATUS_SHIFT 16 /* bits 16 - 31 */
  67. #define base_status(status) \
  68. ((enum mcc_base_status) \
  69. (status > 0 ? (status & CQE_BASE_STATUS_MASK) : 0))
  70. #define addl_status(status) \
  71. ((enum mcc_addl_status) \
  72. (status > 0 ? (status >> CQE_ADDL_STATUS_SHIFT) & \
  73. CQE_ADDL_STATUS_MASK : 0))
  74. struct be_mcc_compl {
  75. u32 status; /* dword 0 */
  76. u32 tag0; /* dword 1 */
  77. u32 tag1; /* dword 2 */
  78. u32 flags; /* dword 3 */
  79. };
  80. /* When the async bit of mcc_compl flags is set, flags
  81. * is interpreted as follows:
  82. */
  83. #define ASYNC_EVENT_CODE_SHIFT 8 /* bits 8 - 15 */
  84. #define ASYNC_EVENT_CODE_MASK 0xFF
  85. #define ASYNC_EVENT_TYPE_SHIFT 16
  86. #define ASYNC_EVENT_TYPE_MASK 0xFF
  87. #define ASYNC_EVENT_CODE_LINK_STATE 0x1
  88. #define ASYNC_EVENT_CODE_GRP_5 0x5
  89. #define ASYNC_EVENT_QOS_SPEED 0x1
  90. #define ASYNC_EVENT_COS_PRIORITY 0x2
  91. #define ASYNC_EVENT_PVID_STATE 0x3
  92. #define ASYNC_EVENT_CODE_QNQ 0x6
  93. #define ASYNC_DEBUG_EVENT_TYPE_QNQ 1
  94. enum {
  95. LINK_DOWN = 0x0,
  96. LINK_UP = 0x1
  97. };
  98. #define LINK_STATUS_MASK 0x1
  99. #define LOGICAL_LINK_STATUS_MASK 0x2
  100. /* When the event code of compl->flags is link-state, the mcc_compl
  101. * must be interpreted as follows
  102. */
  103. struct be_async_event_link_state {
  104. u8 physical_port;
  105. u8 port_link_status;
  106. u8 port_duplex;
  107. u8 port_speed;
  108. u8 port_fault;
  109. u8 rsvd0[7];
  110. u32 flags;
  111. } __packed;
  112. /* When the event code of compl->flags is GRP-5 and event_type is QOS_SPEED
  113. * the mcc_compl must be interpreted as follows
  114. */
  115. struct be_async_event_grp5_qos_link_speed {
  116. u8 physical_port;
  117. u8 rsvd[5];
  118. u16 qos_link_speed;
  119. u32 event_tag;
  120. u32 flags;
  121. } __packed;
  122. /* When the event code of compl->flags is GRP5 and event type is
  123. * CoS-Priority, the mcc_compl must be interpreted as follows
  124. */
  125. struct be_async_event_grp5_cos_priority {
  126. u8 physical_port;
  127. u8 available_priority_bmap;
  128. u8 reco_default_priority;
  129. u8 valid;
  130. u8 rsvd0;
  131. u8 event_tag;
  132. u32 flags;
  133. } __packed;
  134. /* When the event code of compl->flags is GRP5 and event type is
  135. * PVID state, the mcc_compl must be interpreted as follows
  136. */
  137. struct be_async_event_grp5_pvid_state {
  138. u8 enabled;
  139. u8 rsvd0;
  140. u16 tag;
  141. u32 event_tag;
  142. u32 rsvd1;
  143. u32 flags;
  144. } __packed;
  145. /* async event indicating outer VLAN tag in QnQ */
  146. struct be_async_event_qnq {
  147. u8 valid; /* Indicates if outer VLAN is valid */
  148. u8 rsvd0;
  149. u16 vlan_tag;
  150. u32 event_tag;
  151. u8 rsvd1[4];
  152. u32 flags;
  153. } __packed;
  154. struct be_mcc_mailbox {
  155. struct be_mcc_wrb wrb;
  156. struct be_mcc_compl compl;
  157. };
  158. #define CMD_SUBSYSTEM_COMMON 0x1
  159. #define CMD_SUBSYSTEM_ETH 0x3
  160. #define CMD_SUBSYSTEM_LOWLEVEL 0xb
  161. #define OPCODE_COMMON_NTWK_MAC_QUERY 1
  162. #define OPCODE_COMMON_NTWK_MAC_SET 2
  163. #define OPCODE_COMMON_NTWK_MULTICAST_SET 3
  164. #define OPCODE_COMMON_NTWK_VLAN_CONFIG 4
  165. #define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
  166. #define OPCODE_COMMON_READ_FLASHROM 6
  167. #define OPCODE_COMMON_WRITE_FLASHROM 7
  168. #define OPCODE_COMMON_CQ_CREATE 12
  169. #define OPCODE_COMMON_EQ_CREATE 13
  170. #define OPCODE_COMMON_MCC_CREATE 21
  171. #define OPCODE_COMMON_SET_QOS 28
  172. #define OPCODE_COMMON_MCC_CREATE_EXT 90
  173. #define OPCODE_COMMON_SEEPROM_READ 30
  174. #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES 32
  175. #define OPCODE_COMMON_NTWK_RX_FILTER 34
  176. #define OPCODE_COMMON_GET_FW_VERSION 35
  177. #define OPCODE_COMMON_SET_FLOW_CONTROL 36
  178. #define OPCODE_COMMON_GET_FLOW_CONTROL 37
  179. #define OPCODE_COMMON_SET_FRAME_SIZE 39
  180. #define OPCODE_COMMON_MODIFY_EQ_DELAY 41
  181. #define OPCODE_COMMON_FIRMWARE_CONFIG 42
  182. #define OPCODE_COMMON_NTWK_INTERFACE_CREATE 50
  183. #define OPCODE_COMMON_NTWK_INTERFACE_DESTROY 51
  184. #define OPCODE_COMMON_MCC_DESTROY 53
  185. #define OPCODE_COMMON_CQ_DESTROY 54
  186. #define OPCODE_COMMON_EQ_DESTROY 55
  187. #define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG 58
  188. #define OPCODE_COMMON_NTWK_PMAC_ADD 59
  189. #define OPCODE_COMMON_NTWK_PMAC_DEL 60
  190. #define OPCODE_COMMON_FUNCTION_RESET 61
  191. #define OPCODE_COMMON_MANAGE_FAT 68
  192. #define OPCODE_COMMON_ENABLE_DISABLE_BEACON 69
  193. #define OPCODE_COMMON_GET_BEACON_STATE 70
  194. #define OPCODE_COMMON_READ_TRANSRECV_DATA 73
  195. #define OPCODE_COMMON_GET_PORT_NAME 77
  196. #define OPCODE_COMMON_SET_LOGICAL_LINK_CONFIG 80
  197. #define OPCODE_COMMON_SET_INTERRUPT_ENABLE 89
  198. #define OPCODE_COMMON_SET_FN_PRIVILEGES 100
  199. #define OPCODE_COMMON_GET_PHY_DETAILS 102
  200. #define OPCODE_COMMON_SET_DRIVER_FUNCTION_CAP 103
  201. #define OPCODE_COMMON_GET_CNTL_ADDITIONAL_ATTRIBUTES 121
  202. #define OPCODE_COMMON_GET_EXT_FAT_CAPABILITES 125
  203. #define OPCODE_COMMON_SET_EXT_FAT_CAPABILITES 126
  204. #define OPCODE_COMMON_GET_MAC_LIST 147
  205. #define OPCODE_COMMON_SET_MAC_LIST 148
  206. #define OPCODE_COMMON_GET_HSW_CONFIG 152
  207. #define OPCODE_COMMON_GET_FUNC_CONFIG 160
  208. #define OPCODE_COMMON_GET_PROFILE_CONFIG 164
  209. #define OPCODE_COMMON_SET_PROFILE_CONFIG 165
  210. #define OPCODE_COMMON_GET_ACTIVE_PROFILE 167
  211. #define OPCODE_COMMON_SET_HSW_CONFIG 153
  212. #define OPCODE_COMMON_GET_FN_PRIVILEGES 170
  213. #define OPCODE_COMMON_READ_OBJECT 171
  214. #define OPCODE_COMMON_WRITE_OBJECT 172
  215. #define OPCODE_COMMON_MANAGE_IFACE_FILTERS 193
  216. #define OPCODE_COMMON_GET_IFACE_LIST 194
  217. #define OPCODE_COMMON_ENABLE_DISABLE_VF 196
  218. #define OPCODE_ETH_RSS_CONFIG 1
  219. #define OPCODE_ETH_ACPI_CONFIG 2
  220. #define OPCODE_ETH_PROMISCUOUS 3
  221. #define OPCODE_ETH_GET_STATISTICS 4
  222. #define OPCODE_ETH_TX_CREATE 7
  223. #define OPCODE_ETH_RX_CREATE 8
  224. #define OPCODE_ETH_TX_DESTROY 9
  225. #define OPCODE_ETH_RX_DESTROY 10
  226. #define OPCODE_ETH_ACPI_WOL_MAGIC_CONFIG 12
  227. #define OPCODE_ETH_GET_PPORT_STATS 18
  228. #define OPCODE_LOWLEVEL_HOST_DDR_DMA 17
  229. #define OPCODE_LOWLEVEL_LOOPBACK_TEST 18
  230. #define OPCODE_LOWLEVEL_SET_LOOPBACK_MODE 19
  231. struct be_cmd_req_hdr {
  232. u8 opcode; /* dword 0 */
  233. u8 subsystem; /* dword 0 */
  234. u8 port_number; /* dword 0 */
  235. u8 domain; /* dword 0 */
  236. u32 timeout; /* dword 1 */
  237. u32 request_length; /* dword 2 */
  238. u8 version; /* dword 3 */
  239. u8 rsvd[3]; /* dword 3 */
  240. };
  241. #define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */
  242. #define RESP_HDR_INFO_SUBSYS_SHIFT 8 /* bits 8 - 15 */
  243. struct be_cmd_resp_hdr {
  244. u8 opcode; /* dword 0 */
  245. u8 subsystem; /* dword 0 */
  246. u8 rsvd[2]; /* dword 0 */
  247. u8 base_status; /* dword 1 */
  248. u8 addl_status; /* dword 1 */
  249. u8 rsvd1[2]; /* dword 1 */
  250. u32 response_length; /* dword 2 */
  251. u32 actual_resp_len; /* dword 3 */
  252. };
  253. struct phys_addr {
  254. u32 lo;
  255. u32 hi;
  256. };
  257. /**************************
  258. * BE Command definitions *
  259. **************************/
  260. /* Pseudo amap definition in which each bit of the actual structure is defined
  261. * as a byte: used to calculate offset/shift/mask of each field */
  262. struct amap_eq_context {
  263. u8 cidx[13]; /* dword 0*/
  264. u8 rsvd0[3]; /* dword 0*/
  265. u8 epidx[13]; /* dword 0*/
  266. u8 valid; /* dword 0*/
  267. u8 rsvd1; /* dword 0*/
  268. u8 size; /* dword 0*/
  269. u8 pidx[13]; /* dword 1*/
  270. u8 rsvd2[3]; /* dword 1*/
  271. u8 pd[10]; /* dword 1*/
  272. u8 count[3]; /* dword 1*/
  273. u8 solevent; /* dword 1*/
  274. u8 stalled; /* dword 1*/
  275. u8 armed; /* dword 1*/
  276. u8 rsvd3[4]; /* dword 2*/
  277. u8 func[8]; /* dword 2*/
  278. u8 rsvd4; /* dword 2*/
  279. u8 delaymult[10]; /* dword 2*/
  280. u8 rsvd5[2]; /* dword 2*/
  281. u8 phase[2]; /* dword 2*/
  282. u8 nodelay; /* dword 2*/
  283. u8 rsvd6[4]; /* dword 2*/
  284. u8 rsvd7[32]; /* dword 3*/
  285. } __packed;
  286. struct be_cmd_req_eq_create {
  287. struct be_cmd_req_hdr hdr;
  288. u16 num_pages; /* sword */
  289. u16 rsvd0; /* sword */
  290. u8 context[sizeof(struct amap_eq_context) / 8];
  291. struct phys_addr pages[8];
  292. } __packed;
  293. struct be_cmd_resp_eq_create {
  294. struct be_cmd_resp_hdr resp_hdr;
  295. u16 eq_id; /* sword */
  296. u16 msix_idx; /* available only in v2 */
  297. } __packed;
  298. /******************** Mac query ***************************/
  299. enum {
  300. MAC_ADDRESS_TYPE_STORAGE = 0x0,
  301. MAC_ADDRESS_TYPE_NETWORK = 0x1,
  302. MAC_ADDRESS_TYPE_PD = 0x2,
  303. MAC_ADDRESS_TYPE_MANAGEMENT = 0x3
  304. };
  305. struct mac_addr {
  306. u16 size_of_struct;
  307. u8 addr[ETH_ALEN];
  308. } __packed;
  309. struct be_cmd_req_mac_query {
  310. struct be_cmd_req_hdr hdr;
  311. u8 type;
  312. u8 permanent;
  313. u16 if_id;
  314. u32 pmac_id;
  315. } __packed;
  316. struct be_cmd_resp_mac_query {
  317. struct be_cmd_resp_hdr hdr;
  318. struct mac_addr mac;
  319. };
  320. /******************** PMac Add ***************************/
  321. struct be_cmd_req_pmac_add {
  322. struct be_cmd_req_hdr hdr;
  323. u32 if_id;
  324. u8 mac_address[ETH_ALEN];
  325. u8 rsvd0[2];
  326. } __packed;
  327. struct be_cmd_resp_pmac_add {
  328. struct be_cmd_resp_hdr hdr;
  329. u32 pmac_id;
  330. };
  331. /******************** PMac Del ***************************/
  332. struct be_cmd_req_pmac_del {
  333. struct be_cmd_req_hdr hdr;
  334. u32 if_id;
  335. u32 pmac_id;
  336. };
  337. /******************** Create CQ ***************************/
  338. /* Pseudo amap definition in which each bit of the actual structure is defined
  339. * as a byte: used to calculate offset/shift/mask of each field */
  340. struct amap_cq_context_be {
  341. u8 cidx[11]; /* dword 0*/
  342. u8 rsvd0; /* dword 0*/
  343. u8 coalescwm[2]; /* dword 0*/
  344. u8 nodelay; /* dword 0*/
  345. u8 epidx[11]; /* dword 0*/
  346. u8 rsvd1; /* dword 0*/
  347. u8 count[2]; /* dword 0*/
  348. u8 valid; /* dword 0*/
  349. u8 solevent; /* dword 0*/
  350. u8 eventable; /* dword 0*/
  351. u8 pidx[11]; /* dword 1*/
  352. u8 rsvd2; /* dword 1*/
  353. u8 pd[10]; /* dword 1*/
  354. u8 eqid[8]; /* dword 1*/
  355. u8 stalled; /* dword 1*/
  356. u8 armed; /* dword 1*/
  357. u8 rsvd3[4]; /* dword 2*/
  358. u8 func[8]; /* dword 2*/
  359. u8 rsvd4[20]; /* dword 2*/
  360. u8 rsvd5[32]; /* dword 3*/
  361. } __packed;
  362. struct amap_cq_context_v2 {
  363. u8 rsvd0[12]; /* dword 0*/
  364. u8 coalescwm[2]; /* dword 0*/
  365. u8 nodelay; /* dword 0*/
  366. u8 rsvd1[12]; /* dword 0*/
  367. u8 count[2]; /* dword 0*/
  368. u8 valid; /* dword 0*/
  369. u8 rsvd2; /* dword 0*/
  370. u8 eventable; /* dword 0*/
  371. u8 eqid[16]; /* dword 1*/
  372. u8 rsvd3[15]; /* dword 1*/
  373. u8 armed; /* dword 1*/
  374. u8 rsvd4[32]; /* dword 2*/
  375. u8 rsvd5[32]; /* dword 3*/
  376. } __packed;
  377. struct be_cmd_req_cq_create {
  378. struct be_cmd_req_hdr hdr;
  379. u16 num_pages;
  380. u8 page_size;
  381. u8 rsvd0;
  382. u8 context[sizeof(struct amap_cq_context_be) / 8];
  383. struct phys_addr pages[8];
  384. } __packed;
  385. struct be_cmd_resp_cq_create {
  386. struct be_cmd_resp_hdr hdr;
  387. u16 cq_id;
  388. u16 rsvd0;
  389. } __packed;
  390. struct be_cmd_req_get_fat {
  391. struct be_cmd_req_hdr hdr;
  392. u32 fat_operation;
  393. u32 read_log_offset;
  394. u32 read_log_length;
  395. u32 data_buffer_size;
  396. u32 data_buffer[1];
  397. } __packed;
  398. struct be_cmd_resp_get_fat {
  399. struct be_cmd_resp_hdr hdr;
  400. u32 log_size;
  401. u32 read_log_length;
  402. u32 rsvd[2];
  403. u32 data_buffer[1];
  404. } __packed;
  405. /******************** Create MCCQ ***************************/
  406. /* Pseudo amap definition in which each bit of the actual structure is defined
  407. * as a byte: used to calculate offset/shift/mask of each field */
  408. struct amap_mcc_context_be {
  409. u8 con_index[14];
  410. u8 rsvd0[2];
  411. u8 ring_size[4];
  412. u8 fetch_wrb;
  413. u8 fetch_r2t;
  414. u8 cq_id[10];
  415. u8 prod_index[14];
  416. u8 fid[8];
  417. u8 pdid[9];
  418. u8 valid;
  419. u8 rsvd1[32];
  420. u8 rsvd2[32];
  421. } __packed;
  422. struct amap_mcc_context_v1 {
  423. u8 async_cq_id[16];
  424. u8 ring_size[4];
  425. u8 rsvd0[12];
  426. u8 rsvd1[31];
  427. u8 valid;
  428. u8 async_cq_valid[1];
  429. u8 rsvd2[31];
  430. u8 rsvd3[32];
  431. } __packed;
  432. struct be_cmd_req_mcc_create {
  433. struct be_cmd_req_hdr hdr;
  434. u16 num_pages;
  435. u16 cq_id;
  436. u8 context[sizeof(struct amap_mcc_context_be) / 8];
  437. struct phys_addr pages[8];
  438. } __packed;
  439. struct be_cmd_req_mcc_ext_create {
  440. struct be_cmd_req_hdr hdr;
  441. u16 num_pages;
  442. u16 cq_id;
  443. u32 async_event_bitmap[1];
  444. u8 context[sizeof(struct amap_mcc_context_v1) / 8];
  445. struct phys_addr pages[8];
  446. } __packed;
  447. struct be_cmd_resp_mcc_create {
  448. struct be_cmd_resp_hdr hdr;
  449. u16 id;
  450. u16 rsvd0;
  451. } __packed;
  452. /******************** Create TxQ ***************************/
  453. #define BE_ETH_TX_RING_TYPE_STANDARD 2
  454. #define BE_ULP1_NUM 1
  455. struct be_cmd_req_eth_tx_create {
  456. struct be_cmd_req_hdr hdr;
  457. u8 num_pages;
  458. u8 ulp_num;
  459. u16 type;
  460. u16 if_id;
  461. u8 queue_size;
  462. u8 rsvd0;
  463. u32 rsvd1;
  464. u16 cq_id;
  465. u16 rsvd2;
  466. u32 rsvd3[13];
  467. struct phys_addr pages[8];
  468. } __packed;
  469. struct be_cmd_resp_eth_tx_create {
  470. struct be_cmd_resp_hdr hdr;
  471. u16 cid;
  472. u16 rid;
  473. u32 db_offset;
  474. u32 rsvd0[4];
  475. } __packed;
  476. /******************** Create RxQ ***************************/
  477. struct be_cmd_req_eth_rx_create {
  478. struct be_cmd_req_hdr hdr;
  479. u16 cq_id;
  480. u8 frag_size;
  481. u8 num_pages;
  482. struct phys_addr pages[2];
  483. u32 interface_id;
  484. u16 max_frame_size;
  485. u16 rsvd0;
  486. u32 rss_queue;
  487. } __packed;
  488. struct be_cmd_resp_eth_rx_create {
  489. struct be_cmd_resp_hdr hdr;
  490. u16 id;
  491. u8 rss_id;
  492. u8 rsvd0;
  493. } __packed;
  494. /******************** Q Destroy ***************************/
  495. /* Type of Queue to be destroyed */
  496. enum {
  497. QTYPE_EQ = 1,
  498. QTYPE_CQ,
  499. QTYPE_TXQ,
  500. QTYPE_RXQ,
  501. QTYPE_MCCQ
  502. };
  503. struct be_cmd_req_q_destroy {
  504. struct be_cmd_req_hdr hdr;
  505. u16 id;
  506. u16 bypass_flush; /* valid only for rx q destroy */
  507. } __packed;
  508. /************ I/f Create (it's actually I/f Config Create)**********/
  509. /* Capability flags for the i/f */
  510. enum be_if_flags {
  511. BE_IF_FLAGS_RSS = 0x4,
  512. BE_IF_FLAGS_PROMISCUOUS = 0x8,
  513. BE_IF_FLAGS_BROADCAST = 0x10,
  514. BE_IF_FLAGS_UNTAGGED = 0x20,
  515. BE_IF_FLAGS_ULP = 0x40,
  516. BE_IF_FLAGS_VLAN_PROMISCUOUS = 0x80,
  517. BE_IF_FLAGS_VLAN = 0x100,
  518. BE_IF_FLAGS_MCAST_PROMISCUOUS = 0x200,
  519. BE_IF_FLAGS_PASS_L2_ERRORS = 0x400,
  520. BE_IF_FLAGS_PASS_L3L4_ERRORS = 0x800,
  521. BE_IF_FLAGS_MULTICAST = 0x1000
  522. };
  523. #define BE_IF_CAP_FLAGS_WANT (BE_IF_FLAGS_RSS | BE_IF_FLAGS_PROMISCUOUS |\
  524. BE_IF_FLAGS_BROADCAST | BE_IF_FLAGS_VLAN_PROMISCUOUS |\
  525. BE_IF_FLAGS_VLAN | BE_IF_FLAGS_MCAST_PROMISCUOUS |\
  526. BE_IF_FLAGS_PASS_L3L4_ERRORS | BE_IF_FLAGS_MULTICAST |\
  527. BE_IF_FLAGS_UNTAGGED)
  528. /* An RX interface is an object with one or more MAC addresses and
  529. * filtering capabilities. */
  530. struct be_cmd_req_if_create {
  531. struct be_cmd_req_hdr hdr;
  532. u32 version; /* ignore currently */
  533. u32 capability_flags;
  534. u32 enable_flags;
  535. u8 mac_addr[ETH_ALEN];
  536. u8 rsvd0;
  537. u8 pmac_invalid; /* if set, don't attach the mac addr to the i/f */
  538. u32 vlan_tag; /* not used currently */
  539. } __packed;
  540. struct be_cmd_resp_if_create {
  541. struct be_cmd_resp_hdr hdr;
  542. u32 interface_id;
  543. u32 pmac_id;
  544. };
  545. /****** I/f Destroy(it's actually I/f Config Destroy )**********/
  546. struct be_cmd_req_if_destroy {
  547. struct be_cmd_req_hdr hdr;
  548. u32 interface_id;
  549. };
  550. /*************** HW Stats Get **********************************/
  551. struct be_port_rxf_stats_v0 {
  552. u32 rx_bytes_lsd; /* dword 0*/
  553. u32 rx_bytes_msd; /* dword 1*/
  554. u32 rx_total_frames; /* dword 2*/
  555. u32 rx_unicast_frames; /* dword 3*/
  556. u32 rx_multicast_frames; /* dword 4*/
  557. u32 rx_broadcast_frames; /* dword 5*/
  558. u32 rx_crc_errors; /* dword 6*/
  559. u32 rx_alignment_symbol_errors; /* dword 7*/
  560. u32 rx_pause_frames; /* dword 8*/
  561. u32 rx_control_frames; /* dword 9*/
  562. u32 rx_in_range_errors; /* dword 10*/
  563. u32 rx_out_range_errors; /* dword 11*/
  564. u32 rx_frame_too_long; /* dword 12*/
  565. u32 rx_address_filtered; /* dword 13*/
  566. u32 rx_vlan_filtered; /* dword 14*/
  567. u32 rx_dropped_too_small; /* dword 15*/
  568. u32 rx_dropped_too_short; /* dword 16*/
  569. u32 rx_dropped_header_too_small; /* dword 17*/
  570. u32 rx_dropped_tcp_length; /* dword 18*/
  571. u32 rx_dropped_runt; /* dword 19*/
  572. u32 rx_64_byte_packets; /* dword 20*/
  573. u32 rx_65_127_byte_packets; /* dword 21*/
  574. u32 rx_128_256_byte_packets; /* dword 22*/
  575. u32 rx_256_511_byte_packets; /* dword 23*/
  576. u32 rx_512_1023_byte_packets; /* dword 24*/
  577. u32 rx_1024_1518_byte_packets; /* dword 25*/
  578. u32 rx_1519_2047_byte_packets; /* dword 26*/
  579. u32 rx_2048_4095_byte_packets; /* dword 27*/
  580. u32 rx_4096_8191_byte_packets; /* dword 28*/
  581. u32 rx_8192_9216_byte_packets; /* dword 29*/
  582. u32 rx_ip_checksum_errs; /* dword 30*/
  583. u32 rx_tcp_checksum_errs; /* dword 31*/
  584. u32 rx_udp_checksum_errs; /* dword 32*/
  585. u32 rx_non_rss_packets; /* dword 33*/
  586. u32 rx_ipv4_packets; /* dword 34*/
  587. u32 rx_ipv6_packets; /* dword 35*/
  588. u32 rx_ipv4_bytes_lsd; /* dword 36*/
  589. u32 rx_ipv4_bytes_msd; /* dword 37*/
  590. u32 rx_ipv6_bytes_lsd; /* dword 38*/
  591. u32 rx_ipv6_bytes_msd; /* dword 39*/
  592. u32 rx_chute1_packets; /* dword 40*/
  593. u32 rx_chute2_packets; /* dword 41*/
  594. u32 rx_chute3_packets; /* dword 42*/
  595. u32 rx_management_packets; /* dword 43*/
  596. u32 rx_switched_unicast_packets; /* dword 44*/
  597. u32 rx_switched_multicast_packets; /* dword 45*/
  598. u32 rx_switched_broadcast_packets; /* dword 46*/
  599. u32 tx_bytes_lsd; /* dword 47*/
  600. u32 tx_bytes_msd; /* dword 48*/
  601. u32 tx_unicastframes; /* dword 49*/
  602. u32 tx_multicastframes; /* dword 50*/
  603. u32 tx_broadcastframes; /* dword 51*/
  604. u32 tx_pauseframes; /* dword 52*/
  605. u32 tx_controlframes; /* dword 53*/
  606. u32 tx_64_byte_packets; /* dword 54*/
  607. u32 tx_65_127_byte_packets; /* dword 55*/
  608. u32 tx_128_256_byte_packets; /* dword 56*/
  609. u32 tx_256_511_byte_packets; /* dword 57*/
  610. u32 tx_512_1023_byte_packets; /* dword 58*/
  611. u32 tx_1024_1518_byte_packets; /* dword 59*/
  612. u32 tx_1519_2047_byte_packets; /* dword 60*/
  613. u32 tx_2048_4095_byte_packets; /* dword 61*/
  614. u32 tx_4096_8191_byte_packets; /* dword 62*/
  615. u32 tx_8192_9216_byte_packets; /* dword 63*/
  616. u32 rx_fifo_overflow; /* dword 64*/
  617. u32 rx_input_fifo_overflow; /* dword 65*/
  618. };
  619. struct be_rxf_stats_v0 {
  620. struct be_port_rxf_stats_v0 port[2];
  621. u32 rx_drops_no_pbuf; /* dword 132*/
  622. u32 rx_drops_no_txpb; /* dword 133*/
  623. u32 rx_drops_no_erx_descr; /* dword 134*/
  624. u32 rx_drops_no_tpre_descr; /* dword 135*/
  625. u32 management_rx_port_packets; /* dword 136*/
  626. u32 management_rx_port_bytes; /* dword 137*/
  627. u32 management_rx_port_pause_frames; /* dword 138*/
  628. u32 management_rx_port_errors; /* dword 139*/
  629. u32 management_tx_port_packets; /* dword 140*/
  630. u32 management_tx_port_bytes; /* dword 141*/
  631. u32 management_tx_port_pause; /* dword 142*/
  632. u32 management_rx_port_rxfifo_overflow; /* dword 143*/
  633. u32 rx_drops_too_many_frags; /* dword 144*/
  634. u32 rx_drops_invalid_ring; /* dword 145*/
  635. u32 forwarded_packets; /* dword 146*/
  636. u32 rx_drops_mtu; /* dword 147*/
  637. u32 rsvd0[7];
  638. u32 port0_jabber_events;
  639. u32 port1_jabber_events;
  640. u32 rsvd1[6];
  641. };
  642. struct be_erx_stats_v0 {
  643. u32 rx_drops_no_fragments[44]; /* dwordS 0 to 43*/
  644. u32 rsvd[4];
  645. };
  646. struct be_pmem_stats {
  647. u32 eth_red_drops;
  648. u32 rsvd[5];
  649. };
  650. struct be_hw_stats_v0 {
  651. struct be_rxf_stats_v0 rxf;
  652. u32 rsvd[48];
  653. struct be_erx_stats_v0 erx;
  654. struct be_pmem_stats pmem;
  655. };
  656. struct be_cmd_req_get_stats_v0 {
  657. struct be_cmd_req_hdr hdr;
  658. u8 rsvd[sizeof(struct be_hw_stats_v0)];
  659. };
  660. struct be_cmd_resp_get_stats_v0 {
  661. struct be_cmd_resp_hdr hdr;
  662. struct be_hw_stats_v0 hw_stats;
  663. };
  664. struct lancer_pport_stats {
  665. u32 tx_packets_lo;
  666. u32 tx_packets_hi;
  667. u32 tx_unicast_packets_lo;
  668. u32 tx_unicast_packets_hi;
  669. u32 tx_multicast_packets_lo;
  670. u32 tx_multicast_packets_hi;
  671. u32 tx_broadcast_packets_lo;
  672. u32 tx_broadcast_packets_hi;
  673. u32 tx_bytes_lo;
  674. u32 tx_bytes_hi;
  675. u32 tx_unicast_bytes_lo;
  676. u32 tx_unicast_bytes_hi;
  677. u32 tx_multicast_bytes_lo;
  678. u32 tx_multicast_bytes_hi;
  679. u32 tx_broadcast_bytes_lo;
  680. u32 tx_broadcast_bytes_hi;
  681. u32 tx_discards_lo;
  682. u32 tx_discards_hi;
  683. u32 tx_errors_lo;
  684. u32 tx_errors_hi;
  685. u32 tx_pause_frames_lo;
  686. u32 tx_pause_frames_hi;
  687. u32 tx_pause_on_frames_lo;
  688. u32 tx_pause_on_frames_hi;
  689. u32 tx_pause_off_frames_lo;
  690. u32 tx_pause_off_frames_hi;
  691. u32 tx_internal_mac_errors_lo;
  692. u32 tx_internal_mac_errors_hi;
  693. u32 tx_control_frames_lo;
  694. u32 tx_control_frames_hi;
  695. u32 tx_packets_64_bytes_lo;
  696. u32 tx_packets_64_bytes_hi;
  697. u32 tx_packets_65_to_127_bytes_lo;
  698. u32 tx_packets_65_to_127_bytes_hi;
  699. u32 tx_packets_128_to_255_bytes_lo;
  700. u32 tx_packets_128_to_255_bytes_hi;
  701. u32 tx_packets_256_to_511_bytes_lo;
  702. u32 tx_packets_256_to_511_bytes_hi;
  703. u32 tx_packets_512_to_1023_bytes_lo;
  704. u32 tx_packets_512_to_1023_bytes_hi;
  705. u32 tx_packets_1024_to_1518_bytes_lo;
  706. u32 tx_packets_1024_to_1518_bytes_hi;
  707. u32 tx_packets_1519_to_2047_bytes_lo;
  708. u32 tx_packets_1519_to_2047_bytes_hi;
  709. u32 tx_packets_2048_to_4095_bytes_lo;
  710. u32 tx_packets_2048_to_4095_bytes_hi;
  711. u32 tx_packets_4096_to_8191_bytes_lo;
  712. u32 tx_packets_4096_to_8191_bytes_hi;
  713. u32 tx_packets_8192_to_9216_bytes_lo;
  714. u32 tx_packets_8192_to_9216_bytes_hi;
  715. u32 tx_lso_packets_lo;
  716. u32 tx_lso_packets_hi;
  717. u32 rx_packets_lo;
  718. u32 rx_packets_hi;
  719. u32 rx_unicast_packets_lo;
  720. u32 rx_unicast_packets_hi;
  721. u32 rx_multicast_packets_lo;
  722. u32 rx_multicast_packets_hi;
  723. u32 rx_broadcast_packets_lo;
  724. u32 rx_broadcast_packets_hi;
  725. u32 rx_bytes_lo;
  726. u32 rx_bytes_hi;
  727. u32 rx_unicast_bytes_lo;
  728. u32 rx_unicast_bytes_hi;
  729. u32 rx_multicast_bytes_lo;
  730. u32 rx_multicast_bytes_hi;
  731. u32 rx_broadcast_bytes_lo;
  732. u32 rx_broadcast_bytes_hi;
  733. u32 rx_unknown_protos;
  734. u32 rsvd_69; /* Word 69 is reserved */
  735. u32 rx_discards_lo;
  736. u32 rx_discards_hi;
  737. u32 rx_errors_lo;
  738. u32 rx_errors_hi;
  739. u32 rx_crc_errors_lo;
  740. u32 rx_crc_errors_hi;
  741. u32 rx_alignment_errors_lo;
  742. u32 rx_alignment_errors_hi;
  743. u32 rx_symbol_errors_lo;
  744. u32 rx_symbol_errors_hi;
  745. u32 rx_pause_frames_lo;
  746. u32 rx_pause_frames_hi;
  747. u32 rx_pause_on_frames_lo;
  748. u32 rx_pause_on_frames_hi;
  749. u32 rx_pause_off_frames_lo;
  750. u32 rx_pause_off_frames_hi;
  751. u32 rx_frames_too_long_lo;
  752. u32 rx_frames_too_long_hi;
  753. u32 rx_internal_mac_errors_lo;
  754. u32 rx_internal_mac_errors_hi;
  755. u32 rx_undersize_packets;
  756. u32 rx_oversize_packets;
  757. u32 rx_fragment_packets;
  758. u32 rx_jabbers;
  759. u32 rx_control_frames_lo;
  760. u32 rx_control_frames_hi;
  761. u32 rx_control_frames_unknown_opcode_lo;
  762. u32 rx_control_frames_unknown_opcode_hi;
  763. u32 rx_in_range_errors;
  764. u32 rx_out_of_range_errors;
  765. u32 rx_address_filtered;
  766. u32 rx_vlan_filtered;
  767. u32 rx_dropped_too_small;
  768. u32 rx_dropped_too_short;
  769. u32 rx_dropped_header_too_small;
  770. u32 rx_dropped_invalid_tcp_length;
  771. u32 rx_dropped_runt;
  772. u32 rx_ip_checksum_errors;
  773. u32 rx_tcp_checksum_errors;
  774. u32 rx_udp_checksum_errors;
  775. u32 rx_non_rss_packets;
  776. u32 rsvd_111;
  777. u32 rx_ipv4_packets_lo;
  778. u32 rx_ipv4_packets_hi;
  779. u32 rx_ipv6_packets_lo;
  780. u32 rx_ipv6_packets_hi;
  781. u32 rx_ipv4_bytes_lo;
  782. u32 rx_ipv4_bytes_hi;
  783. u32 rx_ipv6_bytes_lo;
  784. u32 rx_ipv6_bytes_hi;
  785. u32 rx_nic_packets_lo;
  786. u32 rx_nic_packets_hi;
  787. u32 rx_tcp_packets_lo;
  788. u32 rx_tcp_packets_hi;
  789. u32 rx_iscsi_packets_lo;
  790. u32 rx_iscsi_packets_hi;
  791. u32 rx_management_packets_lo;
  792. u32 rx_management_packets_hi;
  793. u32 rx_switched_unicast_packets_lo;
  794. u32 rx_switched_unicast_packets_hi;
  795. u32 rx_switched_multicast_packets_lo;
  796. u32 rx_switched_multicast_packets_hi;
  797. u32 rx_switched_broadcast_packets_lo;
  798. u32 rx_switched_broadcast_packets_hi;
  799. u32 num_forwards_lo;
  800. u32 num_forwards_hi;
  801. u32 rx_fifo_overflow;
  802. u32 rx_input_fifo_overflow;
  803. u32 rx_drops_too_many_frags_lo;
  804. u32 rx_drops_too_many_frags_hi;
  805. u32 rx_drops_invalid_queue;
  806. u32 rsvd_141;
  807. u32 rx_drops_mtu_lo;
  808. u32 rx_drops_mtu_hi;
  809. u32 rx_packets_64_bytes_lo;
  810. u32 rx_packets_64_bytes_hi;
  811. u32 rx_packets_65_to_127_bytes_lo;
  812. u32 rx_packets_65_to_127_bytes_hi;
  813. u32 rx_packets_128_to_255_bytes_lo;
  814. u32 rx_packets_128_to_255_bytes_hi;
  815. u32 rx_packets_256_to_511_bytes_lo;
  816. u32 rx_packets_256_to_511_bytes_hi;
  817. u32 rx_packets_512_to_1023_bytes_lo;
  818. u32 rx_packets_512_to_1023_bytes_hi;
  819. u32 rx_packets_1024_to_1518_bytes_lo;
  820. u32 rx_packets_1024_to_1518_bytes_hi;
  821. u32 rx_packets_1519_to_2047_bytes_lo;
  822. u32 rx_packets_1519_to_2047_bytes_hi;
  823. u32 rx_packets_2048_to_4095_bytes_lo;
  824. u32 rx_packets_2048_to_4095_bytes_hi;
  825. u32 rx_packets_4096_to_8191_bytes_lo;
  826. u32 rx_packets_4096_to_8191_bytes_hi;
  827. u32 rx_packets_8192_to_9216_bytes_lo;
  828. u32 rx_packets_8192_to_9216_bytes_hi;
  829. };
  830. struct pport_stats_params {
  831. u16 pport_num;
  832. u8 rsvd;
  833. u8 reset_stats;
  834. };
  835. struct lancer_cmd_req_pport_stats {
  836. struct be_cmd_req_hdr hdr;
  837. union {
  838. struct pport_stats_params params;
  839. u8 rsvd[sizeof(struct lancer_pport_stats)];
  840. } cmd_params;
  841. };
  842. struct lancer_cmd_resp_pport_stats {
  843. struct be_cmd_resp_hdr hdr;
  844. struct lancer_pport_stats pport_stats;
  845. };
  846. static inline struct lancer_pport_stats*
  847. pport_stats_from_cmd(struct be_adapter *adapter)
  848. {
  849. struct lancer_cmd_resp_pport_stats *cmd = adapter->stats_cmd.va;
  850. return &cmd->pport_stats;
  851. }
  852. struct be_cmd_req_get_cntl_addnl_attribs {
  853. struct be_cmd_req_hdr hdr;
  854. u8 rsvd[8];
  855. };
  856. struct be_cmd_resp_get_cntl_addnl_attribs {
  857. struct be_cmd_resp_hdr hdr;
  858. u16 ipl_file_number;
  859. u8 ipl_file_version;
  860. u8 rsvd0;
  861. u8 on_die_temperature; /* in degrees centigrade*/
  862. u8 rsvd1[3];
  863. };
  864. struct be_cmd_req_vlan_config {
  865. struct be_cmd_req_hdr hdr;
  866. u8 interface_id;
  867. u8 promiscuous;
  868. u8 untagged;
  869. u8 num_vlan;
  870. u16 normal_vlan[64];
  871. } __packed;
  872. /******************* RX FILTER ******************************/
  873. #define BE_MAX_MC 64 /* set mcast promisc if > 64 */
  874. struct macaddr {
  875. u8 byte[ETH_ALEN];
  876. };
  877. struct be_cmd_req_rx_filter {
  878. struct be_cmd_req_hdr hdr;
  879. u32 global_flags_mask;
  880. u32 global_flags;
  881. u32 if_flags_mask;
  882. u32 if_flags;
  883. u32 if_id;
  884. u32 mcast_num;
  885. struct macaddr mcast_mac[BE_MAX_MC];
  886. };
  887. /******************** Link Status Query *******************/
  888. struct be_cmd_req_link_status {
  889. struct be_cmd_req_hdr hdr;
  890. u32 rsvd;
  891. };
  892. enum {
  893. PHY_LINK_DUPLEX_NONE = 0x0,
  894. PHY_LINK_DUPLEX_HALF = 0x1,
  895. PHY_LINK_DUPLEX_FULL = 0x2
  896. };
  897. enum {
  898. PHY_LINK_SPEED_ZERO = 0x0, /* => No link */
  899. PHY_LINK_SPEED_10MBPS = 0x1,
  900. PHY_LINK_SPEED_100MBPS = 0x2,
  901. PHY_LINK_SPEED_1GBPS = 0x3,
  902. PHY_LINK_SPEED_10GBPS = 0x4,
  903. PHY_LINK_SPEED_20GBPS = 0x5,
  904. PHY_LINK_SPEED_25GBPS = 0x6,
  905. PHY_LINK_SPEED_40GBPS = 0x7
  906. };
  907. struct be_cmd_resp_link_status {
  908. struct be_cmd_resp_hdr hdr;
  909. u8 physical_port;
  910. u8 mac_duplex;
  911. u8 mac_speed;
  912. u8 mac_fault;
  913. u8 mgmt_mac_duplex;
  914. u8 mgmt_mac_speed;
  915. u16 link_speed;
  916. u8 logical_link_status;
  917. u8 rsvd1[3];
  918. } __packed;
  919. /******************** Port Identification ***************************/
  920. /* Identifies the type of port attached to NIC */
  921. struct be_cmd_req_port_type {
  922. struct be_cmd_req_hdr hdr;
  923. u32 page_num;
  924. u32 port;
  925. };
  926. enum {
  927. TR_PAGE_A0 = 0xa0,
  928. TR_PAGE_A2 = 0xa2
  929. };
  930. struct be_cmd_resp_port_type {
  931. struct be_cmd_resp_hdr hdr;
  932. u32 page_num;
  933. u32 port;
  934. struct data {
  935. u8 identifier;
  936. u8 identifier_ext;
  937. u8 connector;
  938. u8 transceiver[8];
  939. u8 rsvd0[3];
  940. u8 length_km;
  941. u8 length_hm;
  942. u8 length_om1;
  943. u8 length_om2;
  944. u8 length_cu;
  945. u8 length_cu_m;
  946. u8 vendor_name[16];
  947. u8 rsvd;
  948. u8 vendor_oui[3];
  949. u8 vendor_pn[16];
  950. u8 vendor_rev[4];
  951. } data;
  952. };
  953. /******************** Get FW Version *******************/
  954. struct be_cmd_req_get_fw_version {
  955. struct be_cmd_req_hdr hdr;
  956. u8 rsvd0[FW_VER_LEN];
  957. u8 rsvd1[FW_VER_LEN];
  958. } __packed;
  959. struct be_cmd_resp_get_fw_version {
  960. struct be_cmd_resp_hdr hdr;
  961. u8 firmware_version_string[FW_VER_LEN];
  962. u8 fw_on_flash_version_string[FW_VER_LEN];
  963. } __packed;
  964. /******************** Set Flow Contrl *******************/
  965. struct be_cmd_req_set_flow_control {
  966. struct be_cmd_req_hdr hdr;
  967. u16 tx_flow_control;
  968. u16 rx_flow_control;
  969. } __packed;
  970. /******************** Get Flow Contrl *******************/
  971. struct be_cmd_req_get_flow_control {
  972. struct be_cmd_req_hdr hdr;
  973. u32 rsvd;
  974. };
  975. struct be_cmd_resp_get_flow_control {
  976. struct be_cmd_resp_hdr hdr;
  977. u16 tx_flow_control;
  978. u16 rx_flow_control;
  979. } __packed;
  980. /******************** Modify EQ Delay *******************/
  981. struct be_set_eqd {
  982. u32 eq_id;
  983. u32 phase;
  984. u32 delay_multiplier;
  985. };
  986. struct be_cmd_req_modify_eq_delay {
  987. struct be_cmd_req_hdr hdr;
  988. u32 num_eq;
  989. struct be_set_eqd set_eqd[MAX_EVT_QS];
  990. } __packed;
  991. struct be_cmd_resp_modify_eq_delay {
  992. struct be_cmd_resp_hdr hdr;
  993. u32 rsvd0;
  994. } __packed;
  995. /******************** Get FW Config *******************/
  996. /* The HW can come up in either of the following multi-channel modes
  997. * based on the skew/IPL.
  998. */
  999. #define RDMA_ENABLED 0x4
  1000. #define QNQ_MODE 0x400
  1001. #define VNIC_MODE 0x20000
  1002. #define UMC_ENABLED 0x1000000
  1003. struct be_cmd_req_query_fw_cfg {
  1004. struct be_cmd_req_hdr hdr;
  1005. u32 rsvd[31];
  1006. };
  1007. struct be_cmd_resp_query_fw_cfg {
  1008. struct be_cmd_resp_hdr hdr;
  1009. u32 be_config_number;
  1010. u32 asic_revision;
  1011. u32 phys_port;
  1012. u32 function_mode;
  1013. u32 rsvd[26];
  1014. u32 function_caps;
  1015. };
  1016. /******************** RSS Config ****************************************/
  1017. /* RSS type Input parameters used to compute RX hash
  1018. * RSS_ENABLE_IPV4 SRC IPv4, DST IPv4
  1019. * RSS_ENABLE_TCP_IPV4 SRC IPv4, DST IPv4, TCP SRC PORT, TCP DST PORT
  1020. * RSS_ENABLE_IPV6 SRC IPv6, DST IPv6
  1021. * RSS_ENABLE_TCP_IPV6 SRC IPv6, DST IPv6, TCP SRC PORT, TCP DST PORT
  1022. * RSS_ENABLE_UDP_IPV4 SRC IPv4, DST IPv4, UDP SRC PORT, UDP DST PORT
  1023. * RSS_ENABLE_UDP_IPV6 SRC IPv6, DST IPv6, UDP SRC PORT, UDP DST PORT
  1024. *
  1025. * When multiple RSS types are enabled, HW picks the best hash policy
  1026. * based on the type of the received packet.
  1027. */
  1028. #define RSS_ENABLE_NONE 0x0
  1029. #define RSS_ENABLE_IPV4 0x1
  1030. #define RSS_ENABLE_TCP_IPV4 0x2
  1031. #define RSS_ENABLE_IPV6 0x4
  1032. #define RSS_ENABLE_TCP_IPV6 0x8
  1033. #define RSS_ENABLE_UDP_IPV4 0x10
  1034. #define RSS_ENABLE_UDP_IPV6 0x20
  1035. #define L3_RSS_FLAGS (RXH_IP_DST | RXH_IP_SRC)
  1036. #define L4_RSS_FLAGS (RXH_L4_B_0_1 | RXH_L4_B_2_3)
  1037. struct be_cmd_req_rss_config {
  1038. struct be_cmd_req_hdr hdr;
  1039. u32 if_id;
  1040. u16 enable_rss;
  1041. u16 cpu_table_size_log2;
  1042. u32 hash[10];
  1043. u8 cpu_table[128];
  1044. u8 flush;
  1045. u8 rsvd0[3];
  1046. };
  1047. /******************** Port Beacon ***************************/
  1048. #define BEACON_STATE_ENABLED 0x1
  1049. #define BEACON_STATE_DISABLED 0x0
  1050. struct be_cmd_req_enable_disable_beacon {
  1051. struct be_cmd_req_hdr hdr;
  1052. u8 port_num;
  1053. u8 beacon_state;
  1054. u8 beacon_duration;
  1055. u8 status_duration;
  1056. } __packed;
  1057. struct be_cmd_resp_enable_disable_beacon {
  1058. struct be_cmd_resp_hdr resp_hdr;
  1059. u32 rsvd0;
  1060. } __packed;
  1061. struct be_cmd_req_get_beacon_state {
  1062. struct be_cmd_req_hdr hdr;
  1063. u8 port_num;
  1064. u8 rsvd0;
  1065. u16 rsvd1;
  1066. } __packed;
  1067. struct be_cmd_resp_get_beacon_state {
  1068. struct be_cmd_resp_hdr resp_hdr;
  1069. u8 beacon_state;
  1070. u8 rsvd0[3];
  1071. } __packed;
  1072. /****************** Firmware Flash ******************/
  1073. struct flashrom_params {
  1074. u32 op_code;
  1075. u32 op_type;
  1076. u32 data_buf_size;
  1077. u32 offset;
  1078. };
  1079. struct be_cmd_write_flashrom {
  1080. struct be_cmd_req_hdr hdr;
  1081. struct flashrom_params params;
  1082. u8 data_buf[32768];
  1083. u8 rsvd[4];
  1084. } __packed;
  1085. /* cmd to read flash crc */
  1086. struct be_cmd_read_flash_crc {
  1087. struct be_cmd_req_hdr hdr;
  1088. struct flashrom_params params;
  1089. u8 crc[4];
  1090. u8 rsvd[4];
  1091. } __packed;
  1092. /**************** Lancer Firmware Flash ************/
  1093. struct amap_lancer_write_obj_context {
  1094. u8 write_length[24];
  1095. u8 reserved1[7];
  1096. u8 eof;
  1097. } __packed;
  1098. struct lancer_cmd_req_write_object {
  1099. struct be_cmd_req_hdr hdr;
  1100. u8 context[sizeof(struct amap_lancer_write_obj_context) / 8];
  1101. u32 write_offset;
  1102. u8 object_name[104];
  1103. u32 descriptor_count;
  1104. u32 buf_len;
  1105. u32 addr_low;
  1106. u32 addr_high;
  1107. };
  1108. #define LANCER_NO_RESET_NEEDED 0x00
  1109. #define LANCER_FW_RESET_NEEDED 0x02
  1110. struct lancer_cmd_resp_write_object {
  1111. u8 opcode;
  1112. u8 subsystem;
  1113. u8 rsvd1[2];
  1114. u8 status;
  1115. u8 additional_status;
  1116. u8 rsvd2[2];
  1117. u32 resp_len;
  1118. u32 actual_resp_len;
  1119. u32 actual_write_len;
  1120. u8 change_status;
  1121. u8 rsvd3[3];
  1122. };
  1123. /************************ Lancer Read FW info **************/
  1124. #define LANCER_READ_FILE_CHUNK (32*1024)
  1125. #define LANCER_READ_FILE_EOF_MASK 0x80000000
  1126. #define LANCER_FW_DUMP_FILE "/dbg/dump.bin"
  1127. #define LANCER_VPD_PF_FILE "/vpd/ntr_pf.vpd"
  1128. #define LANCER_VPD_VF_FILE "/vpd/ntr_vf.vpd"
  1129. struct lancer_cmd_req_read_object {
  1130. struct be_cmd_req_hdr hdr;
  1131. u32 desired_read_len;
  1132. u32 read_offset;
  1133. u8 object_name[104];
  1134. u32 descriptor_count;
  1135. u32 buf_len;
  1136. u32 addr_low;
  1137. u32 addr_high;
  1138. };
  1139. struct lancer_cmd_resp_read_object {
  1140. u8 opcode;
  1141. u8 subsystem;
  1142. u8 rsvd1[2];
  1143. u8 status;
  1144. u8 additional_status;
  1145. u8 rsvd2[2];
  1146. u32 resp_len;
  1147. u32 actual_resp_len;
  1148. u32 actual_read_len;
  1149. u32 eof;
  1150. };
  1151. /************************ WOL *******************************/
  1152. struct be_cmd_req_acpi_wol_magic_config{
  1153. struct be_cmd_req_hdr hdr;
  1154. u32 rsvd0[145];
  1155. u8 magic_mac[6];
  1156. u8 rsvd2[2];
  1157. } __packed;
  1158. struct be_cmd_req_acpi_wol_magic_config_v1 {
  1159. struct be_cmd_req_hdr hdr;
  1160. u8 rsvd0[2];
  1161. u8 query_options;
  1162. u8 rsvd1[5];
  1163. u32 rsvd2[288];
  1164. u8 magic_mac[6];
  1165. u8 rsvd3[22];
  1166. } __packed;
  1167. struct be_cmd_resp_acpi_wol_magic_config_v1 {
  1168. struct be_cmd_resp_hdr hdr;
  1169. u8 rsvd0[2];
  1170. u8 wol_settings;
  1171. u8 rsvd1[5];
  1172. u32 rsvd2[295];
  1173. } __packed;
  1174. #define BE_GET_WOL_CAP 2
  1175. #define BE_WOL_CAP 0x1
  1176. #define BE_PME_D0_CAP 0x8
  1177. #define BE_PME_D1_CAP 0x10
  1178. #define BE_PME_D2_CAP 0x20
  1179. #define BE_PME_D3HOT_CAP 0x40
  1180. #define BE_PME_D3COLD_CAP 0x80
  1181. /********************** LoopBack test *********************/
  1182. struct be_cmd_req_loopback_test {
  1183. struct be_cmd_req_hdr hdr;
  1184. u32 loopback_type;
  1185. u32 num_pkts;
  1186. u64 pattern;
  1187. u32 src_port;
  1188. u32 dest_port;
  1189. u32 pkt_size;
  1190. };
  1191. struct be_cmd_resp_loopback_test {
  1192. struct be_cmd_resp_hdr resp_hdr;
  1193. u32 status;
  1194. u32 num_txfer;
  1195. u32 num_rx;
  1196. u32 miscomp_off;
  1197. u32 ticks_compl;
  1198. };
  1199. struct be_cmd_req_set_lmode {
  1200. struct be_cmd_req_hdr hdr;
  1201. u8 src_port;
  1202. u8 dest_port;
  1203. u8 loopback_type;
  1204. u8 loopback_state;
  1205. };
  1206. struct be_cmd_resp_set_lmode {
  1207. struct be_cmd_resp_hdr resp_hdr;
  1208. u8 rsvd0[4];
  1209. };
  1210. /********************** DDR DMA test *********************/
  1211. struct be_cmd_req_ddrdma_test {
  1212. struct be_cmd_req_hdr hdr;
  1213. u64 pattern;
  1214. u32 byte_count;
  1215. u32 rsvd0;
  1216. u8 snd_buff[4096];
  1217. u8 rsvd1[4096];
  1218. };
  1219. struct be_cmd_resp_ddrdma_test {
  1220. struct be_cmd_resp_hdr hdr;
  1221. u64 pattern;
  1222. u32 byte_cnt;
  1223. u32 snd_err;
  1224. u8 rsvd0[4096];
  1225. u8 rcv_buff[4096];
  1226. };
  1227. /*********************** SEEPROM Read ***********************/
  1228. #define BE_READ_SEEPROM_LEN 1024
  1229. struct be_cmd_req_seeprom_read {
  1230. struct be_cmd_req_hdr hdr;
  1231. u8 rsvd0[BE_READ_SEEPROM_LEN];
  1232. };
  1233. struct be_cmd_resp_seeprom_read {
  1234. struct be_cmd_req_hdr hdr;
  1235. u8 seeprom_data[BE_READ_SEEPROM_LEN];
  1236. };
  1237. enum {
  1238. PHY_TYPE_CX4_10GB = 0,
  1239. PHY_TYPE_XFP_10GB,
  1240. PHY_TYPE_SFP_1GB,
  1241. PHY_TYPE_SFP_PLUS_10GB,
  1242. PHY_TYPE_KR_10GB,
  1243. PHY_TYPE_KX4_10GB,
  1244. PHY_TYPE_BASET_10GB,
  1245. PHY_TYPE_BASET_1GB,
  1246. PHY_TYPE_BASEX_1GB,
  1247. PHY_TYPE_SGMII,
  1248. PHY_TYPE_DISABLED = 255
  1249. };
  1250. #define BE_SUPPORTED_SPEED_NONE 0
  1251. #define BE_SUPPORTED_SPEED_10MBPS 1
  1252. #define BE_SUPPORTED_SPEED_100MBPS 2
  1253. #define BE_SUPPORTED_SPEED_1GBPS 4
  1254. #define BE_SUPPORTED_SPEED_10GBPS 8
  1255. #define BE_AN_EN 0x2
  1256. #define BE_PAUSE_SYM_EN 0x80
  1257. /* MAC speed valid values */
  1258. #define SPEED_DEFAULT 0x0
  1259. #define SPEED_FORCED_10GB 0x1
  1260. #define SPEED_FORCED_1GB 0x2
  1261. #define SPEED_AUTONEG_10GB 0x3
  1262. #define SPEED_AUTONEG_1GB 0x4
  1263. #define SPEED_AUTONEG_100MB 0x5
  1264. #define SPEED_AUTONEG_10GB_1GB 0x6
  1265. #define SPEED_AUTONEG_10GB_1GB_100MB 0x7
  1266. #define SPEED_AUTONEG_1GB_100MB 0x8
  1267. #define SPEED_AUTONEG_10MB 0x9
  1268. #define SPEED_AUTONEG_1GB_100MB_10MB 0xa
  1269. #define SPEED_AUTONEG_100MB_10MB 0xb
  1270. #define SPEED_FORCED_100MB 0xc
  1271. #define SPEED_FORCED_10MB 0xd
  1272. struct be_cmd_req_get_phy_info {
  1273. struct be_cmd_req_hdr hdr;
  1274. u8 rsvd0[24];
  1275. };
  1276. struct be_phy_info {
  1277. u16 phy_type;
  1278. u16 interface_type;
  1279. u32 misc_params;
  1280. u16 ext_phy_details;
  1281. u16 rsvd;
  1282. u16 auto_speeds_supported;
  1283. u16 fixed_speeds_supported;
  1284. u32 future_use[2];
  1285. };
  1286. struct be_cmd_resp_get_phy_info {
  1287. struct be_cmd_req_hdr hdr;
  1288. struct be_phy_info phy_info;
  1289. };
  1290. /*********************** Set QOS ***********************/
  1291. #define BE_QOS_BITS_NIC 1
  1292. struct be_cmd_req_set_qos {
  1293. struct be_cmd_req_hdr hdr;
  1294. u32 valid_bits;
  1295. u32 max_bps_nic;
  1296. u32 rsvd[7];
  1297. };
  1298. struct be_cmd_resp_set_qos {
  1299. struct be_cmd_resp_hdr hdr;
  1300. u32 rsvd;
  1301. };
  1302. /*********************** Controller Attributes ***********************/
  1303. struct be_cmd_req_cntl_attribs {
  1304. struct be_cmd_req_hdr hdr;
  1305. };
  1306. struct be_cmd_resp_cntl_attribs {
  1307. struct be_cmd_resp_hdr hdr;
  1308. struct mgmt_controller_attrib attribs;
  1309. };
  1310. /*********************** Set driver function ***********************/
  1311. #define CAPABILITY_SW_TIMESTAMPS 2
  1312. #define CAPABILITY_BE3_NATIVE_ERX_API 4
  1313. struct be_cmd_req_set_func_cap {
  1314. struct be_cmd_req_hdr hdr;
  1315. u32 valid_cap_flags;
  1316. u32 cap_flags;
  1317. u8 rsvd[212];
  1318. };
  1319. struct be_cmd_resp_set_func_cap {
  1320. struct be_cmd_resp_hdr hdr;
  1321. u32 valid_cap_flags;
  1322. u32 cap_flags;
  1323. u8 rsvd[212];
  1324. };
  1325. /*********************** Function Privileges ***********************/
  1326. enum {
  1327. BE_PRIV_DEFAULT = 0x1,
  1328. BE_PRIV_LNKQUERY = 0x2,
  1329. BE_PRIV_LNKSTATS = 0x4,
  1330. BE_PRIV_LNKMGMT = 0x8,
  1331. BE_PRIV_LNKDIAG = 0x10,
  1332. BE_PRIV_UTILQUERY = 0x20,
  1333. BE_PRIV_FILTMGMT = 0x40,
  1334. BE_PRIV_IFACEMGMT = 0x80,
  1335. BE_PRIV_VHADM = 0x100,
  1336. BE_PRIV_DEVCFG = 0x200,
  1337. BE_PRIV_DEVSEC = 0x400
  1338. };
  1339. #define MAX_PRIVILEGES (BE_PRIV_VHADM | BE_PRIV_DEVCFG | \
  1340. BE_PRIV_DEVSEC)
  1341. #define MIN_PRIVILEGES BE_PRIV_DEFAULT
  1342. struct be_cmd_priv_map {
  1343. u8 opcode;
  1344. u8 subsystem;
  1345. u32 priv_mask;
  1346. };
  1347. struct be_cmd_req_get_fn_privileges {
  1348. struct be_cmd_req_hdr hdr;
  1349. u32 rsvd;
  1350. };
  1351. struct be_cmd_resp_get_fn_privileges {
  1352. struct be_cmd_resp_hdr hdr;
  1353. u32 privilege_mask;
  1354. };
  1355. struct be_cmd_req_set_fn_privileges {
  1356. struct be_cmd_req_hdr hdr;
  1357. u32 privileges; /* Used by BE3, SH-R */
  1358. u32 privileges_lancer; /* Used by Lancer */
  1359. };
  1360. /******************** GET/SET_MACLIST **************************/
  1361. #define BE_MAX_MAC 64
  1362. struct be_cmd_req_get_mac_list {
  1363. struct be_cmd_req_hdr hdr;
  1364. u8 mac_type;
  1365. u8 perm_override;
  1366. u16 iface_id;
  1367. u32 mac_id;
  1368. u32 rsvd[3];
  1369. } __packed;
  1370. struct get_list_macaddr {
  1371. u16 mac_addr_size;
  1372. union {
  1373. u8 macaddr[6];
  1374. struct {
  1375. u8 rsvd[2];
  1376. u32 mac_id;
  1377. } __packed s_mac_id;
  1378. } __packed mac_addr_id;
  1379. } __packed;
  1380. struct be_cmd_resp_get_mac_list {
  1381. struct be_cmd_resp_hdr hdr;
  1382. struct get_list_macaddr fd_macaddr; /* Factory default mac */
  1383. struct get_list_macaddr macid_macaddr; /* soft mac */
  1384. u8 true_mac_count;
  1385. u8 pseudo_mac_count;
  1386. u8 mac_list_size;
  1387. u8 rsvd;
  1388. /* perm override mac */
  1389. struct get_list_macaddr macaddr_list[BE_MAX_MAC];
  1390. } __packed;
  1391. struct be_cmd_req_set_mac_list {
  1392. struct be_cmd_req_hdr hdr;
  1393. u8 mac_count;
  1394. u8 rsvd1;
  1395. u16 rsvd2;
  1396. struct macaddr mac[BE_MAX_MAC];
  1397. } __packed;
  1398. /*********************** HSW Config ***********************/
  1399. #define PORT_FWD_TYPE_VEPA 0x3
  1400. #define PORT_FWD_TYPE_VEB 0x2
  1401. struct amap_set_hsw_context {
  1402. u8 interface_id[16];
  1403. u8 rsvd0[14];
  1404. u8 pvid_valid;
  1405. u8 pport;
  1406. u8 rsvd1[6];
  1407. u8 port_fwd_type[3];
  1408. u8 rsvd2[7];
  1409. u8 pvid[16];
  1410. u8 rsvd3[32];
  1411. u8 rsvd4[32];
  1412. u8 rsvd5[32];
  1413. } __packed;
  1414. struct be_cmd_req_set_hsw_config {
  1415. struct be_cmd_req_hdr hdr;
  1416. u8 context[sizeof(struct amap_set_hsw_context) / 8];
  1417. } __packed;
  1418. struct be_cmd_resp_set_hsw_config {
  1419. struct be_cmd_resp_hdr hdr;
  1420. u32 rsvd;
  1421. };
  1422. struct amap_get_hsw_req_context {
  1423. u8 interface_id[16];
  1424. u8 rsvd0[14];
  1425. u8 pvid_valid;
  1426. u8 pport;
  1427. } __packed;
  1428. struct amap_get_hsw_resp_context {
  1429. u8 rsvd0[6];
  1430. u8 port_fwd_type[3];
  1431. u8 rsvd1[7];
  1432. u8 pvid[16];
  1433. u8 rsvd2[32];
  1434. u8 rsvd3[32];
  1435. u8 rsvd4[32];
  1436. } __packed;
  1437. struct be_cmd_req_get_hsw_config {
  1438. struct be_cmd_req_hdr hdr;
  1439. u8 context[sizeof(struct amap_get_hsw_req_context) / 8];
  1440. } __packed;
  1441. struct be_cmd_resp_get_hsw_config {
  1442. struct be_cmd_resp_hdr hdr;
  1443. u8 context[sizeof(struct amap_get_hsw_resp_context) / 8];
  1444. u32 rsvd;
  1445. };
  1446. /******************* get port names ***************/
  1447. struct be_cmd_req_get_port_name {
  1448. struct be_cmd_req_hdr hdr;
  1449. u32 rsvd0;
  1450. };
  1451. struct be_cmd_resp_get_port_name {
  1452. struct be_cmd_req_hdr hdr;
  1453. u8 port_name[4];
  1454. };
  1455. /*************** HW Stats Get v1 **********************************/
  1456. #define BE_TXP_SW_SZ 48
  1457. struct be_port_rxf_stats_v1 {
  1458. u32 rsvd0[12];
  1459. u32 rx_crc_errors;
  1460. u32 rx_alignment_symbol_errors;
  1461. u32 rx_pause_frames;
  1462. u32 rx_priority_pause_frames;
  1463. u32 rx_control_frames;
  1464. u32 rx_in_range_errors;
  1465. u32 rx_out_range_errors;
  1466. u32 rx_frame_too_long;
  1467. u32 rx_address_filtered;
  1468. u32 rx_dropped_too_small;
  1469. u32 rx_dropped_too_short;
  1470. u32 rx_dropped_header_too_small;
  1471. u32 rx_dropped_tcp_length;
  1472. u32 rx_dropped_runt;
  1473. u32 rsvd1[10];
  1474. u32 rx_ip_checksum_errs;
  1475. u32 rx_tcp_checksum_errs;
  1476. u32 rx_udp_checksum_errs;
  1477. u32 rsvd2[7];
  1478. u32 rx_switched_unicast_packets;
  1479. u32 rx_switched_multicast_packets;
  1480. u32 rx_switched_broadcast_packets;
  1481. u32 rsvd3[3];
  1482. u32 tx_pauseframes;
  1483. u32 tx_priority_pauseframes;
  1484. u32 tx_controlframes;
  1485. u32 rsvd4[10];
  1486. u32 rxpp_fifo_overflow_drop;
  1487. u32 rx_input_fifo_overflow_drop;
  1488. u32 pmem_fifo_overflow_drop;
  1489. u32 jabber_events;
  1490. u32 rsvd5[3];
  1491. };
  1492. struct be_rxf_stats_v1 {
  1493. struct be_port_rxf_stats_v1 port[4];
  1494. u32 rsvd0[2];
  1495. u32 rx_drops_no_pbuf;
  1496. u32 rx_drops_no_txpb;
  1497. u32 rx_drops_no_erx_descr;
  1498. u32 rx_drops_no_tpre_descr;
  1499. u32 rsvd1[6];
  1500. u32 rx_drops_too_many_frags;
  1501. u32 rx_drops_invalid_ring;
  1502. u32 forwarded_packets;
  1503. u32 rx_drops_mtu;
  1504. u32 rsvd2[14];
  1505. };
  1506. struct be_erx_stats_v1 {
  1507. u32 rx_drops_no_fragments[68]; /* dwordS 0 to 67*/
  1508. u32 rsvd[4];
  1509. };
  1510. struct be_port_rxf_stats_v2 {
  1511. u32 rsvd0[10];
  1512. u32 roce_bytes_received_lsd;
  1513. u32 roce_bytes_received_msd;
  1514. u32 rsvd1[5];
  1515. u32 roce_frames_received;
  1516. u32 rx_crc_errors;
  1517. u32 rx_alignment_symbol_errors;
  1518. u32 rx_pause_frames;
  1519. u32 rx_priority_pause_frames;
  1520. u32 rx_control_frames;
  1521. u32 rx_in_range_errors;
  1522. u32 rx_out_range_errors;
  1523. u32 rx_frame_too_long;
  1524. u32 rx_address_filtered;
  1525. u32 rx_dropped_too_small;
  1526. u32 rx_dropped_too_short;
  1527. u32 rx_dropped_header_too_small;
  1528. u32 rx_dropped_tcp_length;
  1529. u32 rx_dropped_runt;
  1530. u32 rsvd2[10];
  1531. u32 rx_ip_checksum_errs;
  1532. u32 rx_tcp_checksum_errs;
  1533. u32 rx_udp_checksum_errs;
  1534. u32 rsvd3[7];
  1535. u32 rx_switched_unicast_packets;
  1536. u32 rx_switched_multicast_packets;
  1537. u32 rx_switched_broadcast_packets;
  1538. u32 rsvd4[3];
  1539. u32 tx_pauseframes;
  1540. u32 tx_priority_pauseframes;
  1541. u32 tx_controlframes;
  1542. u32 rsvd5[10];
  1543. u32 rxpp_fifo_overflow_drop;
  1544. u32 rx_input_fifo_overflow_drop;
  1545. u32 pmem_fifo_overflow_drop;
  1546. u32 jabber_events;
  1547. u32 rsvd6[3];
  1548. u32 rx_drops_payload_size;
  1549. u32 rx_drops_clipped_header;
  1550. u32 rx_drops_crc;
  1551. u32 roce_drops_payload_len;
  1552. u32 roce_drops_crc;
  1553. u32 rsvd7[19];
  1554. };
  1555. struct be_rxf_stats_v2 {
  1556. struct be_port_rxf_stats_v2 port[4];
  1557. u32 rsvd0[2];
  1558. u32 rx_drops_no_pbuf;
  1559. u32 rx_drops_no_txpb;
  1560. u32 rx_drops_no_erx_descr;
  1561. u32 rx_drops_no_tpre_descr;
  1562. u32 rsvd1[6];
  1563. u32 rx_drops_too_many_frags;
  1564. u32 rx_drops_invalid_ring;
  1565. u32 forwarded_packets;
  1566. u32 rx_drops_mtu;
  1567. u32 rsvd2[35];
  1568. };
  1569. struct be_hw_stats_v1 {
  1570. struct be_rxf_stats_v1 rxf;
  1571. u32 rsvd0[BE_TXP_SW_SZ];
  1572. struct be_erx_stats_v1 erx;
  1573. struct be_pmem_stats pmem;
  1574. u32 rsvd1[18];
  1575. };
  1576. struct be_cmd_req_get_stats_v1 {
  1577. struct be_cmd_req_hdr hdr;
  1578. u8 rsvd[sizeof(struct be_hw_stats_v1)];
  1579. };
  1580. struct be_cmd_resp_get_stats_v1 {
  1581. struct be_cmd_resp_hdr hdr;
  1582. struct be_hw_stats_v1 hw_stats;
  1583. };
  1584. struct be_erx_stats_v2 {
  1585. u32 rx_drops_no_fragments[136]; /* dwordS 0 to 135*/
  1586. u32 rsvd[3];
  1587. };
  1588. struct be_hw_stats_v2 {
  1589. struct be_rxf_stats_v2 rxf;
  1590. u32 rsvd0[BE_TXP_SW_SZ];
  1591. struct be_erx_stats_v2 erx;
  1592. struct be_pmem_stats pmem;
  1593. u32 rsvd1[18];
  1594. };
  1595. struct be_cmd_req_get_stats_v2 {
  1596. struct be_cmd_req_hdr hdr;
  1597. u8 rsvd[sizeof(struct be_hw_stats_v2)];
  1598. };
  1599. struct be_cmd_resp_get_stats_v2 {
  1600. struct be_cmd_resp_hdr hdr;
  1601. struct be_hw_stats_v2 hw_stats;
  1602. };
  1603. /************** get fat capabilites *******************/
  1604. #define MAX_MODULES 27
  1605. #define MAX_MODES 4
  1606. #define MODE_UART 0
  1607. #define FW_LOG_LEVEL_DEFAULT 48
  1608. #define FW_LOG_LEVEL_FATAL 64
  1609. struct ext_fat_mode {
  1610. u8 mode;
  1611. u8 rsvd0;
  1612. u16 port_mask;
  1613. u32 dbg_lvl;
  1614. u64 fun_mask;
  1615. } __packed;
  1616. struct ext_fat_modules {
  1617. u8 modules_str[32];
  1618. u32 modules_id;
  1619. u32 num_modes;
  1620. struct ext_fat_mode trace_lvl[MAX_MODES];
  1621. } __packed;
  1622. struct be_fat_conf_params {
  1623. u32 max_log_entries;
  1624. u32 log_entry_size;
  1625. u8 log_type;
  1626. u8 max_log_funs;
  1627. u8 max_log_ports;
  1628. u8 rsvd0;
  1629. u32 supp_modes;
  1630. u32 num_modules;
  1631. struct ext_fat_modules module[MAX_MODULES];
  1632. } __packed;
  1633. struct be_cmd_req_get_ext_fat_caps {
  1634. struct be_cmd_req_hdr hdr;
  1635. u32 parameter_type;
  1636. };
  1637. struct be_cmd_resp_get_ext_fat_caps {
  1638. struct be_cmd_resp_hdr hdr;
  1639. struct be_fat_conf_params get_params;
  1640. };
  1641. struct be_cmd_req_set_ext_fat_caps {
  1642. struct be_cmd_req_hdr hdr;
  1643. struct be_fat_conf_params set_params;
  1644. };
  1645. #define RESOURCE_DESC_SIZE_V0 72
  1646. #define RESOURCE_DESC_SIZE_V1 88
  1647. #define PCIE_RESOURCE_DESC_TYPE_V0 0x40
  1648. #define NIC_RESOURCE_DESC_TYPE_V0 0x41
  1649. #define PCIE_RESOURCE_DESC_TYPE_V1 0x50
  1650. #define NIC_RESOURCE_DESC_TYPE_V1 0x51
  1651. #define PORT_RESOURCE_DESC_TYPE_V1 0x55
  1652. #define MAX_RESOURCE_DESC 264
  1653. #define IMM_SHIFT 6 /* Immediate */
  1654. #define NOSV_SHIFT 7 /* No save */
  1655. struct be_res_desc_hdr {
  1656. u8 desc_type;
  1657. u8 desc_len;
  1658. } __packed;
  1659. struct be_port_res_desc {
  1660. struct be_res_desc_hdr hdr;
  1661. u8 rsvd0;
  1662. u8 flags;
  1663. u8 link_num;
  1664. u8 mc_type;
  1665. u16 rsvd1;
  1666. #define NV_TYPE_MASK 0x3 /* bits 0-1 */
  1667. #define NV_TYPE_DISABLED 1
  1668. #define NV_TYPE_VXLAN 3
  1669. #define SOCVID_SHIFT 2 /* Strip outer vlan */
  1670. #define RCVID_SHIFT 4 /* Report vlan */
  1671. u8 nv_flags;
  1672. u8 rsvd2;
  1673. __le16 nv_port; /* vxlan/gre port */
  1674. u32 rsvd3[19];
  1675. } __packed;
  1676. struct be_pcie_res_desc {
  1677. struct be_res_desc_hdr hdr;
  1678. u8 rsvd0;
  1679. u8 flags;
  1680. u16 rsvd1;
  1681. u8 pf_num;
  1682. u8 rsvd2;
  1683. u32 rsvd3;
  1684. u8 sriov_state;
  1685. u8 pf_state;
  1686. u8 pf_type;
  1687. u8 rsvd4;
  1688. u16 num_vfs;
  1689. u16 rsvd5;
  1690. u32 rsvd6[17];
  1691. } __packed;
  1692. struct be_nic_res_desc {
  1693. struct be_res_desc_hdr hdr;
  1694. u8 rsvd1;
  1695. #define QUN_SHIFT 4 /* QoS is in absolute units */
  1696. u8 flags;
  1697. u8 vf_num;
  1698. u8 rsvd2;
  1699. u8 pf_num;
  1700. u8 rsvd3;
  1701. u16 unicast_mac_count;
  1702. u8 rsvd4[6];
  1703. u16 mcc_count;
  1704. u16 vlan_count;
  1705. u16 mcast_mac_count;
  1706. u16 txq_count;
  1707. u16 rq_count;
  1708. u16 rssq_count;
  1709. u16 lro_count;
  1710. u16 cq_count;
  1711. u16 toe_conn_count;
  1712. u16 eq_count;
  1713. u16 vlan_id;
  1714. u16 iface_count;
  1715. u32 cap_flags;
  1716. u8 link_param;
  1717. u8 rsvd6;
  1718. u16 channel_id_param;
  1719. u32 bw_min;
  1720. u32 bw_max;
  1721. u8 acpi_params;
  1722. u8 wol_param;
  1723. u16 rsvd7;
  1724. u16 tunnel_iface_count;
  1725. u16 direct_tenant_iface_count;
  1726. u32 rsvd8[6];
  1727. } __packed;
  1728. /************ Multi-Channel type ***********/
  1729. enum mc_type {
  1730. MC_NONE = 0x01,
  1731. UMC = 0x02,
  1732. FLEX10 = 0x03,
  1733. vNIC1 = 0x04,
  1734. nPAR = 0x05,
  1735. UFP = 0x06,
  1736. vNIC2 = 0x07
  1737. };
  1738. /* Is BE in a multi-channel mode */
  1739. static inline bool be_is_mc(struct be_adapter *adapter)
  1740. {
  1741. return adapter->mc_type > MC_NONE;
  1742. }
  1743. struct be_cmd_req_get_func_config {
  1744. struct be_cmd_req_hdr hdr;
  1745. };
  1746. struct be_cmd_resp_get_func_config {
  1747. struct be_cmd_resp_hdr hdr;
  1748. u32 desc_count;
  1749. u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE_V1];
  1750. };
  1751. #define ACTIVE_PROFILE_TYPE 0x2
  1752. struct be_cmd_req_get_profile_config {
  1753. struct be_cmd_req_hdr hdr;
  1754. u8 rsvd;
  1755. u8 type;
  1756. u16 rsvd1;
  1757. };
  1758. struct be_cmd_resp_get_profile_config {
  1759. struct be_cmd_resp_hdr hdr;
  1760. u32 desc_count;
  1761. u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE_V1];
  1762. };
  1763. struct be_cmd_req_set_profile_config {
  1764. struct be_cmd_req_hdr hdr;
  1765. u32 rsvd;
  1766. u32 desc_count;
  1767. u8 desc[RESOURCE_DESC_SIZE_V1];
  1768. };
  1769. struct be_cmd_resp_set_profile_config {
  1770. struct be_cmd_resp_hdr hdr;
  1771. };
  1772. struct be_cmd_req_get_active_profile {
  1773. struct be_cmd_req_hdr hdr;
  1774. u32 rsvd;
  1775. } __packed;
  1776. struct be_cmd_resp_get_active_profile {
  1777. struct be_cmd_resp_hdr hdr;
  1778. u16 active_profile_id;
  1779. u16 next_profile_id;
  1780. } __packed;
  1781. struct be_cmd_enable_disable_vf {
  1782. struct be_cmd_req_hdr hdr;
  1783. u8 enable;
  1784. u8 rsvd[3];
  1785. };
  1786. struct be_cmd_req_intr_set {
  1787. struct be_cmd_req_hdr hdr;
  1788. u8 intr_enabled;
  1789. u8 rsvd[3];
  1790. };
  1791. static inline bool check_privilege(struct be_adapter *adapter, u32 flags)
  1792. {
  1793. return flags & adapter->cmd_privileges ? true : false;
  1794. }
  1795. /************** Get IFACE LIST *******************/
  1796. struct be_if_desc {
  1797. u32 if_id;
  1798. u32 cap_flags;
  1799. u32 en_flags;
  1800. };
  1801. struct be_cmd_req_get_iface_list {
  1802. struct be_cmd_req_hdr hdr;
  1803. };
  1804. struct be_cmd_resp_get_iface_list {
  1805. struct be_cmd_req_hdr hdr;
  1806. u32 if_cnt;
  1807. struct be_if_desc if_desc;
  1808. };
  1809. /*************** Set logical link ********************/
  1810. #define PLINK_TRACK_SHIFT 8
  1811. struct be_cmd_req_set_ll_link {
  1812. struct be_cmd_req_hdr hdr;
  1813. u32 link_config; /* Bit 0: UP_DOWN, Bit 9: PLINK */
  1814. };
  1815. /************** Manage IFACE Filters *******************/
  1816. #define OP_CONVERT_NORMAL_TO_TUNNEL 0
  1817. #define OP_CONVERT_TUNNEL_TO_NORMAL 1
  1818. struct be_cmd_req_manage_iface_filters {
  1819. struct be_cmd_req_hdr hdr;
  1820. u8 op;
  1821. u8 rsvd0;
  1822. u8 flags;
  1823. u8 rsvd1;
  1824. u32 tunnel_iface_id;
  1825. u32 target_iface_id;
  1826. u8 mac[6];
  1827. u16 vlan_tag;
  1828. u32 tenant_id;
  1829. u32 filter_id;
  1830. u32 cap_flags;
  1831. u32 cap_control_flags;
  1832. } __packed;
  1833. int be_pci_fnum_get(struct be_adapter *adapter);
  1834. int be_fw_wait_ready(struct be_adapter *adapter);
  1835. int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
  1836. bool permanent, u32 if_handle, u32 pmac_id);
  1837. int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr, u32 if_id,
  1838. u32 *pmac_id, u32 domain);
  1839. int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, int pmac_id,
  1840. u32 domain);
  1841. int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
  1842. u32 *if_handle, u32 domain);
  1843. int be_cmd_if_destroy(struct be_adapter *adapter, int if_handle, u32 domain);
  1844. int be_cmd_eq_create(struct be_adapter *adapter, struct be_eq_obj *eqo);
  1845. int be_cmd_cq_create(struct be_adapter *adapter, struct be_queue_info *cq,
  1846. struct be_queue_info *eq, bool no_delay,
  1847. int num_cqe_dma_coalesce);
  1848. int be_cmd_mccq_create(struct be_adapter *adapter, struct be_queue_info *mccq,
  1849. struct be_queue_info *cq);
  1850. int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo);
  1851. int be_cmd_rxq_create(struct be_adapter *adapter, struct be_queue_info *rxq,
  1852. u16 cq_id, u16 frag_size, u32 if_id, u32 rss, u8 *rss_id);
  1853. int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
  1854. int type);
  1855. int be_cmd_rxq_destroy(struct be_adapter *adapter, struct be_queue_info *q);
  1856. int be_cmd_link_status_query(struct be_adapter *adapter, u16 *link_speed,
  1857. u8 *link_status, u32 dom);
  1858. int be_cmd_reset(struct be_adapter *adapter);
  1859. int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd);
  1860. int lancer_cmd_get_pport_stats(struct be_adapter *adapter,
  1861. struct be_dma_mem *nonemb_cmd);
  1862. int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver,
  1863. char *fw_on_flash);
  1864. int be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *, int num);
  1865. int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id, u16 *vtag_array,
  1866. u32 num);
  1867. int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 status);
  1868. int be_cmd_set_flow_control(struct be_adapter *adapter, u32 tx_fc, u32 rx_fc);
  1869. int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc);
  1870. int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num,
  1871. u32 *function_mode, u32 *function_caps, u16 *asic_rev);
  1872. int be_cmd_reset_function(struct be_adapter *adapter);
  1873. int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable,
  1874. u32 rss_hash_opts, u16 table_size, const u8 *rss_hkey);
  1875. int be_process_mcc(struct be_adapter *adapter);
  1876. int be_cmd_set_beacon_state(struct be_adapter *adapter, u8 port_num, u8 beacon,
  1877. u8 status, u8 state);
  1878. int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num,
  1879. u32 *state);
  1880. int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
  1881. u32 flash_oper, u32 flash_opcode, u32 buf_size);
  1882. int lancer_cmd_write_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
  1883. u32 data_size, u32 data_offset,
  1884. const char *obj_name, u32 *data_written,
  1885. u8 *change_status, u8 *addn_status);
  1886. int lancer_cmd_read_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
  1887. u32 data_size, u32 data_offset, const char *obj_name,
  1888. u32 *data_read, u32 *eof, u8 *addn_status);
  1889. int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc,
  1890. u16 optype, int offset);
  1891. int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac,
  1892. struct be_dma_mem *nonemb_cmd);
  1893. int be_cmd_fw_init(struct be_adapter *adapter);
  1894. int be_cmd_fw_clean(struct be_adapter *adapter);
  1895. void be_async_mcc_enable(struct be_adapter *adapter);
  1896. void be_async_mcc_disable(struct be_adapter *adapter);
  1897. int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
  1898. u32 loopback_type, u32 pkt_size, u32 num_pkts,
  1899. u64 pattern);
  1900. int be_cmd_ddr_dma_test(struct be_adapter *adapter, u64 pattern, u32 byte_cnt,
  1901. struct be_dma_mem *cmd);
  1902. int be_cmd_get_seeprom_data(struct be_adapter *adapter,
  1903. struct be_dma_mem *nonemb_cmd);
  1904. int be_cmd_set_loopback(struct be_adapter *adapter, u8 port_num,
  1905. u8 loopback_type, u8 enable);
  1906. int be_cmd_get_phy_info(struct be_adapter *adapter);
  1907. int be_cmd_config_qos(struct be_adapter *adapter, u32 max_rate,
  1908. u16 link_speed, u8 domain);
  1909. void be_detect_error(struct be_adapter *adapter);
  1910. int be_cmd_get_die_temperature(struct be_adapter *adapter);
  1911. int be_cmd_get_cntl_attributes(struct be_adapter *adapter);
  1912. int be_cmd_req_native_mode(struct be_adapter *adapter);
  1913. int be_cmd_get_reg_len(struct be_adapter *adapter, u32 *log_size);
  1914. void be_cmd_get_regs(struct be_adapter *adapter, u32 buf_len, void *buf);
  1915. int be_cmd_get_fn_privileges(struct be_adapter *adapter, u32 *privilege,
  1916. u32 domain);
  1917. int be_cmd_set_fn_privileges(struct be_adapter *adapter, u32 privileges,
  1918. u32 vf_num);
  1919. int be_cmd_get_mac_from_list(struct be_adapter *adapter, u8 *mac,
  1920. bool *pmac_id_active, u32 *pmac_id,
  1921. u32 if_handle, u8 domain);
  1922. int be_cmd_get_active_mac(struct be_adapter *adapter, u32 pmac_id, u8 *mac,
  1923. u32 if_handle, bool active, u32 domain);
  1924. int be_cmd_get_perm_mac(struct be_adapter *adapter, u8 *mac);
  1925. int be_cmd_set_mac_list(struct be_adapter *adapter, u8 *mac_array, u8 mac_count,
  1926. u32 domain);
  1927. int be_cmd_set_mac(struct be_adapter *adapter, u8 *mac, int if_id, u32 dom);
  1928. int be_cmd_set_hsw_config(struct be_adapter *adapter, u16 pvid, u32 domain,
  1929. u16 intf_id, u16 hsw_mode);
  1930. int be_cmd_get_hsw_config(struct be_adapter *adapter, u16 *pvid, u32 domain,
  1931. u16 intf_id, u8 *mode);
  1932. int be_cmd_get_acpi_wol_cap(struct be_adapter *adapter);
  1933. int be_cmd_set_fw_log_level(struct be_adapter *adapter, u32 level);
  1934. int be_cmd_get_fw_log_level(struct be_adapter *adapter);
  1935. int be_cmd_get_ext_fat_capabilites(struct be_adapter *adapter,
  1936. struct be_dma_mem *cmd);
  1937. int be_cmd_set_ext_fat_capabilites(struct be_adapter *adapter,
  1938. struct be_dma_mem *cmd,
  1939. struct be_fat_conf_params *cfgs);
  1940. int lancer_physdev_ctrl(struct be_adapter *adapter, u32 mask);
  1941. int lancer_initiate_dump(struct be_adapter *adapter);
  1942. bool dump_present(struct be_adapter *adapter);
  1943. int lancer_test_and_set_rdy_state(struct be_adapter *adapter);
  1944. int be_cmd_query_port_name(struct be_adapter *adapter, u8 *port_name);
  1945. int be_cmd_get_func_config(struct be_adapter *adapter,
  1946. struct be_resources *res);
  1947. int be_cmd_get_profile_config(struct be_adapter *adapter,
  1948. struct be_resources *res, u8 domain);
  1949. int be_cmd_set_profile_config(struct be_adapter *adapter, void *desc,
  1950. int size, u8 version, u8 domain);
  1951. int be_cmd_get_active_profile(struct be_adapter *adapter, u16 *profile);
  1952. int be_cmd_get_if_id(struct be_adapter *adapter, struct be_vf_cfg *vf_cfg,
  1953. int vf_num);
  1954. int be_cmd_enable_vf(struct be_adapter *adapter, u8 domain);
  1955. int be_cmd_intr_set(struct be_adapter *adapter, bool intr_enable);
  1956. int be_cmd_set_logical_link_config(struct be_adapter *adapter,
  1957. int link_state, u8 domain);
  1958. int be_cmd_set_vxlan_port(struct be_adapter *adapter, __be16 port);
  1959. int be_cmd_manage_iface(struct be_adapter *adapter, u32 iface, u8 op);