be_cmds.h 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159
  1. /**
  2. * Copyright (C) 2005 - 2011 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. #ifndef BEISCSI_CMDS_H
  18. #define BEISCSI_CMDS_H
  19. /**
  20. * The driver sends configuration and managements command requests to the
  21. * firmware in the BE. These requests are communicated to the processor
  22. * using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one
  23. * WRB inside a MAILBOX.
  24. * The commands are serviced by the ARM processor in the OneConnect's MPU.
  25. */
  26. struct be_sge {
  27. u32 pa_lo;
  28. u32 pa_hi;
  29. u32 len;
  30. };
  31. #define MCC_WRB_SGE_CNT_SHIFT 3 /* bits 3 - 7 of dword 0 */
  32. #define MCC_WRB_SGE_CNT_MASK 0x1F /* bits 3 - 7 of dword 0 */
  33. struct be_mcc_wrb {
  34. u32 embedded; /* dword 0 */
  35. u32 payload_length; /* dword 1 */
  36. u32 tag0; /* dword 2 */
  37. u32 tag1; /* dword 3 */
  38. u32 rsvd; /* dword 4 */
  39. union {
  40. u8 embedded_payload[236]; /* used by embedded cmds */
  41. struct be_sge sgl[19]; /* used by non-embedded cmds */
  42. } payload;
  43. };
  44. #define CQE_FLAGS_VALID_MASK (1 << 31)
  45. #define CQE_FLAGS_ASYNC_MASK (1 << 30)
  46. #define CQE_FLAGS_COMPLETED_MASK (1 << 28)
  47. #define CQE_FLAGS_CONSUMED_MASK (1 << 27)
  48. /* Completion Status */
  49. #define MCC_STATUS_SUCCESS 0x0
  50. #define CQE_STATUS_COMPL_MASK 0xFFFF
  51. #define CQE_STATUS_COMPL_SHIFT 0 /* bits 0 - 15 */
  52. #define CQE_STATUS_EXTD_MASK 0xFFFF
  53. #define CQE_STATUS_EXTD_SHIFT 16 /* bits 0 - 15 */
  54. struct be_mcc_compl {
  55. u32 status; /* dword 0 */
  56. u32 tag0; /* dword 1 */
  57. u32 tag1; /* dword 2 */
  58. u32 flags; /* dword 3 */
  59. };
  60. /********* Mailbox door bell *************/
  61. /**
  62. * Used for driver communication with the FW.
  63. * The software must write this register twice to post any command. First,
  64. * it writes the register with hi=1 and the upper bits of the physical address
  65. * for the MAILBOX structure. Software must poll the ready bit until this
  66. * is acknowledged. Then, sotware writes the register with hi=0 with the lower
  67. * bits in the address. It must poll the ready bit until the command is
  68. * complete. Upon completion, the MAILBOX will contain a valid completion
  69. * queue entry.
  70. */
  71. #define MPU_MAILBOX_DB_OFFSET 0x160
  72. #define MPU_MAILBOX_DB_RDY_MASK 0x1 /* bit 0 */
  73. #define MPU_MAILBOX_DB_HI_MASK 0x2 /* bit 1 */
  74. /********** MPU semphore ******************/
  75. #define MPU_EP_SEMAPHORE_OFFSET 0xac
  76. #define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF
  77. #define EP_SEMAPHORE_POST_ERR_MASK 0x1
  78. #define EP_SEMAPHORE_POST_ERR_SHIFT 31
  79. /********** MCC door bell ************/
  80. #define DB_MCCQ_OFFSET 0x140
  81. #define DB_MCCQ_RING_ID_MASK 0x7FF /* bits 0 - 10 */
  82. /* Number of entries posted */
  83. #define DB_MCCQ_NUM_POSTED_SHIFT 16 /* bits 16 - 29 */
  84. /* MPU semphore POST stage values */
  85. #define POST_STAGE_ARMFW_RDY 0xc000 /* FW is done with POST */
  86. /**
  87. * When the async bit of mcc_compl is set, the last 4 bytes of
  88. * mcc_compl is interpreted as follows:
  89. */
  90. #define ASYNC_TRAILER_EVENT_CODE_SHIFT 8 /* bits 8 - 15 */
  91. #define ASYNC_TRAILER_EVENT_CODE_MASK 0xFF
  92. #define ASYNC_EVENT_CODE_LINK_STATE 0x1
  93. struct be_async_event_trailer {
  94. u32 code;
  95. };
  96. enum {
  97. ASYNC_EVENT_LINK_DOWN = 0x0,
  98. ASYNC_EVENT_LINK_UP = 0x1
  99. };
  100. /**
  101. * When the event code of an async trailer is link-state, the mcc_compl
  102. * must be interpreted as follows
  103. */
  104. struct be_async_event_link_state {
  105. u8 physical_port;
  106. u8 port_link_status;
  107. u8 port_duplex;
  108. u8 port_speed;
  109. u8 port_fault;
  110. u8 rsvd0[7];
  111. struct be_async_event_trailer trailer;
  112. } __packed;
  113. struct be_mcc_mailbox {
  114. struct be_mcc_wrb wrb;
  115. struct be_mcc_compl compl;
  116. };
  117. /* Type of subsystems supported by FW */
  118. #define CMD_SUBSYSTEM_COMMON 0x1
  119. #define CMD_SUBSYSTEM_ISCSI 0x2
  120. #define CMD_SUBSYSTEM_ETH 0x3
  121. #define CMD_SUBSYSTEM_ISCSI_INI 0x6
  122. #define CMD_COMMON_TCP_UPLOAD 0x1
  123. /**
  124. * List of common opcodes subsystem CMD_SUBSYSTEM_COMMON
  125. * These opcodes are unique for each subsystem defined above
  126. */
  127. #define OPCODE_COMMON_CQ_CREATE 12
  128. #define OPCODE_COMMON_EQ_CREATE 13
  129. #define OPCODE_COMMON_MCC_CREATE 21
  130. #define OPCODE_COMMON_GET_CNTL_ATTRIBUTES 32
  131. #define OPCODE_COMMON_GET_FW_VERSION 35
  132. #define OPCODE_COMMON_MODIFY_EQ_DELAY 41
  133. #define OPCODE_COMMON_FIRMWARE_CONFIG 42
  134. #define OPCODE_COMMON_MCC_DESTROY 53
  135. #define OPCODE_COMMON_CQ_DESTROY 54
  136. #define OPCODE_COMMON_EQ_DESTROY 55
  137. #define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG 58
  138. #define OPCODE_COMMON_FUNCTION_RESET 61
  139. /**
  140. * LIST of opcodes that are common between Initiator and Target
  141. * used by CMD_SUBSYSTEM_ISCSI
  142. * These opcodes are unique for each subsystem defined above
  143. */
  144. #define OPCODE_COMMON_ISCSI_CFG_POST_SGL_PAGES 2
  145. #define OPCODE_COMMON_ISCSI_CFG_REMOVE_SGL_PAGES 3
  146. #define OPCODE_COMMON_ISCSI_NTWK_GET_NIC_CONFIG 7
  147. #define OPCODE_COMMON_ISCSI_NTWK_SET_VLAN 14
  148. #define OPCODE_COMMON_ISCSI_NTWK_CONFIG_STATELESS_IP_ADDR 17
  149. #define OPCODE_COMMON_ISCSI_NTWK_REL_STATELESS_IP_ADDR 18
  150. #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_IP_ADDR 21
  151. #define OPCODE_COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY 22
  152. #define OPCODE_COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 23
  153. #define OPCODE_COMMON_ISCSI_NTWK_GET_ALL_IF_ID 24
  154. #define OPCODE_COMMON_ISCSI_NTWK_GET_IF_INFO 25
  155. #define OPCODE_COMMON_ISCSI_SET_FRAGNUM_BITS_FOR_SGL_CRA 61
  156. #define OPCODE_COMMON_ISCSI_DEFQ_CREATE 64
  157. #define OPCODE_COMMON_ISCSI_DEFQ_DESTROY 65
  158. #define OPCODE_COMMON_ISCSI_WRBQ_CREATE 66
  159. #define OPCODE_COMMON_ISCSI_WRBQ_DESTROY 67
  160. struct be_cmd_req_hdr {
  161. u8 opcode; /* dword 0 */
  162. u8 subsystem; /* dword 0 */
  163. u8 port_number; /* dword 0 */
  164. u8 domain; /* dword 0 */
  165. u32 timeout; /* dword 1 */
  166. u32 request_length; /* dword 2 */
  167. u32 rsvd0; /* dword 3 */
  168. };
  169. struct be_cmd_resp_hdr {
  170. u32 info; /* dword 0 */
  171. u32 status; /* dword 1 */
  172. u32 response_length; /* dword 2 */
  173. u32 actual_resp_len; /* dword 3 */
  174. };
  175. struct phys_addr {
  176. u32 lo;
  177. u32 hi;
  178. };
  179. /**************************
  180. * BE Command definitions *
  181. **************************/
  182. /**
  183. * Pseudo amap definition in which each bit of the actual structure is defined
  184. * as a byte - used to calculate offset/shift/mask of each field
  185. */
  186. struct amap_eq_context {
  187. u8 cidx[13]; /* dword 0 */
  188. u8 rsvd0[3]; /* dword 0 */
  189. u8 epidx[13]; /* dword 0 */
  190. u8 valid; /* dword 0 */
  191. u8 rsvd1; /* dword 0 */
  192. u8 size; /* dword 0 */
  193. u8 pidx[13]; /* dword 1 */
  194. u8 rsvd2[3]; /* dword 1 */
  195. u8 pd[10]; /* dword 1 */
  196. u8 count[3]; /* dword 1 */
  197. u8 solevent; /* dword 1 */
  198. u8 stalled; /* dword 1 */
  199. u8 armed; /* dword 1 */
  200. u8 rsvd3[4]; /* dword 2 */
  201. u8 func[8]; /* dword 2 */
  202. u8 rsvd4; /* dword 2 */
  203. u8 delaymult[10]; /* dword 2 */
  204. u8 rsvd5[2]; /* dword 2 */
  205. u8 phase[2]; /* dword 2 */
  206. u8 nodelay; /* dword 2 */
  207. u8 rsvd6[4]; /* dword 2 */
  208. u8 rsvd7[32]; /* dword 3 */
  209. } __packed;
  210. struct be_cmd_req_eq_create {
  211. struct be_cmd_req_hdr hdr; /* dw[4] */
  212. u16 num_pages; /* sword */
  213. u16 rsvd0; /* sword */
  214. u8 context[sizeof(struct amap_eq_context) / 8]; /* dw[4] */
  215. struct phys_addr pages[8];
  216. } __packed;
  217. struct be_cmd_resp_eq_create {
  218. struct be_cmd_resp_hdr resp_hdr;
  219. u16 eq_id; /* sword */
  220. u16 rsvd0; /* sword */
  221. } __packed;
  222. struct mgmt_chap_format {
  223. u32 flags;
  224. u8 intr_chap_name[256];
  225. u8 intr_secret[16];
  226. u8 target_chap_name[256];
  227. u8 target_secret[16];
  228. u16 intr_chap_name_length;
  229. u16 intr_secret_length;
  230. u16 target_chap_name_length;
  231. u16 target_secret_length;
  232. } __packed;
  233. struct mgmt_auth_method_format {
  234. u8 auth_method_type;
  235. u8 padding[3];
  236. struct mgmt_chap_format chap;
  237. } __packed;
  238. struct mgmt_conn_login_options {
  239. u8 flags;
  240. u8 header_digest;
  241. u8 data_digest;
  242. u8 rsvd0;
  243. u32 max_recv_datasegment_len_ini;
  244. u32 max_recv_datasegment_len_tgt;
  245. u32 tcp_mss;
  246. u32 tcp_window_size;
  247. struct mgmt_auth_method_format auth_data;
  248. } __packed;
  249. struct ip_addr_format {
  250. u16 size_of_structure;
  251. u8 reserved;
  252. u8 ip_type;
  253. u8 addr[16];
  254. u32 rsvd0;
  255. } __packed;
  256. struct mgmt_conn_info {
  257. u32 connection_handle;
  258. u32 connection_status;
  259. u16 src_port;
  260. u16 dest_port;
  261. u16 dest_port_redirected;
  262. u16 cid;
  263. u32 estimated_throughput;
  264. struct ip_addr_format src_ipaddr;
  265. struct ip_addr_format dest_ipaddr;
  266. struct ip_addr_format dest_ipaddr_redirected;
  267. struct mgmt_conn_login_options negotiated_login_options;
  268. } __packed;
  269. struct mgmt_session_login_options {
  270. u8 flags;
  271. u8 error_recovery_level;
  272. u16 rsvd0;
  273. u32 first_burst_length;
  274. u32 max_burst_length;
  275. u16 max_connections;
  276. u16 max_outstanding_r2t;
  277. u16 default_time2wait;
  278. u16 default_time2retain;
  279. } __packed;
  280. struct mgmt_session_info {
  281. u32 session_handle;
  282. u32 status;
  283. u8 isid[6];
  284. u16 tsih;
  285. u32 session_flags;
  286. u16 conn_count;
  287. u16 pad;
  288. u8 target_name[224];
  289. u8 initiator_iscsiname[224];
  290. struct mgmt_session_login_options negotiated_login_options;
  291. struct mgmt_conn_info conn_list[1];
  292. } __packed;
  293. struct be_cmd_get_session_req {
  294. struct be_cmd_req_hdr hdr;
  295. u32 session_handle;
  296. } __packed;
  297. struct be_cmd_get_session_resp {
  298. struct be_cmd_resp_hdr hdr;
  299. struct mgmt_session_info session_info;
  300. } __packed;
  301. struct mac_addr {
  302. u16 size_of_structure;
  303. u8 addr[ETH_ALEN];
  304. } __packed;
  305. struct be_cmd_get_boot_target_req {
  306. struct be_cmd_req_hdr hdr;
  307. } __packed;
  308. struct be_cmd_get_boot_target_resp {
  309. struct be_cmd_resp_hdr hdr;
  310. u32 boot_session_count;
  311. int boot_session_handle;
  312. };
  313. struct be_cmd_reopen_session_req {
  314. struct be_cmd_req_hdr hdr;
  315. #define BE_REOPEN_ALL_SESSIONS 0x00
  316. #define BE_REOPEN_BOOT_SESSIONS 0x01
  317. #define BE_REOPEN_A_SESSION 0x02
  318. u16 reopen_type;
  319. u16 rsvd;
  320. u32 session_handle;
  321. } __packed;
  322. struct be_cmd_reopen_session_resp {
  323. struct be_cmd_resp_hdr hdr;
  324. u32 rsvd;
  325. u32 session_handle;
  326. } __packed;
  327. struct be_cmd_mac_query_req {
  328. struct be_cmd_req_hdr hdr;
  329. u8 type;
  330. u8 permanent;
  331. u16 if_id;
  332. } __packed;
  333. struct be_cmd_get_mac_resp {
  334. struct be_cmd_resp_hdr hdr;
  335. struct mac_addr mac;
  336. };
  337. struct be_ip_addr_subnet_format {
  338. u16 size_of_structure;
  339. u8 ip_type;
  340. u8 ipv6_prefix_length;
  341. u8 addr[16];
  342. u8 subnet_mask[16];
  343. u32 rsvd0;
  344. } __packed;
  345. struct be_cmd_get_if_info_req {
  346. struct be_cmd_req_hdr hdr;
  347. u32 interface_hndl;
  348. u32 ip_type;
  349. } __packed;
  350. struct be_cmd_get_if_info_resp {
  351. struct be_cmd_req_hdr hdr;
  352. u32 interface_hndl;
  353. u32 vlan_priority;
  354. u32 ip_addr_count;
  355. u32 dhcp_state;
  356. struct be_ip_addr_subnet_format ip_addr;
  357. } __packed;
  358. struct be_ip_addr_record {
  359. u32 action;
  360. u32 interface_hndl;
  361. struct be_ip_addr_subnet_format ip_addr;
  362. u32 status;
  363. } __packed;
  364. struct be_ip_addr_record_params {
  365. u32 record_entry_count;
  366. struct be_ip_addr_record ip_record;
  367. } __packed;
  368. struct be_cmd_set_ip_addr_req {
  369. struct be_cmd_req_hdr hdr;
  370. struct be_ip_addr_record_params ip_params;
  371. } __packed;
  372. struct be_cmd_set_dhcp_req {
  373. struct be_cmd_req_hdr hdr;
  374. u32 interface_hndl;
  375. u32 ip_type;
  376. u32 flags;
  377. u32 retry_count;
  378. } __packed;
  379. struct be_cmd_rel_dhcp_req {
  380. struct be_cmd_req_hdr hdr;
  381. u32 interface_hndl;
  382. u32 ip_type;
  383. } __packed;
  384. struct be_cmd_set_def_gateway_req {
  385. struct be_cmd_req_hdr hdr;
  386. u32 action;
  387. struct ip_addr_format ip_addr;
  388. } __packed;
  389. struct be_cmd_get_def_gateway_req {
  390. struct be_cmd_req_hdr hdr;
  391. u32 ip_type;
  392. } __packed;
  393. struct be_cmd_get_def_gateway_resp {
  394. struct be_cmd_req_hdr hdr;
  395. struct ip_addr_format ip_addr;
  396. } __packed;
  397. #define BEISCSI_VLAN_DISABLE 0xFFFF
  398. struct be_cmd_set_vlan_req {
  399. struct be_cmd_req_hdr hdr;
  400. u32 interface_hndl;
  401. u32 vlan_priority;
  402. } __packed;
  403. /******************** Create CQ ***************************/
  404. /**
  405. * Pseudo amap definition in which each bit of the actual structure is defined
  406. * as a byte - used to calculate offset/shift/mask of each field
  407. */
  408. struct amap_cq_context {
  409. u8 cidx[11]; /* dword 0 */
  410. u8 rsvd0; /* dword 0 */
  411. u8 coalescwm[2]; /* dword 0 */
  412. u8 nodelay; /* dword 0 */
  413. u8 epidx[11]; /* dword 0 */
  414. u8 rsvd1; /* dword 0 */
  415. u8 count[2]; /* dword 0 */
  416. u8 valid; /* dword 0 */
  417. u8 solevent; /* dword 0 */
  418. u8 eventable; /* dword 0 */
  419. u8 pidx[11]; /* dword 1 */
  420. u8 rsvd2; /* dword 1 */
  421. u8 pd[10]; /* dword 1 */
  422. u8 eqid[8]; /* dword 1 */
  423. u8 stalled; /* dword 1 */
  424. u8 armed; /* dword 1 */
  425. u8 rsvd3[4]; /* dword 2 */
  426. u8 func[8]; /* dword 2 */
  427. u8 rsvd4[20]; /* dword 2 */
  428. u8 rsvd5[32]; /* dword 3 */
  429. } __packed;
  430. struct be_cmd_req_cq_create {
  431. struct be_cmd_req_hdr hdr;
  432. u16 num_pages;
  433. u16 rsvd0;
  434. u8 context[sizeof(struct amap_cq_context) / 8];
  435. struct phys_addr pages[4];
  436. } __packed;
  437. struct be_cmd_resp_cq_create {
  438. struct be_cmd_resp_hdr hdr;
  439. u16 cq_id;
  440. u16 rsvd0;
  441. } __packed;
  442. /******************** Create MCCQ ***************************/
  443. /**
  444. * Pseudo amap definition in which each bit of the actual structure is defined
  445. * as a byte - used to calculate offset/shift/mask of each field
  446. */
  447. struct amap_mcc_context {
  448. u8 con_index[14];
  449. u8 rsvd0[2];
  450. u8 ring_size[4];
  451. u8 fetch_wrb;
  452. u8 fetch_r2t;
  453. u8 cq_id[10];
  454. u8 prod_index[14];
  455. u8 fid[8];
  456. u8 pdid[9];
  457. u8 valid;
  458. u8 rsvd1[32];
  459. u8 rsvd2[32];
  460. } __packed;
  461. struct be_cmd_req_mcc_create {
  462. struct be_cmd_req_hdr hdr;
  463. u16 num_pages;
  464. u16 rsvd0;
  465. u8 context[sizeof(struct amap_mcc_context) / 8];
  466. struct phys_addr pages[8];
  467. } __packed;
  468. struct be_cmd_resp_mcc_create {
  469. struct be_cmd_resp_hdr hdr;
  470. u16 id;
  471. u16 rsvd0;
  472. } __packed;
  473. /******************** Q Destroy ***************************/
  474. /* Type of Queue to be destroyed */
  475. enum {
  476. QTYPE_EQ = 1,
  477. QTYPE_CQ,
  478. QTYPE_MCCQ,
  479. QTYPE_WRBQ,
  480. QTYPE_DPDUQ,
  481. QTYPE_SGL
  482. };
  483. struct be_cmd_req_q_destroy {
  484. struct be_cmd_req_hdr hdr;
  485. u16 id;
  486. u16 bypass_flush; /* valid only for rx q destroy */
  487. } __packed;
  488. struct macaddr {
  489. u8 byte[ETH_ALEN];
  490. };
  491. struct be_cmd_req_mcast_mac_config {
  492. struct be_cmd_req_hdr hdr;
  493. u16 num_mac;
  494. u8 promiscuous;
  495. u8 interface_id;
  496. struct macaddr mac[32];
  497. } __packed;
  498. static inline void *embedded_payload(struct be_mcc_wrb *wrb)
  499. {
  500. return wrb->payload.embedded_payload;
  501. }
  502. static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb)
  503. {
  504. return &wrb->payload.sgl[0];
  505. }
  506. /******************** Modify EQ Delay *******************/
  507. struct be_cmd_req_modify_eq_delay {
  508. struct be_cmd_req_hdr hdr;
  509. u32 num_eq;
  510. struct {
  511. u32 eq_id;
  512. u32 phase;
  513. u32 delay_multiplier;
  514. } delay[8];
  515. } __packed;
  516. /******************** Get MAC ADDR *******************/
  517. #define ETH_ALEN 6
  518. struct be_cmd_get_nic_conf_req {
  519. struct be_cmd_req_hdr hdr;
  520. u32 nic_port_count;
  521. u32 speed;
  522. u32 max_speed;
  523. u32 link_state;
  524. u32 max_frame_size;
  525. u16 size_of_structure;
  526. u8 mac_address[ETH_ALEN];
  527. u32 rsvd[23];
  528. };
  529. struct be_cmd_get_nic_conf_resp {
  530. struct be_cmd_resp_hdr hdr;
  531. u32 nic_port_count;
  532. u32 speed;
  533. u32 max_speed;
  534. u32 link_state;
  535. u32 max_frame_size;
  536. u16 size_of_structure;
  537. u8 mac_address[6];
  538. u32 rsvd[23];
  539. };
  540. #define BEISCSI_ALIAS_LEN 32
  541. struct be_cmd_hba_name {
  542. struct be_cmd_req_hdr hdr;
  543. u16 flags;
  544. u16 rsvd0;
  545. u8 initiator_name[ISCSI_NAME_LEN];
  546. u8 initiator_alias[BEISCSI_ALIAS_LEN];
  547. } __packed;
  548. struct be_cmd_ntwk_link_status_req {
  549. struct be_cmd_req_hdr hdr;
  550. u32 rsvd0;
  551. } __packed;
  552. /*** Port Speed Values ***/
  553. #define BE2ISCSI_LINK_SPEED_ZERO 0x00
  554. #define BE2ISCSI_LINK_SPEED_10MBPS 0x01
  555. #define BE2ISCSI_LINK_SPEED_100MBPS 0x02
  556. #define BE2ISCSI_LINK_SPEED_1GBPS 0x03
  557. #define BE2ISCSI_LINK_SPEED_10GBPS 0x04
  558. struct be_cmd_ntwk_link_status_resp {
  559. struct be_cmd_resp_hdr hdr;
  560. u8 phys_port;
  561. u8 mac_duplex;
  562. u8 mac_speed;
  563. u8 mac_fault;
  564. u8 mgmt_mac_duplex;
  565. u8 mgmt_mac_speed;
  566. u16 qos_link_speed;
  567. u32 logical_link_speed;
  568. } __packed;
  569. int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl,
  570. struct be_queue_info *eq, int eq_delay);
  571. int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
  572. struct be_queue_info *cq, struct be_queue_info *eq,
  573. bool sol_evts, bool no_delay,
  574. int num_cqe_dma_coalesce);
  575. int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
  576. int type);
  577. int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
  578. struct be_queue_info *mccq,
  579. struct be_queue_info *cq);
  580. int be_poll_mcc(struct be_ctrl_info *ctrl);
  581. int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
  582. struct beiscsi_hba *phba);
  583. unsigned int be_cmd_get_initname(struct beiscsi_hba *phba);
  584. unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba);
  585. void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag);
  586. /*ISCSI Functuions */
  587. int be_cmd_fw_initialize(struct be_ctrl_info *ctrl);
  588. struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem);
  589. struct be_mcc_wrb *wrb_from_mccq(struct beiscsi_hba *phba);
  590. int be_mcc_notify_wait(struct beiscsi_hba *phba);
  591. void be_mcc_notify(struct beiscsi_hba *phba);
  592. unsigned int alloc_mcc_tag(struct beiscsi_hba *phba);
  593. void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
  594. struct be_async_event_link_state *evt);
  595. int be_mcc_compl_process_isr(struct be_ctrl_info *ctrl,
  596. struct be_mcc_compl *compl);
  597. int be_mbox_notify(struct be_ctrl_info *ctrl);
  598. int be_cmd_create_default_pdu_queue(struct be_ctrl_info *ctrl,
  599. struct be_queue_info *cq,
  600. struct be_queue_info *dq, int length,
  601. int entry_size);
  602. int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
  603. struct be_dma_mem *q_mem, u32 page_offset,
  604. u32 num_pages);
  605. int beiscsi_cmd_reset_function(struct beiscsi_hba *phba);
  606. int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
  607. struct be_queue_info *wrbq);
  608. bool is_link_state_evt(u32 trailer);
  609. /* Configuration Functions */
  610. int be_cmd_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag);
  611. struct be_default_pdu_context {
  612. u32 dw[4];
  613. } __packed;
  614. struct amap_be_default_pdu_context {
  615. u8 dbuf_cindex[13]; /* dword 0 */
  616. u8 rsvd0[3]; /* dword 0 */
  617. u8 ring_size[4]; /* dword 0 */
  618. u8 ring_state[4]; /* dword 0 */
  619. u8 rsvd1[8]; /* dword 0 */
  620. u8 dbuf_pindex[13]; /* dword 1 */
  621. u8 rsvd2; /* dword 1 */
  622. u8 pci_func_id[8]; /* dword 1 */
  623. u8 rx_pdid[9]; /* dword 1 */
  624. u8 rx_pdid_valid; /* dword 1 */
  625. u8 default_buffer_size[16]; /* dword 2 */
  626. u8 cq_id_recv[10]; /* dword 2 */
  627. u8 rx_pdid_not_valid; /* dword 2 */
  628. u8 rsvd3[5]; /* dword 2 */
  629. u8 rsvd4[32]; /* dword 3 */
  630. } __packed;
  631. struct be_defq_create_req {
  632. struct be_cmd_req_hdr hdr;
  633. u16 num_pages;
  634. u8 ulp_num;
  635. u8 rsvd0;
  636. struct be_default_pdu_context context;
  637. struct phys_addr pages[8];
  638. } __packed;
  639. struct be_defq_create_resp {
  640. struct be_cmd_req_hdr hdr;
  641. u16 id;
  642. u16 rsvd0;
  643. } __packed;
  644. struct be_post_sgl_pages_req {
  645. struct be_cmd_req_hdr hdr;
  646. u16 num_pages;
  647. u16 page_offset;
  648. u32 rsvd0;
  649. struct phys_addr pages[26];
  650. u32 rsvd1;
  651. } __packed;
  652. struct be_wrbq_create_req {
  653. struct be_cmd_req_hdr hdr;
  654. u16 num_pages;
  655. u8 ulp_num;
  656. u8 rsvd0;
  657. struct phys_addr pages[8];
  658. } __packed;
  659. struct be_wrbq_create_resp {
  660. struct be_cmd_resp_hdr resp_hdr;
  661. u16 cid;
  662. u16 rsvd0;
  663. } __packed;
  664. #define SOL_CID_MASK 0x0000FFC0
  665. #define SOL_CODE_MASK 0x0000003F
  666. #define SOL_WRB_INDEX_MASK 0x00FF0000
  667. #define SOL_CMD_WND_MASK 0xFF000000
  668. #define SOL_RES_CNT_MASK 0x7FFFFFFF
  669. #define SOL_EXP_CMD_SN_MASK 0xFFFFFFFF
  670. #define SOL_HW_STS_MASK 0x000000FF
  671. #define SOL_STS_MASK 0x0000FF00
  672. #define SOL_RESP_MASK 0x00FF0000
  673. #define SOL_FLAGS_MASK 0x7F000000
  674. #define SOL_S_MASK 0x80000000
  675. struct sol_cqe {
  676. u32 dw[4];
  677. };
  678. struct amap_sol_cqe {
  679. u8 hw_sts[8]; /* dword 0 */
  680. u8 i_sts[8]; /* dword 0 */
  681. u8 i_resp[8]; /* dword 0 */
  682. u8 i_flags[7]; /* dword 0 */
  683. u8 s; /* dword 0 */
  684. u8 i_exp_cmd_sn[32]; /* dword 1 */
  685. u8 code[6]; /* dword 2 */
  686. u8 cid[10]; /* dword 2 */
  687. u8 wrb_index[8]; /* dword 2 */
  688. u8 i_cmd_wnd[8]; /* dword 2 */
  689. u8 i_res_cnt[31]; /* dword 3 */
  690. u8 valid; /* dword 3 */
  691. } __packed;
  692. #define SOL_ICD_INDEX_MASK 0x0003FFC0
  693. struct amap_sol_cqe_ring {
  694. u8 hw_sts[8]; /* dword 0 */
  695. u8 i_sts[8]; /* dword 0 */
  696. u8 i_resp[8]; /* dword 0 */
  697. u8 i_flags[7]; /* dword 0 */
  698. u8 s; /* dword 0 */
  699. u8 i_exp_cmd_sn[32]; /* dword 1 */
  700. u8 code[6]; /* dword 2 */
  701. u8 icd_index[12]; /* dword 2 */
  702. u8 rsvd[6]; /* dword 2 */
  703. u8 i_cmd_wnd[8]; /* dword 2 */
  704. u8 i_res_cnt[31]; /* dword 3 */
  705. u8 valid; /* dword 3 */
  706. } __packed;
  707. /**
  708. * Post WRB Queue Doorbell Register used by the host Storage
  709. * stack to notify the
  710. * controller of a posted Work Request Block
  711. */
  712. #define DB_WRB_POST_CID_MASK 0x3FF /* bits 0 - 9 */
  713. #define DB_DEF_PDU_WRB_INDEX_MASK 0xFF /* bits 0 - 9 */
  714. #define DB_DEF_PDU_WRB_INDEX_SHIFT 16
  715. #define DB_DEF_PDU_NUM_POSTED_SHIFT 24
  716. struct fragnum_bits_for_sgl_cra_in {
  717. struct be_cmd_req_hdr hdr;
  718. u32 num_bits;
  719. } __packed;
  720. struct iscsi_cleanup_req {
  721. struct be_cmd_req_hdr hdr;
  722. u16 chute;
  723. u8 hdr_ring_id;
  724. u8 data_ring_id;
  725. } __packed;
  726. struct eq_delay {
  727. u32 eq_id;
  728. u32 phase;
  729. u32 delay_multiplier;
  730. } __packed;
  731. struct be_eq_delay_params_in {
  732. struct be_cmd_req_hdr hdr;
  733. u32 num_eq;
  734. struct eq_delay delay[8];
  735. } __packed;
  736. struct tcp_connect_and_offload_in {
  737. struct be_cmd_req_hdr hdr;
  738. struct ip_addr_format ip_address;
  739. u16 tcp_port;
  740. u16 cid;
  741. u16 cq_id;
  742. u16 defq_id;
  743. struct phys_addr dataout_template_pa;
  744. u16 hdr_ring_id;
  745. u16 data_ring_id;
  746. u8 do_offload;
  747. u8 rsvd0[3];
  748. } __packed;
  749. struct tcp_connect_and_offload_out {
  750. struct be_cmd_resp_hdr hdr;
  751. u32 connection_handle;
  752. u16 cid;
  753. u16 rsvd0;
  754. } __packed;
  755. struct be_mcc_wrb_context {
  756. struct MCC_WRB *wrb;
  757. int *users_final_status;
  758. } __packed;
  759. #define DB_DEF_PDU_RING_ID_MASK 0x3FF /* bits 0 - 9 */
  760. #define DB_DEF_PDU_CQPROC_MASK 0x3FFF /* bits 0 - 9 */
  761. #define DB_DEF_PDU_REARM_SHIFT 14
  762. #define DB_DEF_PDU_EVENT_SHIFT 15
  763. #define DB_DEF_PDU_CQPROC_SHIFT 16
  764. struct dmsg_cqe {
  765. u32 dw[4];
  766. } __packed;
  767. struct tcp_upload_params_in {
  768. struct be_cmd_req_hdr hdr;
  769. u16 id;
  770. u16 upload_type;
  771. u32 reset_seq;
  772. } __packed;
  773. struct tcp_upload_params_out {
  774. u32 dw[32];
  775. } __packed;
  776. union tcp_upload_params {
  777. struct tcp_upload_params_in request;
  778. struct tcp_upload_params_out response;
  779. } __packed;
  780. struct be_ulp_fw_cfg {
  781. u32 ulp_mode;
  782. u32 etx_base;
  783. u32 etx_count;
  784. u32 sq_base;
  785. u32 sq_count;
  786. u32 rq_base;
  787. u32 rq_count;
  788. u32 dq_base;
  789. u32 dq_count;
  790. u32 lro_base;
  791. u32 lro_count;
  792. u32 icd_base;
  793. u32 icd_count;
  794. };
  795. struct be_fw_cfg {
  796. struct be_cmd_req_hdr hdr;
  797. u32 be_config_number;
  798. u32 asic_revision;
  799. u32 phys_port;
  800. u32 function_mode;
  801. struct be_ulp_fw_cfg ulp[2];
  802. u32 function_caps;
  803. } __packed;
  804. struct be_cmd_get_all_if_id_req {
  805. struct be_cmd_req_hdr hdr;
  806. u32 if_count;
  807. u32 if_hndl_list[1];
  808. } __packed;
  809. #define ISCSI_OPCODE_SCSI_DATA_OUT 5
  810. #define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
  811. #define OPCODE_COMMON_MODIFY_EQ_DELAY 41
  812. #define OPCODE_COMMON_ISCSI_CLEANUP 59
  813. #define OPCODE_COMMON_TCP_UPLOAD 56
  814. #define OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD 70
  815. #define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1
  816. #define OPCODE_ISCSI_INI_CFG_GET_HBA_NAME 6
  817. #define OPCODE_ISCSI_INI_CFG_SET_HBA_NAME 7
  818. #define OPCODE_ISCSI_INI_SESSION_GET_A_SESSION 14
  819. #define OPCODE_ISCSI_INI_DRIVER_REOPEN_ALL_SESSIONS 36
  820. #define OPCODE_ISCSI_INI_DRIVER_OFFLOAD_SESSION 41
  821. #define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
  822. #define OPCODE_ISCSI_INI_BOOT_GET_BOOT_TARGET 52
  823. #define OPCODE_COMMON_WRITE_FLASH 96
  824. #define OPCODE_COMMON_READ_FLASH 97
  825. /* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */
  826. #define CMD_ISCSI_COMMAND_INVALIDATE 1
  827. #define CMD_ISCSI_CONNECTION_INVALIDATE 0x8001
  828. #define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 0x8002
  829. #define INI_WR_CMD 1 /* Initiator write command */
  830. #define INI_TMF_CMD 2 /* Initiator TMF command */
  831. #define INI_NOPOUT_CMD 3 /* Initiator; Send a NOP-OUT */
  832. #define INI_RD_CMD 5 /* Initiator requesting to send
  833. * a read command
  834. */
  835. #define TGT_CTX_UPDT_CMD 7 /* Target context update */
  836. #define TGT_STS_CMD 8 /* Target R2T and other BHS
  837. * where only the status number
  838. * need to be updated
  839. */
  840. #define TGT_DATAIN_CMD 9 /* Target Data-Ins in response
  841. * to read command
  842. */
  843. #define TGT_SOS_PDU 10 /* Target:standalone status
  844. * response
  845. */
  846. #define TGT_DM_CMD 11 /* Indicates that the bhs
  847. * preparedby
  848. * driver should not be touched
  849. */
  850. /* --- CMD_CHUTE_TYPE --- */
  851. #define CMD_CONNECTION_CHUTE_0 1
  852. #define CMD_CONNECTION_CHUTE_1 2
  853. #define CMD_CONNECTION_CHUTE_2 3
  854. #define EQ_MAJOR_CODE_COMPLETION 0
  855. #define CMD_ISCSI_SESSION_DEL_CFG_FROM_FLASH 0
  856. #define CMD_ISCSI_SESSION_SAVE_CFG_ON_FLASH 1
  857. /* --- CONNECTION_UPLOAD_PARAMS --- */
  858. /* These parameters are used to define the type of upload desired. */
  859. #define CONNECTION_UPLOAD_GRACEFUL 1 /* Graceful upload */
  860. #define CONNECTION_UPLOAD_ABORT_RESET 2 /* Abortive upload with
  861. * reset
  862. */
  863. #define CONNECTION_UPLOAD_ABORT 3 /* Abortive upload without
  864. * reset
  865. */
  866. #define CONNECTION_UPLOAD_ABORT_WITH_SEQ 4 /* Abortive upload with reset,
  867. * sequence number by driver */
  868. /* Returns the number of items in the field array. */
  869. #define BE_NUMBER_OF_FIELD(_type_, _field_) \
  870. (FIELD_SIZEOF(_type_, _field_)/sizeof((((_type_ *)0)->_field_[0])))\
  871. /**
  872. * Different types of iSCSI completions to host driver for both initiator
  873. * and taget mode
  874. * of operation.
  875. */
  876. #define SOL_CMD_COMPLETE 1 /* Solicited command completed
  877. * normally
  878. */
  879. #define SOL_CMD_KILLED_DATA_DIGEST_ERR 2 /* Solicited command got
  880. * invalidated internally due
  881. * to Data Digest error
  882. */
  883. #define CXN_KILLED_PDU_SIZE_EXCEEDS_DSL 3 /* Connection got invalidated
  884. * internally
  885. * due to a received PDU
  886. * size > DSL
  887. */
  888. #define CXN_KILLED_BURST_LEN_MISMATCH 4 /* Connection got invalidated
  889. * internally due ti received
  890. * PDU sequence size >
  891. * FBL/MBL.
  892. */
  893. #define CXN_KILLED_AHS_RCVD 5 /* Connection got invalidated
  894. * internally due to a received
  895. * PDU Hdr that has
  896. * AHS */
  897. #define CXN_KILLED_HDR_DIGEST_ERR 6 /* Connection got invalidated
  898. * internally due to Hdr Digest
  899. * error
  900. */
  901. #define CXN_KILLED_UNKNOWN_HDR 7 /* Connection got invalidated
  902. * internally
  903. * due to a bad opcode in the
  904. * pdu hdr
  905. */
  906. #define CXN_KILLED_STALE_ITT_TTT_RCVD 8 /* Connection got invalidated
  907. * internally due to a received
  908. * ITT/TTT that does not belong
  909. * to this Connection
  910. */
  911. #define CXN_KILLED_INVALID_ITT_TTT_RCVD 9 /* Connection got invalidated
  912. * internally due to received
  913. * ITT/TTT value > Max
  914. * Supported ITTs/TTTs
  915. */
  916. #define CXN_KILLED_RST_RCVD 10 /* Connection got invalidated
  917. * internally due to an
  918. * incoming TCP RST
  919. */
  920. #define CXN_KILLED_TIMED_OUT 11 /* Connection got invalidated
  921. * internally due to timeout on
  922. * tcp segment 12 retransmit
  923. * attempts failed
  924. */
  925. #define CXN_KILLED_RST_SENT 12 /* Connection got invalidated
  926. * internally due to TCP RST
  927. * sent by the Tx side
  928. */
  929. #define CXN_KILLED_FIN_RCVD 13 /* Connection got invalidated
  930. * internally due to an
  931. * incoming TCP FIN.
  932. */
  933. #define CXN_KILLED_BAD_UNSOL_PDU_RCVD 14 /* Connection got invalidated
  934. * internally due to bad
  935. * unsolicited PDU Unsolicited
  936. * PDUs are PDUs with
  937. * ITT=0xffffffff
  938. */
  939. #define CXN_KILLED_BAD_WRB_INDEX_ERROR 15 /* Connection got invalidated
  940. * internally due to bad WRB
  941. * index.
  942. */
  943. #define CXN_KILLED_OVER_RUN_RESIDUAL 16 /* Command got invalidated
  944. * internally due to received
  945. * command has residual
  946. * over run bytes.
  947. */
  948. #define CXN_KILLED_UNDER_RUN_RESIDUAL 17 /* Command got invalidated
  949. * internally due to received
  950. * command has residual under
  951. * run bytes.
  952. */
  953. #define CMD_KILLED_INVALID_STATSN_RCVD 18 /* Command got invalidated
  954. * internally due to a received
  955. * PDU has an invalid StatusSN
  956. */
  957. #define CMD_KILLED_INVALID_R2T_RCVD 19 /* Command got invalidated
  958. * internally due to a received
  959. * an R2T with some invalid
  960. * fields in it
  961. */
  962. #define CMD_CXN_KILLED_LUN_INVALID 20 /* Command got invalidated
  963. * internally due to received
  964. * PDU has an invalid LUN.
  965. */
  966. #define CMD_CXN_KILLED_ICD_INVALID 21 /* Command got invalidated
  967. * internally due to the
  968. * corresponding ICD not in a
  969. * valid state
  970. */
  971. #define CMD_CXN_KILLED_ITT_INVALID 22 /* Command got invalidated due
  972. * to received PDU has an
  973. * invalid ITT.
  974. */
  975. #define CMD_CXN_KILLED_SEQ_OUTOFORDER 23 /* Command got invalidated due
  976. * to received sequence buffer
  977. * offset is out of order.
  978. */
  979. #define CMD_CXN_KILLED_INVALID_DATASN_RCVD 24 /* Command got invalidated
  980. * internally due to a
  981. * received PDU has an invalid
  982. * DataSN
  983. */
  984. #define CXN_INVALIDATE_NOTIFY 25 /* Connection invalidation
  985. * completion notify.
  986. */
  987. #define CXN_INVALIDATE_INDEX_NOTIFY 26 /* Connection invalidation
  988. * completion
  989. * with data PDU index.
  990. */
  991. #define CMD_INVALIDATED_NOTIFY 27 /* Command invalidation
  992. * completionnotifify.
  993. */
  994. #define UNSOL_HDR_NOTIFY 28 /* Unsolicited header notify.*/
  995. #define UNSOL_DATA_NOTIFY 29 /* Unsolicited data notify.*/
  996. #define UNSOL_DATA_DIGEST_ERROR_NOTIFY 30 /* Unsolicited data digest
  997. * error notify.
  998. */
  999. #define DRIVERMSG_NOTIFY 31 /* TCP acknowledge based
  1000. * notification.
  1001. */
  1002. #define CXN_KILLED_CMND_DATA_NOT_ON_SAME_CONN 32 /* Connection got invalidated
  1003. * internally due to command
  1004. * and data are not on same
  1005. * connection.
  1006. */
  1007. #define SOL_CMD_KILLED_DIF_ERR 33 /* Solicited command got
  1008. * invalidated internally due
  1009. * to DIF error
  1010. */
  1011. #define CXN_KILLED_SYN_RCVD 34 /* Connection got invalidated
  1012. * internally due to incoming
  1013. * TCP SYN
  1014. */
  1015. #define CXN_KILLED_IMM_DATA_RCVD 35 /* Connection got invalidated
  1016. * internally due to an
  1017. * incoming Unsolicited PDU
  1018. * that has immediate data on
  1019. * the cxn
  1020. */
  1021. int beiscsi_pci_soft_reset(struct beiscsi_hba *phba);
  1022. int be_chk_reset_complete(struct beiscsi_hba *phba);
  1023. void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len,
  1024. bool embedded, u8 sge_cnt);
  1025. void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr,
  1026. u8 subsystem, u8 opcode, int cmd_len);
  1027. #endif /* !BEISCSI_CMDS_H */