bfad_bsg.h 15 KB

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