aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_cmds.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.h')
-rw-r--r--drivers/scsi/be2iscsi/be_cmds.h49
1 files changed, 41 insertions, 8 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h
index c20d686cbb43..49fcc787ee8b 100644
--- a/drivers/scsi/be2iscsi/be_cmds.h
+++ b/drivers/scsi/be2iscsi/be_cmds.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright (C) 2005 - 2009 ServerEngines 2 * Copyright (C) 2005 - 2010 ServerEngines
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This program is free software; you can redistribute it and/or 5 * This program is free software; you can redistribute it and/or
@@ -47,6 +47,8 @@ struct be_mcc_wrb {
47 47
48#define CQE_FLAGS_VALID_MASK (1 << 31) 48#define CQE_FLAGS_VALID_MASK (1 << 31)
49#define CQE_FLAGS_ASYNC_MASK (1 << 30) 49#define CQE_FLAGS_ASYNC_MASK (1 << 30)
50#define CQE_FLAGS_COMPLETED_MASK (1 << 28)
51#define CQE_FLAGS_CONSUMED_MASK (1 << 27)
50 52
51/* Completion Status */ 53/* Completion Status */
52#define MCC_STATUS_SUCCESS 0x0 54#define MCC_STATUS_SUCCESS 0x0
@@ -173,7 +175,7 @@ struct be_cmd_req_hdr {
173 u8 domain; /* dword 0 */ 175 u8 domain; /* dword 0 */
174 u32 timeout; /* dword 1 */ 176 u32 timeout; /* dword 1 */
175 u32 request_length; /* dword 2 */ 177 u32 request_length; /* dword 2 */
176 u32 rsvd; /* dword 3 */ 178 u32 rsvd0; /* dword 3 */
177}; 179};
178 180
179struct be_cmd_resp_hdr { 181struct be_cmd_resp_hdr {
@@ -382,7 +384,6 @@ struct be_cmd_req_modify_eq_delay {
382 384
383#define ETH_ALEN 6 385#define ETH_ALEN 6
384 386
385
386struct be_cmd_req_get_mac_addr { 387struct be_cmd_req_get_mac_addr {
387 struct be_cmd_req_hdr hdr; 388 struct be_cmd_req_hdr hdr;
388 u32 nic_port_count; 389 u32 nic_port_count;
@@ -417,14 +418,27 @@ int beiscsi_cmd_cq_create(struct be_ctrl_info *ctrl,
417 418
418int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, 419int beiscsi_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
419 int type); 420 int type);
420int be_poll_mcc(struct be_ctrl_info *ctrl); 421int beiscsi_cmd_mccq_create(struct beiscsi_hba *phba,
421unsigned char mgmt_check_supported_fw(struct be_ctrl_info *ctrl); 422 struct be_queue_info *mccq,
422int be_cmd_get_mac_addr(struct be_ctrl_info *ctrl, u8 *mac_addr); 423 struct be_queue_info *cq);
423 424
425int be_poll_mcc(struct be_ctrl_info *ctrl);
426unsigned char mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
427 struct beiscsi_hba *phba);
428unsigned int be_cmd_get_mac_addr(struct beiscsi_hba *phba);
429void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag);
424/*ISCSI Functuions */ 430/*ISCSI Functuions */
425int be_cmd_fw_initialize(struct be_ctrl_info *ctrl); 431int be_cmd_fw_initialize(struct be_ctrl_info *ctrl);
426 432
427struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem); 433struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem);
434struct be_mcc_wrb *wrb_from_mccq(struct beiscsi_hba *phba);
435int be_mcc_notify_wait(struct beiscsi_hba *phba);
436void be_mcc_notify(struct beiscsi_hba *phba);
437unsigned int alloc_mcc_tag(struct beiscsi_hba *phba);
438void beiscsi_async_link_state_process(struct beiscsi_hba *phba,
439 struct be_async_event_link_state *evt);
440int be_mcc_compl_process_isr(struct be_ctrl_info *ctrl,
441 struct be_mcc_compl *compl);
428 442
429int be_mbox_notify(struct be_ctrl_info *ctrl); 443int be_mbox_notify(struct be_ctrl_info *ctrl);
430 444
@@ -440,6 +454,8 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
440int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem, 454int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
441 struct be_queue_info *wrbq); 455 struct be_queue_info *wrbq);
442 456
457bool is_link_state_evt(u32 trailer);
458
443struct be_default_pdu_context { 459struct be_default_pdu_context {
444 u32 dw[4]; 460 u32 dw[4];
445} __packed; 461} __packed;
@@ -531,6 +547,23 @@ struct amap_sol_cqe {
531 u8 valid; /* dword 3 */ 547 u8 valid; /* dword 3 */
532} __packed; 548} __packed;
533 549
550#define SOL_ICD_INDEX_MASK 0x0003FFC0
551struct amap_sol_cqe_ring {
552 u8 hw_sts[8]; /* dword 0 */
553 u8 i_sts[8]; /* dword 0 */
554 u8 i_resp[8]; /* dword 0 */
555 u8 i_flags[7]; /* dword 0 */
556 u8 s; /* dword 0 */
557 u8 i_exp_cmd_sn[32]; /* dword 1 */
558 u8 code[6]; /* dword 2 */
559 u8 icd_index[12]; /* dword 2 */
560 u8 rsvd[6]; /* dword 2 */
561 u8 i_cmd_wnd[8]; /* dword 2 */
562 u8 i_res_cnt[31]; /* dword 3 */
563 u8 valid; /* dword 3 */
564} __packed;
565
566
534 567
535/** 568/**
536 * Post WRB Queue Doorbell Register used by the host Storage 569 * Post WRB Queue Doorbell Register used by the host Storage
@@ -664,8 +697,8 @@ struct be_fw_cfg {
664#define OPCODE_COMMON_TCP_UPLOAD 56 697#define OPCODE_COMMON_TCP_UPLOAD 56
665#define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1 698#define OPCODE_COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_COMMANDS 1
666/* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */ 699/* --- CMD_ISCSI_INVALIDATE_CONNECTION_TYPE --- */
667#define CMD_ISCSI_CONNECTION_INVALIDATE 1 700#define CMD_ISCSI_CONNECTION_INVALIDATE 0x8001
668#define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 2 701#define CMD_ISCSI_CONNECTION_ISSUE_TCP_RST 0x8002
669#define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42 702#define OPCODE_ISCSI_INI_DRIVER_INVALIDATE_CONNECTION 42
670 703
671#define INI_WR_CMD 1 /* Initiator write command */ 704#define INI_WR_CMD 1 /* Initiator write command */