be_iscsi.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /**
  2. * Copyright (C) 2005 - 2016 Broadcom
  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@broadcom.com)
  11. *
  12. * Contact Information:
  13. * linux-drivers@broadcom.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. void beiscsi_iface_create_default(struct beiscsi_hba *phba);
  24. void beiscsi_iface_destroy_default(struct beiscsi_hba *phba);
  25. int beiscsi_iface_get_param(struct iscsi_iface *iface,
  26. enum iscsi_param_type param_type,
  27. int param, char *buf);
  28. int beiscsi_iface_set_param(struct Scsi_Host *shost,
  29. void *data, uint32_t count);
  30. umode_t beiscsi_attr_is_visible(int param_type, int param);
  31. void beiscsi_offload_connection(struct beiscsi_conn *beiscsi_conn,
  32. struct beiscsi_offload_params *params);
  33. void beiscsi_offload_iscsi(struct beiscsi_hba *phba, struct iscsi_conn *conn,
  34. struct beiscsi_conn *beiscsi_conn,
  35. unsigned int fw_handle);
  36. struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep,
  37. uint16_t cmds_max,
  38. uint16_t qdepth,
  39. uint32_t initial_cmdsn);
  40. void beiscsi_session_destroy(struct iscsi_cls_session *cls_session);
  41. void beiscsi_session_fail(struct iscsi_cls_session *cls_session);
  42. struct iscsi_cls_conn *beiscsi_conn_create(struct iscsi_cls_session
  43. *cls_session, uint32_t cid);
  44. int beiscsi_conn_bind(struct iscsi_cls_session *cls_session,
  45. struct iscsi_cls_conn *cls_conn,
  46. uint64_t transport_fd, int is_leading);
  47. int beiscsi_ep_get_param(struct iscsi_endpoint *ep, enum iscsi_param param,
  48. char *buf);
  49. int beiscsi_get_host_param(struct Scsi_Host *shost,
  50. enum iscsi_host_param param, char *buf);
  51. int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba);
  52. int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,
  53. enum iscsi_param param, char *buf, int buflen);
  54. int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn);
  55. struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost,
  56. struct sockaddr *dst_addr,
  57. int non_blocking);
  58. int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms);
  59. void beiscsi_ep_disconnect(struct iscsi_endpoint *ep);
  60. void beiscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn,
  61. struct iscsi_stats *stats);
  62. #endif