bfad_bsg.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  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 BFAD_BSG_H
  18. #define BFAD_BSG_H
  19. #include "bfa_defs.h"
  20. #include "bfa_defs_fcs.h"
  21. /* Definitions of vendor unique structures and command codes passed in
  22. * using FC_BSG_HST_VENDOR message code.
  23. */
  24. enum {
  25. IOCMD_IOC_ENABLE = 0x1,
  26. IOCMD_IOC_DISABLE,
  27. IOCMD_IOC_GET_ATTR,
  28. IOCMD_IOC_GET_INFO,
  29. IOCMD_IOC_GET_STATS,
  30. IOCMD_IOC_GET_FWSTATS,
  31. IOCMD_IOC_RESET_STATS,
  32. IOCMD_IOC_RESET_FWSTATS,
  33. IOCMD_IOC_SET_ADAPTER_NAME,
  34. IOCMD_IOC_SET_PORT_NAME,
  35. IOCMD_IOC_FW_SIG_INV,
  36. IOCMD_IOCFC_GET_ATTR,
  37. IOCMD_IOCFC_SET_INTR,
  38. IOCMD_PORT_ENABLE,
  39. IOCMD_PORT_DISABLE,
  40. IOCMD_PORT_GET_ATTR,
  41. IOCMD_PORT_GET_STATS,
  42. IOCMD_PORT_RESET_STATS,
  43. IOCMD_PORT_CFG_TOPO,
  44. IOCMD_PORT_CFG_SPEED,
  45. IOCMD_PORT_CFG_ALPA,
  46. IOCMD_PORT_CFG_MAXFRSZ,
  47. IOCMD_PORT_CLR_ALPA,
  48. IOCMD_PORT_BBCR_ENABLE,
  49. IOCMD_PORT_BBCR_DISABLE,
  50. IOCMD_PORT_BBCR_GET_ATTR,
  51. IOCMD_LPORT_GET_ATTR,
  52. IOCMD_LPORT_GET_RPORTS,
  53. IOCMD_LPORT_GET_STATS,
  54. IOCMD_LPORT_RESET_STATS,
  55. IOCMD_LPORT_GET_IOSTATS,
  56. IOCMD_RPORT_GET_ATTR,
  57. IOCMD_RPORT_GET_ADDR,
  58. IOCMD_RPORT_GET_STATS,
  59. IOCMD_RPORT_RESET_STATS,
  60. IOCMD_RPORT_SET_SPEED,
  61. IOCMD_VPORT_GET_ATTR,
  62. IOCMD_VPORT_GET_STATS,
  63. IOCMD_VPORT_RESET_STATS,
  64. IOCMD_FABRIC_GET_LPORTS,
  65. IOCMD_RATELIM_ENABLE,
  66. IOCMD_RATELIM_DISABLE,
  67. IOCMD_RATELIM_DEF_SPEED,
  68. IOCMD_FCPIM_FAILOVER,
  69. IOCMD_FCPIM_MODSTATS,
  70. IOCMD_FCPIM_MODSTATSCLR,
  71. IOCMD_FCPIM_DEL_ITN_STATS,
  72. IOCMD_ITNIM_GET_ATTR,
  73. IOCMD_ITNIM_GET_IOSTATS,
  74. IOCMD_ITNIM_RESET_STATS,
  75. IOCMD_ITNIM_GET_ITNSTATS,
  76. IOCMD_IOC_PCIFN_CFG,
  77. IOCMD_FCPORT_ENABLE,
  78. IOCMD_FCPORT_DISABLE,
  79. IOCMD_PCIFN_CREATE,
  80. IOCMD_PCIFN_DELETE,
  81. IOCMD_PCIFN_BW,
  82. IOCMD_ADAPTER_CFG_MODE,
  83. IOCMD_PORT_CFG_MODE,
  84. IOCMD_FLASH_ENABLE_OPTROM,
  85. IOCMD_FLASH_DISABLE_OPTROM,
  86. IOCMD_FAA_QUERY,
  87. IOCMD_CEE_GET_ATTR,
  88. IOCMD_CEE_GET_STATS,
  89. IOCMD_CEE_RESET_STATS,
  90. IOCMD_SFP_MEDIA,
  91. IOCMD_SFP_SPEED,
  92. IOCMD_FLASH_GET_ATTR,
  93. IOCMD_FLASH_ERASE_PART,
  94. IOCMD_FLASH_UPDATE_PART,
  95. IOCMD_FLASH_READ_PART,
  96. IOCMD_DIAG_TEMP,
  97. IOCMD_DIAG_MEMTEST,
  98. IOCMD_DIAG_LOOPBACK,
  99. IOCMD_DIAG_FWPING,
  100. IOCMD_DIAG_QUEUETEST,
  101. IOCMD_DIAG_SFP,
  102. IOCMD_DIAG_LED,
  103. IOCMD_DIAG_BEACON_LPORT,
  104. IOCMD_DIAG_LB_STAT,
  105. IOCMD_PHY_GET_ATTR,
  106. IOCMD_PHY_GET_STATS,
  107. IOCMD_PHY_UPDATE_FW,
  108. IOCMD_PHY_READ_FW,
  109. IOCMD_VHBA_QUERY,
  110. IOCMD_DEBUG_PORTLOG,
  111. IOCMD_DEBUG_FW_CORE,
  112. IOCMD_DEBUG_FW_STATE_CLR,
  113. IOCMD_DEBUG_PORTLOG_CLR,
  114. IOCMD_DEBUG_START_DTRC,
  115. IOCMD_DEBUG_STOP_DTRC,
  116. IOCMD_DEBUG_PORTLOG_CTL,
  117. IOCMD_FCPIM_PROFILE_ON,
  118. IOCMD_FCPIM_PROFILE_OFF,
  119. IOCMD_ITNIM_GET_IOPROFILE,
  120. IOCMD_FCPORT_GET_STATS,
  121. IOCMD_FCPORT_RESET_STATS,
  122. IOCMD_BOOT_CFG,
  123. IOCMD_BOOT_QUERY,
  124. IOCMD_PREBOOT_QUERY,
  125. IOCMD_ETHBOOT_CFG,
  126. IOCMD_ETHBOOT_QUERY,
  127. IOCMD_TRUNK_ENABLE,
  128. IOCMD_TRUNK_DISABLE,
  129. IOCMD_TRUNK_GET_ATTR,
  130. IOCMD_QOS_ENABLE,
  131. IOCMD_QOS_DISABLE,
  132. IOCMD_QOS_GET_ATTR,
  133. IOCMD_QOS_GET_VC_ATTR,
  134. IOCMD_QOS_GET_STATS,
  135. IOCMD_QOS_RESET_STATS,
  136. IOCMD_VF_GET_STATS,
  137. IOCMD_VF_RESET_STATS,
  138. IOCMD_FCPIM_LUNMASK_ENABLE,
  139. IOCMD_FCPIM_LUNMASK_DISABLE,
  140. IOCMD_FCPIM_LUNMASK_CLEAR,
  141. IOCMD_FCPIM_LUNMASK_QUERY,
  142. IOCMD_FCPIM_LUNMASK_ADD,
  143. IOCMD_FCPIM_LUNMASK_DELETE,
  144. IOCMD_DIAG_DPORT_ENABLE,
  145. IOCMD_DIAG_DPORT_DISABLE,
  146. IOCMD_QOS_SET_BW,
  147. IOCMD_FCPIM_THROTTLE_QUERY,
  148. IOCMD_FCPIM_THROTTLE_SET,
  149. IOCMD_TFRU_READ,
  150. IOCMD_TFRU_WRITE,
  151. IOCMD_FRUVPD_READ,
  152. IOCMD_FRUVPD_UPDATE,
  153. IOCMD_FRUVPD_GET_MAX_SIZE,
  154. IOCMD_DIAG_DPORT_SHOW,
  155. IOCMD_DIAG_DPORT_START,
  156. };
  157. struct bfa_bsg_gen_s {
  158. bfa_status_t status;
  159. u16 bfad_num;
  160. u16 rsvd;
  161. };
  162. struct bfa_bsg_portlogctl_s {
  163. bfa_status_t status;
  164. u16 bfad_num;
  165. u16 rsvd;
  166. bfa_boolean_t ctl;
  167. int inst_no;
  168. };
  169. struct bfa_bsg_fcpim_profile_s {
  170. bfa_status_t status;
  171. u16 bfad_num;
  172. u16 rsvd;
  173. };
  174. struct bfa_bsg_itnim_ioprofile_s {
  175. bfa_status_t status;
  176. u16 bfad_num;
  177. u16 vf_id;
  178. wwn_t lpwwn;
  179. wwn_t rpwwn;
  180. struct bfa_itnim_ioprofile_s ioprofile;
  181. };
  182. struct bfa_bsg_fcport_stats_s {
  183. bfa_status_t status;
  184. u16 bfad_num;
  185. u16 rsvd;
  186. union bfa_fcport_stats_u stats;
  187. };
  188. struct bfa_bsg_ioc_name_s {
  189. bfa_status_t status;
  190. u16 bfad_num;
  191. u16 rsvd;
  192. char name[BFA_ADAPTER_SYM_NAME_LEN];
  193. };
  194. struct bfa_bsg_ioc_info_s {
  195. bfa_status_t status;
  196. u16 bfad_num;
  197. u16 rsvd;
  198. char serialnum[64];
  199. char hwpath[BFA_STRING_32];
  200. char adapter_hwpath[BFA_STRING_32];
  201. char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
  202. char name[BFA_ADAPTER_SYM_NAME_LEN];
  203. char port_name[BFA_ADAPTER_SYM_NAME_LEN];
  204. char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
  205. wwn_t pwwn;
  206. wwn_t nwwn;
  207. wwn_t factorypwwn;
  208. wwn_t factorynwwn;
  209. mac_t mac;
  210. mac_t factory_mac; /* Factory mac address */
  211. mac_t current_mac; /* Currently assigned mac address */
  212. enum bfa_ioc_type_e ioc_type;
  213. u16 pvid; /* Port vlan id */
  214. u16 rsvd1;
  215. u32 host;
  216. u32 bandwidth; /* For PF support */
  217. u32 rsvd2;
  218. };
  219. struct bfa_bsg_ioc_attr_s {
  220. bfa_status_t status;
  221. u16 bfad_num;
  222. u16 rsvd;
  223. struct bfa_ioc_attr_s ioc_attr;
  224. };
  225. struct bfa_bsg_ioc_stats_s {
  226. bfa_status_t status;
  227. u16 bfad_num;
  228. u16 rsvd;
  229. struct bfa_ioc_stats_s ioc_stats;
  230. };
  231. struct bfa_bsg_ioc_fwstats_s {
  232. bfa_status_t status;
  233. u16 bfad_num;
  234. u16 rsvd;
  235. u32 buf_size;
  236. u32 rsvd1;
  237. u64 buf_ptr;
  238. };
  239. struct bfa_bsg_iocfc_attr_s {
  240. bfa_status_t status;
  241. u16 bfad_num;
  242. u16 rsvd;
  243. struct bfa_iocfc_attr_s iocfc_attr;
  244. };
  245. struct bfa_bsg_iocfc_intr_s {
  246. bfa_status_t status;
  247. u16 bfad_num;
  248. u16 rsvd;
  249. struct bfa_iocfc_intr_attr_s attr;
  250. };
  251. struct bfa_bsg_port_attr_s {
  252. bfa_status_t status;
  253. u16 bfad_num;
  254. u16 rsvd;
  255. struct bfa_port_attr_s attr;
  256. };
  257. struct bfa_bsg_port_cfg_s {
  258. bfa_status_t status;
  259. u16 bfad_num;
  260. u16 rsvd;
  261. u32 param;
  262. u32 rsvd1;
  263. };
  264. struct bfa_bsg_port_cfg_maxfrsize_s {
  265. bfa_status_t status;
  266. u16 bfad_num;
  267. u16 maxfrsize;
  268. };
  269. struct bfa_bsg_port_stats_s {
  270. bfa_status_t status;
  271. u16 bfad_num;
  272. u16 rsvd;
  273. u32 buf_size;
  274. u32 rsvd1;
  275. u64 buf_ptr;
  276. };
  277. struct bfa_bsg_lport_attr_s {
  278. bfa_status_t status;
  279. u16 bfad_num;
  280. u16 vf_id;
  281. wwn_t pwwn;
  282. struct bfa_lport_attr_s port_attr;
  283. };
  284. struct bfa_bsg_lport_stats_s {
  285. bfa_status_t status;
  286. u16 bfad_num;
  287. u16 vf_id;
  288. wwn_t pwwn;
  289. struct bfa_lport_stats_s port_stats;
  290. };
  291. struct bfa_bsg_lport_iostats_s {
  292. bfa_status_t status;
  293. u16 bfad_num;
  294. u16 vf_id;
  295. wwn_t pwwn;
  296. struct bfa_itnim_iostats_s iostats;
  297. };
  298. struct bfa_bsg_lport_get_rports_s {
  299. bfa_status_t status;
  300. u16 bfad_num;
  301. u16 vf_id;
  302. wwn_t pwwn;
  303. u64 rbuf_ptr;
  304. u32 nrports;
  305. u32 rsvd;
  306. };
  307. struct bfa_bsg_rport_attr_s {
  308. bfa_status_t status;
  309. u16 bfad_num;
  310. u16 vf_id;
  311. wwn_t pwwn;
  312. wwn_t rpwwn;
  313. u32 pid;
  314. u32 rsvd;
  315. struct bfa_rport_attr_s attr;
  316. };
  317. struct bfa_bsg_rport_stats_s {
  318. bfa_status_t status;
  319. u16 bfad_num;
  320. u16 vf_id;
  321. wwn_t pwwn;
  322. wwn_t rpwwn;
  323. struct bfa_rport_stats_s stats;
  324. };
  325. struct bfa_bsg_rport_scsi_addr_s {
  326. bfa_status_t status;
  327. u16 bfad_num;
  328. u16 vf_id;
  329. wwn_t pwwn;
  330. wwn_t rpwwn;
  331. u32 host;
  332. u32 bus;
  333. u32 target;
  334. u32 lun;
  335. };
  336. struct bfa_bsg_rport_reset_stats_s {
  337. bfa_status_t status;
  338. u16 bfad_num;
  339. u16 vf_id;
  340. wwn_t pwwn;
  341. wwn_t rpwwn;
  342. };
  343. struct bfa_bsg_rport_set_speed_s {
  344. bfa_status_t status;
  345. u16 bfad_num;
  346. u16 vf_id;
  347. enum bfa_port_speed speed;
  348. u32 rsvd;
  349. wwn_t pwwn;
  350. wwn_t rpwwn;
  351. };
  352. struct bfa_bsg_vport_attr_s {
  353. bfa_status_t status;
  354. u16 bfad_num;
  355. u16 vf_id;
  356. wwn_t vpwwn;
  357. struct bfa_vport_attr_s vport_attr;
  358. };
  359. struct bfa_bsg_vport_stats_s {
  360. bfa_status_t status;
  361. u16 bfad_num;
  362. u16 vf_id;
  363. wwn_t vpwwn;
  364. struct bfa_vport_stats_s vport_stats;
  365. };
  366. struct bfa_bsg_reset_stats_s {
  367. bfa_status_t status;
  368. u16 bfad_num;
  369. u16 vf_id;
  370. wwn_t vpwwn;
  371. };
  372. struct bfa_bsg_fabric_get_lports_s {
  373. bfa_status_t status;
  374. u16 bfad_num;
  375. u16 vf_id;
  376. u64 buf_ptr;
  377. u32 nports;
  378. u32 rsvd;
  379. };
  380. struct bfa_bsg_trl_speed_s {
  381. bfa_status_t status;
  382. u16 bfad_num;
  383. u16 rsvd;
  384. enum bfa_port_speed speed;
  385. };
  386. struct bfa_bsg_fcpim_s {
  387. bfa_status_t status;
  388. u16 bfad_num;
  389. u16 param;
  390. };
  391. struct bfa_bsg_fcpim_modstats_s {
  392. bfa_status_t status;
  393. u16 bfad_num;
  394. struct bfa_itnim_iostats_s modstats;
  395. };
  396. struct bfa_bsg_fcpim_del_itn_stats_s {
  397. bfa_status_t status;
  398. u16 bfad_num;
  399. struct bfa_fcpim_del_itn_stats_s modstats;
  400. };
  401. struct bfa_bsg_fcpim_modstatsclr_s {
  402. bfa_status_t status;
  403. u16 bfad_num;
  404. };
  405. struct bfa_bsg_itnim_attr_s {
  406. bfa_status_t status;
  407. u16 bfad_num;
  408. u16 vf_id;
  409. wwn_t lpwwn;
  410. wwn_t rpwwn;
  411. struct bfa_itnim_attr_s attr;
  412. };
  413. struct bfa_bsg_itnim_iostats_s {
  414. bfa_status_t status;
  415. u16 bfad_num;
  416. u16 vf_id;
  417. wwn_t lpwwn;
  418. wwn_t rpwwn;
  419. struct bfa_itnim_iostats_s iostats;
  420. };
  421. struct bfa_bsg_itnim_itnstats_s {
  422. bfa_status_t status;
  423. u16 bfad_num;
  424. u16 vf_id;
  425. wwn_t lpwwn;
  426. wwn_t rpwwn;
  427. struct bfa_itnim_stats_s itnstats;
  428. };
  429. struct bfa_bsg_pcifn_cfg_s {
  430. bfa_status_t status;
  431. u16 bfad_num;
  432. u16 rsvd;
  433. struct bfa_ablk_cfg_s pcifn_cfg;
  434. };
  435. struct bfa_bsg_pcifn_s {
  436. bfa_status_t status;
  437. u16 bfad_num;
  438. u16 pcifn_id;
  439. u16 bw_min;
  440. u16 bw_max;
  441. u8 port;
  442. enum bfi_pcifn_class pcifn_class;
  443. u8 rsvd[1];
  444. };
  445. struct bfa_bsg_adapter_cfg_mode_s {
  446. bfa_status_t status;
  447. u16 bfad_num;
  448. u16 rsvd;
  449. struct bfa_adapter_cfg_mode_s cfg;
  450. };
  451. struct bfa_bsg_port_cfg_mode_s {
  452. bfa_status_t status;
  453. u16 bfad_num;
  454. u16 instance;
  455. struct bfa_port_cfg_mode_s cfg;
  456. };
  457. struct bfa_bsg_bbcr_enable_s {
  458. bfa_status_t status;
  459. u16 bfad_num;
  460. u8 bb_scn;
  461. u8 rsvd;
  462. };
  463. struct bfa_bsg_bbcr_attr_s {
  464. bfa_status_t status;
  465. u16 bfad_num;
  466. u16 rsvd;
  467. struct bfa_bbcr_attr_s attr;
  468. };
  469. struct bfa_bsg_faa_attr_s {
  470. bfa_status_t status;
  471. u16 bfad_num;
  472. u16 rsvd;
  473. struct bfa_faa_attr_s faa_attr;
  474. };
  475. struct bfa_bsg_cee_attr_s {
  476. bfa_status_t status;
  477. u16 bfad_num;
  478. u16 rsvd;
  479. u32 buf_size;
  480. u32 rsvd1;
  481. u64 buf_ptr;
  482. };
  483. struct bfa_bsg_cee_stats_s {
  484. bfa_status_t status;
  485. u16 bfad_num;
  486. u16 rsvd;
  487. u32 buf_size;
  488. u32 rsvd1;
  489. u64 buf_ptr;
  490. };
  491. struct bfa_bsg_sfp_media_s {
  492. bfa_status_t status;
  493. u16 bfad_num;
  494. u16 rsvd;
  495. enum bfa_defs_sfp_media_e media;
  496. };
  497. struct bfa_bsg_sfp_speed_s {
  498. bfa_status_t status;
  499. u16 bfad_num;
  500. u16 rsvd;
  501. enum bfa_port_speed speed;
  502. };
  503. struct bfa_bsg_flash_attr_s {
  504. bfa_status_t status;
  505. u16 bfad_num;
  506. u16 rsvd;
  507. struct bfa_flash_attr_s attr;
  508. };
  509. struct bfa_bsg_flash_s {
  510. bfa_status_t status;
  511. u16 bfad_num;
  512. u8 instance;
  513. u8 rsvd;
  514. enum bfa_flash_part_type type;
  515. int bufsz;
  516. u64 buf_ptr;
  517. };
  518. struct bfa_bsg_diag_get_temp_s {
  519. bfa_status_t status;
  520. u16 bfad_num;
  521. u16 rsvd;
  522. struct bfa_diag_results_tempsensor_s result;
  523. };
  524. struct bfa_bsg_diag_memtest_s {
  525. bfa_status_t status;
  526. u16 bfad_num;
  527. u16 rsvd[3];
  528. u32 pat;
  529. struct bfa_diag_memtest_result result;
  530. struct bfa_diag_memtest_s memtest;
  531. };
  532. struct bfa_bsg_diag_loopback_s {
  533. bfa_status_t status;
  534. u16 bfad_num;
  535. u16 rsvd;
  536. enum bfa_port_opmode opmode;
  537. enum bfa_port_speed speed;
  538. u32 lpcnt;
  539. u32 pat;
  540. struct bfa_diag_loopback_result_s result;
  541. };
  542. struct bfa_bsg_diag_dport_show_s {
  543. bfa_status_t status;
  544. u16 bfad_num;
  545. u16 rsvd;
  546. struct bfa_diag_dport_result_s result;
  547. };
  548. struct bfa_bsg_dport_enable_s {
  549. bfa_status_t status;
  550. u16 bfad_num;
  551. u16 rsvd;
  552. u16 lpcnt;
  553. u16 pat;
  554. };
  555. struct bfa_bsg_diag_fwping_s {
  556. bfa_status_t status;
  557. u16 bfad_num;
  558. u16 rsvd;
  559. u32 cnt;
  560. u32 pattern;
  561. struct bfa_diag_results_fwping result;
  562. };
  563. struct bfa_bsg_diag_qtest_s {
  564. bfa_status_t status;
  565. u16 bfad_num;
  566. u16 rsvd;
  567. u32 force;
  568. u32 queue;
  569. struct bfa_diag_qtest_result_s result;
  570. };
  571. struct bfa_bsg_sfp_show_s {
  572. bfa_status_t status;
  573. u16 bfad_num;
  574. u16 rsvd;
  575. struct sfp_mem_s sfp;
  576. };
  577. struct bfa_bsg_diag_led_s {
  578. bfa_status_t status;
  579. u16 bfad_num;
  580. u16 rsvd;
  581. struct bfa_diag_ledtest_s ledtest;
  582. };
  583. struct bfa_bsg_diag_beacon_s {
  584. bfa_status_t status;
  585. u16 bfad_num;
  586. u16 rsvd;
  587. bfa_boolean_t beacon;
  588. bfa_boolean_t link_e2e_beacon;
  589. u32 second;
  590. };
  591. struct bfa_bsg_diag_lb_stat_s {
  592. bfa_status_t status;
  593. u16 bfad_num;
  594. u16 rsvd;
  595. };
  596. struct bfa_bsg_phy_attr_s {
  597. bfa_status_t status;
  598. u16 bfad_num;
  599. u16 instance;
  600. struct bfa_phy_attr_s attr;
  601. };
  602. struct bfa_bsg_phy_s {
  603. bfa_status_t status;
  604. u16 bfad_num;
  605. u16 instance;
  606. u64 bufsz;
  607. u64 buf_ptr;
  608. };
  609. struct bfa_bsg_debug_s {
  610. bfa_status_t status;
  611. u16 bfad_num;
  612. u16 rsvd;
  613. u32 bufsz;
  614. int inst_no;
  615. u64 buf_ptr;
  616. u64 offset;
  617. };
  618. struct bfa_bsg_phy_stats_s {
  619. bfa_status_t status;
  620. u16 bfad_num;
  621. u16 instance;
  622. struct bfa_phy_stats_s stats;
  623. };
  624. struct bfa_bsg_vhba_attr_s {
  625. bfa_status_t status;
  626. u16 bfad_num;
  627. u16 pcifn_id;
  628. struct bfa_vhba_attr_s attr;
  629. };
  630. struct bfa_bsg_boot_s {
  631. bfa_status_t status;
  632. u16 bfad_num;
  633. u16 rsvd;
  634. struct bfa_boot_cfg_s cfg;
  635. };
  636. struct bfa_bsg_preboot_s {
  637. bfa_status_t status;
  638. u16 bfad_num;
  639. u16 rsvd;
  640. struct bfa_boot_pbc_s cfg;
  641. };
  642. struct bfa_bsg_ethboot_s {
  643. bfa_status_t status;
  644. u16 bfad_num;
  645. u16 rsvd;
  646. struct bfa_ethboot_cfg_s cfg;
  647. };
  648. struct bfa_bsg_trunk_attr_s {
  649. bfa_status_t status;
  650. u16 bfad_num;
  651. u16 rsvd;
  652. struct bfa_trunk_attr_s attr;
  653. };
  654. struct bfa_bsg_qos_attr_s {
  655. bfa_status_t status;
  656. u16 bfad_num;
  657. u16 rsvd;
  658. struct bfa_qos_attr_s attr;
  659. };
  660. struct bfa_bsg_qos_vc_attr_s {
  661. bfa_status_t status;
  662. u16 bfad_num;
  663. u16 rsvd;
  664. struct bfa_qos_vc_attr_s attr;
  665. };
  666. struct bfa_bsg_qos_bw_s {
  667. bfa_status_t status;
  668. u16 bfad_num;
  669. u16 rsvd;
  670. struct bfa_qos_bw_s qos_bw;
  671. };
  672. struct bfa_bsg_vf_stats_s {
  673. bfa_status_t status;
  674. u16 bfad_num;
  675. u16 vf_id;
  676. struct bfa_vf_stats_s stats;
  677. };
  678. struct bfa_bsg_vf_reset_stats_s {
  679. bfa_status_t status;
  680. u16 bfad_num;
  681. u16 vf_id;
  682. };
  683. struct bfa_bsg_fcpim_lunmask_query_s {
  684. bfa_status_t status;
  685. u16 bfad_num;
  686. struct bfa_lunmask_cfg_s lun_mask;
  687. };
  688. struct bfa_bsg_fcpim_lunmask_s {
  689. bfa_status_t status;
  690. u16 bfad_num;
  691. u16 vf_id;
  692. wwn_t pwwn;
  693. wwn_t rpwwn;
  694. struct scsi_lun lun;
  695. };
  696. struct bfa_bsg_fcpim_throttle_s {
  697. bfa_status_t status;
  698. u16 bfad_num;
  699. u16 vf_id;
  700. struct bfa_defs_fcpim_throttle_s throttle;
  701. };
  702. #define BFA_TFRU_DATA_SIZE 64
  703. #define BFA_MAX_FRUVPD_TRANSFER_SIZE 0x1000
  704. struct bfa_bsg_tfru_s {
  705. bfa_status_t status;
  706. u16 bfad_num;
  707. u16 rsvd;
  708. u32 offset;
  709. u32 len;
  710. u8 data[BFA_TFRU_DATA_SIZE];
  711. };
  712. struct bfa_bsg_fruvpd_s {
  713. bfa_status_t status;
  714. u16 bfad_num;
  715. u16 rsvd1;
  716. u32 offset;
  717. u32 len;
  718. u8 data[BFA_MAX_FRUVPD_TRANSFER_SIZE];
  719. u8 trfr_cmpl;
  720. u8 rsvd2[3];
  721. };
  722. struct bfa_bsg_fruvpd_max_size_s {
  723. bfa_status_t status;
  724. u16 bfad_num;
  725. u16 rsvd;
  726. u32 max_size;
  727. };
  728. struct bfa_bsg_fcpt_s {
  729. bfa_status_t status;
  730. u16 vf_id;
  731. wwn_t lpwwn;
  732. wwn_t dpwwn;
  733. u32 tsecs;
  734. int cts;
  735. enum fc_cos cos;
  736. struct fchs_s fchs;
  737. };
  738. #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
  739. #pragma pack(1)
  740. struct bfa_bsg_data {
  741. int payload_len;
  742. u64 payload;
  743. };
  744. #pragma pack()
  745. #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
  746. (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
  747. BFA_STATUS_FAILED : BFA_STATUS_OK)
  748. #endif /* BFAD_BSG_H */