cxgb3i_pdu.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * cxgb3i_ulp2.h: Chelsio S3xx iSCSI driver.
  3. *
  4. * Copyright (c) 2008 Chelsio Communications, Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation.
  9. *
  10. * Written by: Karen Xie (kxie@chelsio.com)
  11. */
  12. #ifndef __CXGB3I_ULP2_PDU_H__
  13. #define __CXGB3I_ULP2_PDU_H__
  14. struct cpl_iscsi_hdr_norss {
  15. union opcode_tid ot;
  16. u16 pdu_len_ddp;
  17. u16 len;
  18. u32 seq;
  19. u16 urg;
  20. u8 rsvd;
  21. u8 status;
  22. };
  23. struct cpl_rx_data_ddp_norss {
  24. union opcode_tid ot;
  25. u16 urg;
  26. u16 len;
  27. u32 seq;
  28. u32 nxt_seq;
  29. u32 ulp_crc;
  30. u32 ddp_status;
  31. };
  32. #define RX_DDP_STATUS_IPP_SHIFT 27 /* invalid pagepod */
  33. #define RX_DDP_STATUS_TID_SHIFT 26 /* tid mismatch */
  34. #define RX_DDP_STATUS_COLOR_SHIFT 25 /* color mismatch */
  35. #define RX_DDP_STATUS_OFFSET_SHIFT 24 /* offset mismatch */
  36. #define RX_DDP_STATUS_ULIMIT_SHIFT 23 /* ulimit error */
  37. #define RX_DDP_STATUS_TAG_SHIFT 22 /* tag mismatch */
  38. #define RX_DDP_STATUS_DCRC_SHIFT 21 /* dcrc error */
  39. #define RX_DDP_STATUS_HCRC_SHIFT 20 /* hcrc error */
  40. #define RX_DDP_STATUS_PAD_SHIFT 19 /* pad error */
  41. #define RX_DDP_STATUS_PPP_SHIFT 18 /* pagepod parity error */
  42. #define RX_DDP_STATUS_LLIMIT_SHIFT 17 /* llimit error */
  43. #define RX_DDP_STATUS_DDP_SHIFT 16 /* ddp'able */
  44. #define RX_DDP_STATUS_PMM_SHIFT 15 /* pagepod mismatch */
  45. #define ULP2_FLAG_DATA_READY 0x1
  46. #define ULP2_FLAG_DATA_DDPED 0x2
  47. #define ULP2_FLAG_HCRC_ERROR 0x10
  48. #define ULP2_FLAG_DCRC_ERROR 0x20
  49. #define ULP2_FLAG_PAD_ERROR 0x40
  50. void cxgb3i_conn_closing(struct s3_conn *);
  51. void cxgb3i_conn_pdu_ready(struct s3_conn *c3cn);
  52. void cxgb3i_conn_tx_open(struct s3_conn *c3cn);
  53. #endif