1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
7 #include <scsi/fc/fc_fs.h>
8 #include <scsi/fc/fc_fcoe.h>
10 /* shift bits within STAT fo FCSTAT */
11 #define IXGBE_RXDADV_FCSTAT_SHIFT 4
14 #define IXGBE_BUFFCNT_MAX 256 /* 8 bits bufcnt */
15 #define IXGBE_FCPTR_ALIGN 16
16 #define IXGBE_FCPTR_MAX (IXGBE_BUFFCNT_MAX * sizeof(dma_addr_t))
17 #define IXGBE_FCBUFF_4KB 0x0
18 #define IXGBE_FCBUFF_8KB 0x1
19 #define IXGBE_FCBUFF_16KB 0x2
20 #define IXGBE_FCBUFF_64KB 0x3
21 #define IXGBE_FCBUFF_MAX 65536 /* 64KB max */
22 #define IXGBE_FCBUFF_MIN 4096 /* 4KB min */
23 #define IXGBE_FCOE_DDP_MAX 512 /* 9 bits xid */
24 #define IXGBE_FCOE_DDP_MAX_X550 2048 /* 11 bits xid */
26 /* Default traffic class to use for FCoE */
27 #define IXGBE_FCOE_DEFTC 3
30 #define IXGBE_FCERR_BADCRC 0x00100000
32 /* FCoE DDP for target mode */
33 #define __IXGBE_FCOE_TARGET 1
35 struct ixgbe_fcoe_ddp
{
39 struct scatterlist
*sgl
;
42 struct dma_pool
*pool
;
45 /* per cpu variables */
46 struct ixgbe_fcoe_ddp_pool
{
47 struct dma_pool
*pool
;
53 struct ixgbe_fcoe_ddp_pool __percpu
*ddp_pool
;
56 struct ixgbe_fcoe_ddp ddp
[IXGBE_FCOE_DDP_MAX_X550
];
57 void *extra_ddp_buffer
;
58 dma_addr_t extra_ddp_buffer_dma
;
63 #endif /* _IXGBE_FCOE_H */