1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*******************************************************************************
4 Intel 10 Gigabit PCI Express Linux driver
5 Copyright(c) 1999 - 2012 Intel Corporation.
8 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
9 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
11 *******************************************************************************/
18 #include <scsi/fc/fc_fs.h>
19 #include <scsi/fc/fc_fcoe.h>
21 /* shift bits within STAT fo FCSTAT */
22 #define IXGBE_RXDADV_FCSTAT_SHIFT 4
25 #define IXGBE_BUFFCNT_MAX 256 /* 8 bits bufcnt */
26 #define IXGBE_FCPTR_ALIGN 16
27 #define IXGBE_FCPTR_MAX (IXGBE_BUFFCNT_MAX * sizeof(dma_addr_t))
28 #define IXGBE_FCBUFF_4KB 0x0
29 #define IXGBE_FCBUFF_8KB 0x1
30 #define IXGBE_FCBUFF_16KB 0x2
31 #define IXGBE_FCBUFF_64KB 0x3
32 #define IXGBE_FCBUFF_MAX 65536 /* 64KB max */
33 #define IXGBE_FCBUFF_MIN 4096 /* 4KB min */
34 #define IXGBE_FCOE_DDP_MAX 512 /* 9 bits xid */
36 /* Default traffic class to use for FCoE */
37 #define IXGBE_FCOE_DEFTC 3
40 #define IXGBE_FCERR_BADCRC 0x00100000
41 #define IXGBE_FCERR_EOFSOF 0x00200000
42 #define IXGBE_FCERR_NOFIRST 0x00300000
43 #define IXGBE_FCERR_OOOSEQ 0x00400000
44 #define IXGBE_FCERR_NODMA 0x00500000
45 #define IXGBE_FCERR_PKTLOST 0x00600000
47 /* FCoE DDP for target mode */
48 #define __IXGBE_FCOE_TARGET 1
50 struct ixgbe_fcoe_ddp {
54 struct scatterlist *sgl;
57 struct pci_pool *pool;
61 struct pci_pool **pool;
64 struct ixgbe_fcoe_ddp ddp[IXGBE_FCOE_DDP_MAX];
65 unsigned char *extra_ddp_buffer;
66 dma_addr_t extra_ddp_buffer_dma;
67 u64 __percpu *pcpu_noddp;
68 u64 __percpu *pcpu_noddp_ext_buff;
74 #endif /* IXGBE_FCOE */
76 #endif /* _IXGBE_FCOE_H */