bfi.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. /*
  2. * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFI_H__
  18. #define __BFI_H__
  19. #include "bfa_defs.h"
  20. #include "bfa_defs_svc.h"
  21. #pragma pack(1)
  22. /*
  23. * BFI FW image type
  24. */
  25. #define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */
  26. #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32))
  27. enum {
  28. BFI_IMAGE_CB_FC,
  29. BFI_IMAGE_CT_FC,
  30. BFI_IMAGE_CT_CNA,
  31. BFI_IMAGE_MAX,
  32. };
  33. /*
  34. * Msg header common to all msgs
  35. */
  36. struct bfi_mhdr_s {
  37. u8 msg_class; /* @ref bfi_mclass_t */
  38. u8 msg_id; /* msg opcode with in the class */
  39. union {
  40. struct {
  41. u8 qid;
  42. u8 lpu_id; /* msg destination */
  43. } h2i;
  44. u16 i2htok; /* token in msgs to host */
  45. } mtag;
  46. };
  47. #define bfi_mhdr_2_qid(_mh) ((_mh)->mtag.h2i.qid)
  48. #define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \
  49. (_mh).msg_class = (_mc); \
  50. (_mh).msg_id = (_op); \
  51. (_mh).mtag.h2i.lpu_id = (_lpuid); \
  52. } while (0)
  53. #define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \
  54. (_mh).msg_class = (_mc); \
  55. (_mh).msg_id = (_op); \
  56. (_mh).mtag.i2htok = (_i2htok); \
  57. } while (0)
  58. /*
  59. * Message opcodes: 0-127 to firmware, 128-255 to host
  60. */
  61. #define BFI_I2H_OPCODE_BASE 128
  62. #define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE)
  63. /*
  64. ****************************************************************************
  65. *
  66. * Scatter Gather Element and Page definition
  67. *
  68. ****************************************************************************
  69. */
  70. #define BFI_SGE_INLINE 1
  71. #define BFI_SGE_INLINE_MAX (BFI_SGE_INLINE + 1)
  72. /*
  73. * SG Flags
  74. */
  75. enum {
  76. BFI_SGE_DATA = 0, /* data address, not last */
  77. BFI_SGE_DATA_CPL = 1, /* data addr, last in current page */
  78. BFI_SGE_DATA_LAST = 3, /* data address, last */
  79. BFI_SGE_LINK = 2, /* link address */
  80. BFI_SGE_PGDLEN = 2, /* cumulative data length for page */
  81. };
  82. /*
  83. * DMA addresses
  84. */
  85. union bfi_addr_u {
  86. struct {
  87. __be32 addr_lo;
  88. __be32 addr_hi;
  89. } a32;
  90. };
  91. /*
  92. * Scatter Gather Element used for fast-path IO requests
  93. */
  94. struct bfi_sge_s {
  95. #ifdef __BIG_ENDIAN
  96. u32 flags:2,
  97. rsvd:2,
  98. sg_len:28;
  99. #else
  100. u32 sg_len:28,
  101. rsvd:2,
  102. flags:2;
  103. #endif
  104. union bfi_addr_u sga;
  105. };
  106. /**
  107. * Generic DMA addr-len pair.
  108. */
  109. struct bfi_alen_s {
  110. union bfi_addr_u al_addr; /* DMA addr of buffer */
  111. u32 al_len; /* length of buffer */
  112. };
  113. /*
  114. * Scatter Gather Page
  115. */
  116. #define BFI_SGPG_DATA_SGES 7
  117. #define BFI_SGPG_SGES_MAX (BFI_SGPG_DATA_SGES + 1)
  118. #define BFI_SGPG_RSVD_WD_LEN 8
  119. struct bfi_sgpg_s {
  120. struct bfi_sge_s sges[BFI_SGPG_SGES_MAX];
  121. u32 rsvd[BFI_SGPG_RSVD_WD_LEN];
  122. };
  123. /*
  124. * Large Message structure - 128 Bytes size Msgs
  125. */
  126. #define BFI_LMSG_SZ 128
  127. #define BFI_LMSG_PL_WSZ \
  128. ((BFI_LMSG_SZ - sizeof(struct bfi_mhdr_s)) / 4)
  129. struct bfi_msg_s {
  130. struct bfi_mhdr_s mhdr;
  131. u32 pl[BFI_LMSG_PL_WSZ];
  132. };
  133. /*
  134. * Mailbox message structure
  135. */
  136. #define BFI_MBMSG_SZ 7
  137. struct bfi_mbmsg_s {
  138. struct bfi_mhdr_s mh;
  139. u32 pl[BFI_MBMSG_SZ];
  140. };
  141. /*
  142. * Supported PCI function class codes (personality)
  143. */
  144. enum bfi_pcifn_class {
  145. BFI_PCIFN_CLASS_FC = 0x0c04,
  146. BFI_PCIFN_CLASS_ETH = 0x0200,
  147. };
  148. /*
  149. * Message Classes
  150. */
  151. enum bfi_mclass {
  152. BFI_MC_IOC = 1, /* IO Controller (IOC) */
  153. BFI_MC_FCPORT = 5, /* FC port */
  154. BFI_MC_IOCFC = 6, /* FC - IO Controller (IOC) */
  155. BFI_MC_LL = 7, /* Link Layer */
  156. BFI_MC_UF = 8, /* Unsolicited frame receive */
  157. BFI_MC_FCXP = 9, /* FC Transport */
  158. BFI_MC_LPS = 10, /* lport fc login services */
  159. BFI_MC_RPORT = 11, /* Remote port */
  160. BFI_MC_ITNIM = 12, /* I-T nexus (Initiator mode) */
  161. BFI_MC_IOIM_READ = 13, /* read IO (Initiator mode) */
  162. BFI_MC_IOIM_WRITE = 14, /* write IO (Initiator mode) */
  163. BFI_MC_IOIM_IO = 15, /* IO (Initiator mode) */
  164. BFI_MC_IOIM = 16, /* IO (Initiator mode) */
  165. BFI_MC_IOIM_IOCOM = 17, /* good IO completion */
  166. BFI_MC_TSKIM = 18, /* Initiator Task management */
  167. BFI_MC_PORT = 21, /* Physical port */
  168. BFI_MC_MAX = 32
  169. };
  170. #define BFI_IOC_MAX_CQS 4
  171. #define BFI_IOC_MAX_CQS_ASIC 8
  172. #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */
  173. #define BFI_BOOT_TYPE_OFF 8
  174. #define BFI_BOOT_LOADER_OFF 12
  175. #define BFI_BOOT_TYPE_NORMAL 0
  176. #define BFI_BOOT_TYPE_FLASH 1
  177. #define BFI_BOOT_TYPE_MEMTEST 2
  178. #define BFI_BOOT_LOADER_OS 0
  179. #define BFI_BOOT_LOADER_BIOS 1
  180. #define BFI_BOOT_LOADER_UEFI 2
  181. /*
  182. *----------------------------------------------------------------------
  183. * IOC
  184. *----------------------------------------------------------------------
  185. */
  186. enum bfi_ioc_h2i_msgs {
  187. BFI_IOC_H2I_ENABLE_REQ = 1,
  188. BFI_IOC_H2I_DISABLE_REQ = 2,
  189. BFI_IOC_H2I_GETATTR_REQ = 3,
  190. BFI_IOC_H2I_DBG_SYNC = 4,
  191. BFI_IOC_H2I_DBG_DUMP = 5,
  192. };
  193. enum bfi_ioc_i2h_msgs {
  194. BFI_IOC_I2H_ENABLE_REPLY = BFA_I2HM(1),
  195. BFI_IOC_I2H_DISABLE_REPLY = BFA_I2HM(2),
  196. BFI_IOC_I2H_GETATTR_REPLY = BFA_I2HM(3),
  197. BFI_IOC_I2H_READY_EVENT = BFA_I2HM(4),
  198. BFI_IOC_I2H_HBEAT = BFA_I2HM(5),
  199. };
  200. /*
  201. * BFI_IOC_H2I_GETATTR_REQ message
  202. */
  203. struct bfi_ioc_getattr_req_s {
  204. struct bfi_mhdr_s mh;
  205. union bfi_addr_u attr_addr;
  206. };
  207. struct bfi_ioc_attr_s {
  208. wwn_t mfg_pwwn; /* Mfg port wwn */
  209. wwn_t mfg_nwwn; /* Mfg node wwn */
  210. mac_t mfg_mac; /* Mfg mac */
  211. u16 rsvd_a;
  212. wwn_t pwwn;
  213. wwn_t nwwn;
  214. mac_t mac; /* PBC or Mfg mac */
  215. u16 rsvd_b;
  216. mac_t fcoe_mac;
  217. u16 rsvd_c;
  218. char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)];
  219. u8 pcie_gen;
  220. u8 pcie_lanes_orig;
  221. u8 pcie_lanes;
  222. u8 rx_bbcredit; /* receive buffer credits */
  223. u32 adapter_prop; /* adapter properties */
  224. u16 maxfrsize; /* max receive frame size */
  225. char asic_rev;
  226. u8 rsvd_d;
  227. char fw_version[BFA_VERSION_LEN];
  228. char optrom_version[BFA_VERSION_LEN];
  229. struct bfa_mfg_vpd_s vpd;
  230. u32 card_type; /* card type */
  231. };
  232. /*
  233. * BFI_IOC_I2H_GETATTR_REPLY message
  234. */
  235. struct bfi_ioc_getattr_reply_s {
  236. struct bfi_mhdr_s mh; /* Common msg header */
  237. u8 status; /* cfg reply status */
  238. u8 rsvd[3];
  239. };
  240. /*
  241. * Firmware memory page offsets
  242. */
  243. #define BFI_IOC_SMEM_PG0_CB (0x40)
  244. #define BFI_IOC_SMEM_PG0_CT (0x180)
  245. /*
  246. * Firmware statistic offset
  247. */
  248. #define BFI_IOC_FWSTATS_OFF (0x6B40)
  249. #define BFI_IOC_FWSTATS_SZ (4096)
  250. /*
  251. * Firmware trace offset
  252. */
  253. #define BFI_IOC_TRC_OFF (0x4b00)
  254. #define BFI_IOC_TRC_ENTS 256
  255. #define BFI_IOC_FW_SIGNATURE (0xbfadbfad)
  256. #define BFI_IOC_MD5SUM_SZ 4
  257. struct bfi_ioc_image_hdr_s {
  258. u32 signature; /* constant signature */
  259. u32 rsvd_a;
  260. u32 exec; /* exec vector */
  261. u32 param; /* parameters */
  262. u32 rsvd_b[4];
  263. u32 md5sum[BFI_IOC_MD5SUM_SZ];
  264. };
  265. /*
  266. * BFI_IOC_I2H_READY_EVENT message
  267. */
  268. struct bfi_ioc_rdy_event_s {
  269. struct bfi_mhdr_s mh; /* common msg header */
  270. u8 init_status; /* init event status */
  271. u8 rsvd[3];
  272. };
  273. struct bfi_ioc_hbeat_s {
  274. struct bfi_mhdr_s mh; /* common msg header */
  275. u32 hb_count; /* current heart beat count */
  276. };
  277. /*
  278. * IOC hardware/firmware state
  279. */
  280. enum bfi_ioc_state {
  281. BFI_IOC_UNINIT = 0, /* not initialized */
  282. BFI_IOC_INITING = 1, /* h/w is being initialized */
  283. BFI_IOC_HWINIT = 2, /* h/w is initialized */
  284. BFI_IOC_CFG = 3, /* IOC configuration in progress */
  285. BFI_IOC_OP = 4, /* IOC is operational */
  286. BFI_IOC_DISABLING = 5, /* IOC is being disabled */
  287. BFI_IOC_DISABLED = 6, /* IOC is disabled */
  288. BFI_IOC_CFG_DISABLED = 7, /* IOC is being disabled;transient */
  289. BFI_IOC_FAIL = 8, /* IOC heart-beat failure */
  290. BFI_IOC_MEMTEST = 9, /* IOC is doing memtest */
  291. };
  292. #define BFI_IOC_ENDIAN_SIG 0x12345678
  293. enum {
  294. BFI_ADAPTER_TYPE_FC = 0x01, /* FC adapters */
  295. BFI_ADAPTER_TYPE_MK = 0x0f0000, /* adapter type mask */
  296. BFI_ADAPTER_TYPE_SH = 16, /* adapter type shift */
  297. BFI_ADAPTER_NPORTS_MK = 0xff00, /* number of ports mask */
  298. BFI_ADAPTER_NPORTS_SH = 8, /* number of ports shift */
  299. BFI_ADAPTER_SPEED_MK = 0xff, /* adapter speed mask */
  300. BFI_ADAPTER_SPEED_SH = 0, /* adapter speed shift */
  301. BFI_ADAPTER_PROTO = 0x100000, /* prototype adapaters */
  302. BFI_ADAPTER_TTV = 0x200000, /* TTV debug capable */
  303. BFI_ADAPTER_UNSUPP = 0x400000, /* unknown adapter type */
  304. };
  305. #define BFI_ADAPTER_GETP(__prop, __adap_prop) \
  306. (((__adap_prop) & BFI_ADAPTER_ ## __prop ## _MK) >> \
  307. BFI_ADAPTER_ ## __prop ## _SH)
  308. #define BFI_ADAPTER_SETP(__prop, __val) \
  309. ((__val) << BFI_ADAPTER_ ## __prop ## _SH)
  310. #define BFI_ADAPTER_IS_PROTO(__adap_type) \
  311. ((__adap_type) & BFI_ADAPTER_PROTO)
  312. #define BFI_ADAPTER_IS_TTV(__adap_type) \
  313. ((__adap_type) & BFI_ADAPTER_TTV)
  314. #define BFI_ADAPTER_IS_UNSUPP(__adap_type) \
  315. ((__adap_type) & BFI_ADAPTER_UNSUPP)
  316. #define BFI_ADAPTER_IS_SPECIAL(__adap_type) \
  317. ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \
  318. BFI_ADAPTER_UNSUPP))
  319. /*
  320. * BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages
  321. */
  322. struct bfi_ioc_ctrl_req_s {
  323. struct bfi_mhdr_s mh;
  324. u16 clscode;
  325. u16 rsvd;
  326. u32 tv_sec;
  327. };
  328. #define bfi_ioc_enable_req_t struct bfi_ioc_ctrl_req_s;
  329. #define bfi_ioc_disable_req_t struct bfi_ioc_ctrl_req_s;
  330. /*
  331. * BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages
  332. */
  333. struct bfi_ioc_ctrl_reply_s {
  334. struct bfi_mhdr_s mh; /* Common msg header */
  335. u8 status; /* enable/disable status */
  336. u8 rsvd[3];
  337. };
  338. #define bfi_ioc_enable_reply_t struct bfi_ioc_ctrl_reply_s;
  339. #define bfi_ioc_disable_reply_t struct bfi_ioc_ctrl_reply_s;
  340. #define BFI_IOC_MSGSZ 8
  341. /*
  342. * H2I Messages
  343. */
  344. union bfi_ioc_h2i_msg_u {
  345. struct bfi_mhdr_s mh;
  346. struct bfi_ioc_ctrl_req_s enable_req;
  347. struct bfi_ioc_ctrl_req_s disable_req;
  348. struct bfi_ioc_getattr_req_s getattr_req;
  349. u32 mboxmsg[BFI_IOC_MSGSZ];
  350. };
  351. /*
  352. * I2H Messages
  353. */
  354. union bfi_ioc_i2h_msg_u {
  355. struct bfi_mhdr_s mh;
  356. struct bfi_ioc_rdy_event_s rdy_event;
  357. u32 mboxmsg[BFI_IOC_MSGSZ];
  358. };
  359. /*
  360. *----------------------------------------------------------------------
  361. * PBC
  362. *----------------------------------------------------------------------
  363. */
  364. #define BFI_PBC_MAX_BLUNS 8
  365. #define BFI_PBC_MAX_VPORTS 16
  366. #define BFI_PBC_PORT_DISABLED 2
  367. /*
  368. * PBC boot lun configuration
  369. */
  370. struct bfi_pbc_blun_s {
  371. wwn_t tgt_pwwn;
  372. struct scsi_lun tgt_lun;
  373. };
  374. /*
  375. * PBC virtual port configuration
  376. */
  377. struct bfi_pbc_vport_s {
  378. wwn_t vp_pwwn;
  379. wwn_t vp_nwwn;
  380. };
  381. /*
  382. * BFI pre-boot configuration information
  383. */
  384. struct bfi_pbc_s {
  385. u8 port_enabled;
  386. u8 boot_enabled;
  387. u8 nbluns;
  388. u8 nvports;
  389. u8 port_speed;
  390. u8 rsvd_a;
  391. u16 hss;
  392. wwn_t pbc_pwwn;
  393. wwn_t pbc_nwwn;
  394. struct bfi_pbc_blun_s blun[BFI_PBC_MAX_BLUNS];
  395. struct bfi_pbc_vport_s vport[BFI_PBC_MAX_VPORTS];
  396. };
  397. /*
  398. *----------------------------------------------------------------------
  399. * MSGQ
  400. *----------------------------------------------------------------------
  401. */
  402. #define BFI_MSGQ_FULL(_q) (((_q->pi + 1) % _q->q_depth) == _q->ci)
  403. #define BFI_MSGQ_EMPTY(_q) (_q->pi == _q->ci)
  404. #define BFI_MSGQ_UPDATE_CI(_q) (_q->ci = (_q->ci + 1) % _q->q_depth)
  405. #define BFI_MSGQ_UPDATE_PI(_q) (_q->pi = (_q->pi + 1) % _q->q_depth)
  406. /* q_depth must be power of 2 */
  407. #define BFI_MSGQ_FREE_CNT(_q) ((_q->ci - _q->pi - 1) & (_q->q_depth - 1))
  408. enum bfi_msgq_h2i_msgs_e {
  409. BFI_MSGQ_H2I_INIT_REQ = 1,
  410. BFI_MSGQ_H2I_DOORBELL = 2,
  411. BFI_MSGQ_H2I_SHUTDOWN = 3,
  412. };
  413. enum bfi_msgq_i2h_msgs_e {
  414. BFI_MSGQ_I2H_INIT_RSP = 1,
  415. BFI_MSGQ_I2H_DOORBELL = 2,
  416. };
  417. /* Messages(commands/responsed/AENS will have the following header */
  418. struct bfi_msgq_mhdr_s {
  419. u8 msg_class;
  420. u8 msg_id;
  421. u16 msg_token;
  422. u16 num_entries;
  423. u8 enet_id;
  424. u8 rsvd[1];
  425. };
  426. #define bfi_msgq_mhdr_set(_mh, _mc, _mid, _tok, _enet_id) do { \
  427. (_mh).msg_class = (_mc); \
  428. (_mh).msg_id = (_mid); \
  429. (_mh).msg_token = (_tok); \
  430. (_mh).enet_id = (_enet_id); \
  431. } while (0)
  432. /*
  433. * Mailbox for messaging interface
  434. *
  435. */
  436. #define BFI_MSGQ_CMD_ENTRY_SIZE (64) /* TBD */
  437. #define BFI_MSGQ_RSP_ENTRY_SIZE (64) /* TBD */
  438. #define BFI_MSGQ_MSG_SIZE_MAX (2048) /* TBD */
  439. struct bfi_msgq_s {
  440. union bfi_addr_u addr;
  441. u16 q_depth; /* Total num of entries in the queue */
  442. u8 rsvd[2];
  443. };
  444. /* BFI_ENET_MSGQ_CFG_REQ TBD init or cfg? */
  445. struct bfi_msgq_cfg_req_s {
  446. struct bfi_mhdr_s mh;
  447. struct bfi_msgq_s cmdq;
  448. struct bfi_msgq_s rspq;
  449. };
  450. /* BFI_ENET_MSGQ_CFG_RSP */
  451. struct bfi_msgq_cfg_rsp_s {
  452. struct bfi_mhdr_s mh;
  453. u8 cmd_status;
  454. u8 rsvd[3];
  455. };
  456. /* BFI_MSGQ_H2I_DOORBELL */
  457. struct bfi_msgq_h2i_db_s {
  458. struct bfi_mhdr_s mh;
  459. u16 cmdq_pi;
  460. u16 rspq_ci;
  461. };
  462. /* BFI_MSGQ_I2H_DOORBELL */
  463. struct bfi_msgq_i2h_db_s {
  464. struct bfi_mhdr_s mh;
  465. u16 rspq_pi;
  466. u16 cmdq_ci;
  467. };
  468. #pragma pack()
  469. /* BFI port specific */
  470. #pragma pack(1)
  471. enum bfi_port_h2i {
  472. BFI_PORT_H2I_ENABLE_REQ = (1),
  473. BFI_PORT_H2I_DISABLE_REQ = (2),
  474. BFI_PORT_H2I_GET_STATS_REQ = (3),
  475. BFI_PORT_H2I_CLEAR_STATS_REQ = (4),
  476. };
  477. enum bfi_port_i2h {
  478. BFI_PORT_I2H_ENABLE_RSP = BFA_I2HM(1),
  479. BFI_PORT_I2H_DISABLE_RSP = BFA_I2HM(2),
  480. BFI_PORT_I2H_GET_STATS_RSP = BFA_I2HM(3),
  481. BFI_PORT_I2H_CLEAR_STATS_RSP = BFA_I2HM(4),
  482. };
  483. /*
  484. * Generic REQ type
  485. */
  486. struct bfi_port_generic_req_s {
  487. struct bfi_mhdr_s mh; /* msg header */
  488. u32 msgtag; /* msgtag for reply */
  489. u32 rsvd;
  490. };
  491. /*
  492. * Generic RSP type
  493. */
  494. struct bfi_port_generic_rsp_s {
  495. struct bfi_mhdr_s mh; /* common msg header */
  496. u8 status; /* port enable status */
  497. u8 rsvd[3];
  498. u32 msgtag; /* msgtag for reply */
  499. };
  500. /*
  501. * BFI_PORT_H2I_GET_STATS_REQ
  502. */
  503. struct bfi_port_get_stats_req_s {
  504. struct bfi_mhdr_s mh; /* common msg header */
  505. union bfi_addr_u dma_addr;
  506. };
  507. union bfi_port_h2i_msg_u {
  508. struct bfi_mhdr_s mh;
  509. struct bfi_port_generic_req_s enable_req;
  510. struct bfi_port_generic_req_s disable_req;
  511. struct bfi_port_get_stats_req_s getstats_req;
  512. struct bfi_port_generic_req_s clearstats_req;
  513. };
  514. union bfi_port_i2h_msg_u {
  515. struct bfi_mhdr_s mh;
  516. struct bfi_port_generic_rsp_s enable_rsp;
  517. struct bfi_port_generic_rsp_s disable_rsp;
  518. struct bfi_port_generic_rsp_s getstats_rsp;
  519. struct bfi_port_generic_rsp_s clearstats_rsp;
  520. };
  521. #pragma pack()
  522. #endif /* __BFI_H__ */