vnic_scsi.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright 2008 Cisco Systems, Inc. All rights reserved.
  3. * Copyright 2007 Nuova Systems, Inc. All rights reserved.
  4. *
  5. * This program is free software; you may redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; version 2 of the License.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  10. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  11. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  12. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  13. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  14. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  16. * SOFTWARE.
  17. */
  18. #ifndef _VNIC_SCSI_H_
  19. #define _VNIC_SCSI_H_
  20. #define VNIC_FNIC_WQ_COPY_COUNT_MIN 1
  21. #define VNIC_FNIC_WQ_COPY_COUNT_MAX 1
  22. #define VNIC_FNIC_WQ_DESCS_MIN 64
  23. #define VNIC_FNIC_WQ_DESCS_MAX 128
  24. #define VNIC_FNIC_WQ_COPY_DESCS_MIN 64
  25. #define VNIC_FNIC_WQ_COPY_DESCS_MAX 512
  26. #define VNIC_FNIC_RQ_DESCS_MIN 64
  27. #define VNIC_FNIC_RQ_DESCS_MAX 128
  28. #define VNIC_FNIC_EDTOV_MIN 1000
  29. #define VNIC_FNIC_EDTOV_MAX 255000
  30. #define VNIC_FNIC_EDTOV_DEF 2000
  31. #define VNIC_FNIC_RATOV_MIN 1000
  32. #define VNIC_FNIC_RATOV_MAX 255000
  33. #define VNIC_FNIC_MAXDATAFIELDSIZE_MIN 256
  34. #define VNIC_FNIC_MAXDATAFIELDSIZE_MAX 2112
  35. #define VNIC_FNIC_FLOGI_RETRIES_MIN 0
  36. #define VNIC_FNIC_FLOGI_RETRIES_MAX 0xffffffff
  37. #define VNIC_FNIC_FLOGI_RETRIES_DEF 0xffffffff
  38. #define VNIC_FNIC_FLOGI_TIMEOUT_MIN 1000
  39. #define VNIC_FNIC_FLOGI_TIMEOUT_MAX 255000
  40. #define VNIC_FNIC_PLOGI_RETRIES_MIN 0
  41. #define VNIC_FNIC_PLOGI_RETRIES_MAX 255
  42. #define VNIC_FNIC_PLOGI_RETRIES_DEF 8
  43. #define VNIC_FNIC_PLOGI_TIMEOUT_MIN 1000
  44. #define VNIC_FNIC_PLOGI_TIMEOUT_MAX 255000
  45. #define VNIC_FNIC_IO_THROTTLE_COUNT_MIN 1
  46. #define VNIC_FNIC_IO_THROTTLE_COUNT_MAX 2048
  47. #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MIN 0
  48. #define VNIC_FNIC_LINK_DOWN_TIMEOUT_MAX 240000
  49. #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MIN 0
  50. #define VNIC_FNIC_PORT_DOWN_TIMEOUT_MAX 240000
  51. #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MIN 0
  52. #define VNIC_FNIC_PORT_DOWN_IO_RETRIES_MAX 255
  53. #define VNIC_FNIC_LUNS_PER_TARGET_MIN 1
  54. #define VNIC_FNIC_LUNS_PER_TARGET_MAX 1024
  55. /* Device-specific region: scsi configuration */
  56. struct vnic_fc_config {
  57. u64 node_wwn;
  58. u64 port_wwn;
  59. u32 flags;
  60. u32 wq_enet_desc_count;
  61. u32 wq_copy_desc_count;
  62. u32 rq_desc_count;
  63. u32 flogi_retries;
  64. u32 flogi_timeout;
  65. u32 plogi_retries;
  66. u32 plogi_timeout;
  67. u32 io_throttle_count;
  68. u32 link_down_timeout;
  69. u32 port_down_timeout;
  70. u32 port_down_io_retries;
  71. u32 luns_per_tgt;
  72. u16 maxdatafieldsize;
  73. u16 ed_tov;
  74. u16 ra_tov;
  75. u16 intr_timer;
  76. u8 intr_timer_type;
  77. };
  78. #define VFCF_FCP_SEQ_LVL_ERR 0x1 /* Enable FCP-2 Error Recovery */
  79. #define VFCF_PERBI 0x2 /* persistent binding info available */
  80. #define VFCF_FIP_CAPABLE 0x4 /* firmware can handle FIP */
  81. #endif /* _VNIC_SCSI_H_ */