]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/ucc_geth.h
drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ucc_geth.h
index 6e97c20b92aa2449a20991cd54900793e93426b2..0579ba081aa518e8c3b935539286e619a7897df3 100644 (file)
 
 #include "ucc_geth_mii.h"
 
+#define DRV_DESC "QE UCC Gigabit Ethernet Controller"
+#define DRV_NAME "ucc_geth"
+#define DRV_VERSION "1.1"
+
 #define NUM_TX_QUEUES                   8
 #define NUM_RX_QUEUES                   8
 #define NUM_BDS_IN_PREFETCHED_BDS       4
@@ -205,6 +209,9 @@ struct ucc_geth {
 #define UCCE_OTHER       (UCCE_SCAR | UCCE_GRA  | UCCE_CBPR | UCCE_BSY  |\
                        UCCE_RXC  | UCCE_TXC  | UCCE_TXE)
 
+#define UCCE_RX_EVENTS                                                 (UCCE_RXF | UCCE_BSY)
+#define UCCE_TX_EVENTS                                                 (UCCE_TXB | UCCE_TXE)
+
 /* UCC GETH UPSMR (Protocol Specific Mode Register) */
 #define UPSMR_ECM                               0x04000000     /* Enable CAM
                                                                   Miss or
@@ -864,8 +871,7 @@ struct ucc_geth_hardware_statistics {
 #define UCC_GETH_SCHEDULER_ALIGNMENT           4       /* This is a guess */
 #define UCC_GETH_TX_STATISTICS_ALIGNMENT       4       /* This is a guess */
 #define UCC_GETH_RX_STATISTICS_ALIGNMENT       4       /* This is a guess */
-#define UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT     4       /* This is a
-                                                                  guess */
+#define UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT     64
 #define UCC_GETH_RX_BD_QUEUES_ALIGNMENT                8       /* This is a guess */
 #define UCC_GETH_RX_PREFETCHED_BDS_ALIGNMENT   128     /* This is a guess */
 #define UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT 4   /* This
@@ -894,6 +900,7 @@ struct ucc_geth_hardware_statistics {
 #define UCC_GETH_TX_VTAG_TABLE_ENTRY_MAX        8
 #define UCC_GETH_RX_BD_RING_SIZE_MIN            8
 #define UCC_GETH_TX_BD_RING_SIZE_MIN            2
+#define UCC_GETH_BD_RING_SIZE_MAX              0xffff
 
 #define UCC_GETH_SIZE_OF_BD                     QE_SIZEOF_BD
 
@@ -1133,6 +1140,7 @@ struct ucc_geth_info {
        int bro;
        int ecm;
        int receiveFlowControl;
+       int transmitFlowControl;
        u8 maxGroupAddrInHash;
        u8 maxIndAddrInHash;
        u8 prel;
@@ -1176,6 +1184,7 @@ struct ucc_geth_private {
        struct ucc_geth_info *ug_info;
        struct ucc_fast_private *uccf;
        struct net_device *dev;
+       struct napi_struct napi;
        struct net_device_stats stats;  /* linux network statistics */
        struct ucc_geth *ug_regs;
        struct ucc_geth_init_pram *p_init_enet_param_shadow;