be_iscsi.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * Copyright (C) 2005 - 2015 Avago Technologies
  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. * Written by: Jayamohan Kallickal (jayamohan.kallickal@avagotech.com)
  11. *
  12. * Contact Information:
  13. * linux-drivers@avagotech.com
  14. *
  15. * Avago Technologies
  16. * 3333 Susan Street
  17. * Costa Mesa, CA 92626
  18. */
  19. #ifndef _BE_ISCSI_
  20. #define _BE_ISCSI_
  21. #include "be_main.h"
  22. #include "be_mgmt.h"
  23. #define BE2_IPV4 0x1
  24. #define BE2_IPV6 0x10
  25. #define BE2_DHCP_V4 0x05
  26. #define NON_BLOCKING 0x0
  27. #define BLOCKING 0x1
  28. void beiscsi_create_def_ifaces(struct beiscsi_hba *phba);
  29. void beiscsi_destroy_def_ifaces(struct beiscsi_hba *phba);
  30. int be2iscsi_iface_get_param(struct iscsi_iface *iface,
  31. enum iscsi_param_type param_type,
  32. int param, char *buf);
  33. int be2iscsi_iface_set_param(struct Scsi_Host *shost,
  34. void *data, uint32_t count);
  35. umode_t be2iscsi_attr_is_visible(int param_type, int param);
  36. void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
  37. struct beiscsi_offload_params *params);
  38. void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
  39. struct beiscsi_conn *beiscsi_conn,
  40. unsigned int fw_handle);
  41. struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
  42. uint16_t cmds_max,
  43. uint16_t qdepth,
  44. uint32_t initial_cmdsn);
  45. void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
  46. struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
  47. *cls_session, uint32_t cid);
  48. int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
  49. struct iscsi_cls_conn *cls_conn,
  50. uint64_t transport_fd, int is_leading);
  51. int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
  52. char *buf);
  53. int beiscsi_get_host_param(struct Scsi_Host *shost,
  54. enum iscsi_host_param param, char *buf);
  55. int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
  56. int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
  57. enum iscsi_param param, char *buf, int buflen);
  58. int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
  59. struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
  60. struct sockaddr *dst_addr,
  61. int non_blocking);
  62. int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
  63. void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
  64. void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
  65. struct iscsi_stats *stats);
  66. #endif