bfi_fcxp.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2005-2009 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 __BFI_FCXP_H__
  18. #define __BFI_FCXP_H__
  19. #include "bfi.h"
  20. #pragma pack(1)
  21. enum bfi_fcxp_h2i {
  22. BFI_FCXP_H2I_SEND_REQ = 1,
  23. };
  24. enum bfi_fcxp_i2h {
  25. BFI_FCXP_I2H_SEND_RSP = BFA_I2HM(1),
  26. };
  27. #define BFA_FCXP_MAX_SGES 2
  28. /**
  29. * FCXP send request structure
  30. */
  31. struct bfi_fcxp_send_req_s {
  32. struct bfi_mhdr_s mh; /* Common msg header */
  33. u16 fcxp_tag; /* driver request tag */
  34. u16 max_frmsz; /* max send frame size */
  35. u16 vf_id; /* vsan tag if applicable */
  36. u16 rport_fw_hndl; /* FW Handle for the remote port */
  37. u8 class; /* FC class used for req/rsp */
  38. u8 rsp_timeout; /* timeout in secs, 0-no response */
  39. u8 cts; /* continue sequence */
  40. u8 lp_tag; /* lport tag */
  41. struct fchs_s fchs; /* request FC header structure */
  42. u32 req_len; /* request payload length */
  43. u32 rsp_maxlen; /* max response length expected */
  44. struct bfi_sge_s req_sge[BFA_FCXP_MAX_SGES]; /* request buf */
  45. struct bfi_sge_s rsp_sge[BFA_FCXP_MAX_SGES]; /* response buf */
  46. };
  47. /**
  48. * FCXP send response structure
  49. */
  50. struct bfi_fcxp_send_rsp_s {
  51. struct bfi_mhdr_s mh; /* Common msg header */
  52. u16 fcxp_tag; /* send request tag */
  53. u8 req_status; /* request status */
  54. u8 rsvd;
  55. u32 rsp_len; /* actual response length */
  56. u32 residue_len; /* residual response length */
  57. struct fchs_s fchs; /* response FC header structure */
  58. };
  59. #pragma pack()
  60. #endif /* __BFI_FCXP_H__ */