drv_fcoe_fw_funcs.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* QLogic FCoE Offload Driver
  2. * Copyright (c) 2016-2018 Cavium Inc.
  3. *
  4. * This software is available under the terms of the GNU General Public License
  5. * (GPL) Version 2, available from the file COPYING in the main directory of
  6. * this source tree.
  7. */
  8. #ifndef _FCOE_FW_FUNCS_H
  9. #define _FCOE_FW_FUNCS_H
  10. #include "drv_scsi_fw_funcs.h"
  11. #include "qedf_hsi.h"
  12. #include <linux/qed/qed_if.h>
  13. struct fcoe_task_params {
  14. /* Output parameter [set/filled by the HSI function] */
  15. struct e4_fcoe_task_context *context;
  16. /* Output parameter [set/filled by the HSI function] */
  17. struct fcoe_wqe *sqe;
  18. enum fcoe_task_type task_type;
  19. u32 tx_io_size; /* in bytes */
  20. u32 rx_io_size; /* in bytes */
  21. u32 conn_cid;
  22. u16 itid;
  23. u8 cq_rss_number;
  24. /* Whether it's Tape device or not (0=Disk, 1=Tape) */
  25. u8 is_tape_device;
  26. };
  27. /**
  28. * @brief init_initiator_rw_fcoe_task - Initializes FCoE task context for
  29. * read/write task types and init fcoe_sqe
  30. *
  31. * @param task_params - Pointer to task parameters struct
  32. * @param sgl_task_params - Pointer to SGL task params
  33. * @param sense_data_buffer_phys_addr - Pointer to sense data buffer
  34. * @param task_retry_id - retry identification - Used only for Tape device
  35. * @param fcp_cmnd_payload - FCP CMD Payload
  36. */
  37. int init_initiator_rw_fcoe_task(struct fcoe_task_params *task_params,
  38. struct scsi_sgl_task_params *sgl_task_params,
  39. struct regpair sense_data_buffer_phys_addr,
  40. u32 task_retry_id,
  41. u8 fcp_cmd_payload[32]);
  42. /**
  43. * @brief init_initiator_midpath_fcoe_task - Initializes FCoE task context for
  44. * midpath/unsolicited task types and init fcoe_sqe
  45. *
  46. * @param task_params - Pointer to task parameters struct
  47. * @param mid_path_fc_header - FC header
  48. * @param tx_sgl_task_params - Pointer to Tx SGL task params
  49. * @param rx_sgl_task_params - Pointer to Rx SGL task params
  50. * @param fw_to_place_fc_header - Indication if the FW will place the FC header
  51. * in addition to the data arrives.
  52. */
  53. int init_initiator_midpath_unsolicited_fcoe_task(
  54. struct fcoe_task_params *task_params,
  55. struct fcoe_tx_mid_path_params *mid_path_fc_header,
  56. struct scsi_sgl_task_params *tx_sgl_task_params,
  57. struct scsi_sgl_task_params *rx_sgl_task_params,
  58. u8 fw_to_place_fc_header);
  59. /**
  60. * @brief init_initiator_abort_fcoe_task - Initializes FCoE task context for
  61. * abort task types and init fcoe_sqe
  62. *
  63. * @param task_params - Pointer to task parameters struct
  64. */
  65. int init_initiator_abort_fcoe_task(struct fcoe_task_params *task_params);
  66. /**
  67. * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for
  68. * cleanup task types and init fcoe_sqe
  69. *
  70. *
  71. * @param task_params - Pointer to task parameters struct
  72. */
  73. int init_initiator_cleanup_fcoe_task(struct fcoe_task_params *task_params);
  74. /**
  75. * @brief init_initiator_cleanup_fcoe_task - Initializes FCoE task context for
  76. * sequence recovery task types and init fcoe_sqe
  77. *
  78. *
  79. * @param task_params - Pointer to task parameters struct
  80. * @param desired_offset - The desired offest the task will be re-sent from
  81. */
  82. int init_initiator_sequence_recovery_fcoe_task(
  83. struct fcoe_task_params *task_params,
  84. u32 desired_offset);
  85. #endif