]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ehea/ehea.h
Merge branches 'omap1-upstream' and 'omap2-upstream' into devel
[linux-2.6-omap-h63xx.git] / drivers / net / ehea / ehea.h
index f03f070451dee57f51120566bb5fae7aa30c33cc..ac21526b6de8688836c60f42b0b648c7ae4cd865 100644 (file)
 #include <linux/ethtool.h>
 #include <linux/vmalloc.h>
 #include <linux/if_vlan.h>
+#include <linux/inet_lro.h>
 
 #include <asm/ibmebus.h>
 #include <asm/abs_addr.h>
 #include <asm/io.h>
 
 #define DRV_NAME       "ehea"
-#define DRV_VERSION    "EHEA_0067"
+#define DRV_VERSION    "EHEA_0078"
 
-/* EHEA capability flags */
+/* eHEA capability flags */
 #define DLPAR_PORT_ADD_REM 1
-#define DLPAR_MEM_ADD 2
-#define DLPAR_MEM_REM 4
-#define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM)
+#define DLPAR_MEM_ADD      2
+#define DLPAR_MEM_REM      4
+#define EHEA_CAPABILITIES  (DLPAR_PORT_ADD_REM | DLPAR_MEM_ADD)
 
 #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
        | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
@@ -58,6 +59,7 @@
 
 #define EHEA_SMALL_QUEUES
 #define EHEA_NUM_TX_QP 1
+#define EHEA_LRO_MAX_AGGR 64
 
 #ifdef EHEA_SMALL_QUEUES
 #define EHEA_MAX_CQE_COUNT      1023
@@ -84,6 +86,8 @@
 #define EHEA_RQ2_PKT_SIZE       1522
 #define EHEA_L_PKT_SIZE         256    /* low latency */
 
+#define MAX_LRO_DESCRIPTORS 8
+
 /* Send completion signaling */
 
 /* Protection Domain Identifier */
 /* Memory Regions */
 #define EHEA_MR_ACC_CTRL       0x00800000
 
+#define EHEA_BUSMAP_START      0x8000000000000000ULL
+
 #define EHEA_WATCH_DOG_TIMEOUT 10*HZ
 
 /* utility functions */
@@ -186,6 +192,12 @@ struct h_epas {
                                   set to 0 if unused */
 };
 
+struct ehea_busmap {
+       unsigned int entries;           /* total number of entries */
+       unsigned int valid_sections;    /* number of valid sections */
+       u64 *vaddr;
+};
+
 struct ehea_qp;
 struct ehea_cq;
 struct ehea_eq;
@@ -343,6 +355,7 @@ struct ehea_q_skb_arr {
  * Port resources
  */
 struct ehea_port_res {
+       struct napi_struct napi;
        struct port_stats p_stats;
        struct ehea_mr send_mr;         /* send memory region */
        struct ehea_mr recv_mr;         /* receive memory region */
@@ -354,7 +367,6 @@ struct ehea_port_res {
        struct ehea_cq *send_cq;
        struct ehea_cq *recv_cq;
        struct ehea_eq *eq;
-       struct net_device *d_netdev;
        struct ehea_q_skb_arr rq1_skba;
        struct ehea_q_skb_arr rq2_skba;
        struct ehea_q_skb_arr rq3_skba;
@@ -368,6 +380,8 @@ struct ehea_port_res {
        u64 tx_packets;
        u64 rx_packets;
        u32 poll_counter;
+       struct net_lro_mgr lro_mgr;
+       struct net_lro_desc lro_desc[MAX_LRO_DESCRIPTORS];
 };
 
 
@@ -377,11 +391,12 @@ struct ehea_adapter {
        struct ibmebus_dev *ebus_dev;
        struct ehea_port *port[EHEA_MAX_PORTS];
        struct ehea_eq *neq;       /* notification event queue */
-       struct workqueue_struct *ehea_wq;
        struct tasklet_struct neq_tasklet;
        struct ehea_mr mr;
        u32 pd;                    /* protection domain */
        u64 max_mc_mac;            /* max number of multicast mac addresses */
+       int active_ports;
+       struct list_head list;
 };
 
 
@@ -392,6 +407,8 @@ struct ehea_mc_list {
 
 #define EHEA_PORT_UP 1
 #define EHEA_PORT_DOWN 0
+#define EHEA_PHY_LINK_UP 1
+#define EHEA_PHY_LINK_DOWN 0
 #define EHEA_MAX_PORT_RES 16
 struct ehea_port {
        struct ehea_adapter *adapter;    /* adapter that owns this port */
@@ -417,6 +434,8 @@ struct ehea_port {
        u32 msg_enable;
        u32 sig_comp_iv;
        u32 state;
+       u32 lro_max_aggr;
+       u8 phy_link;
        u8 full_duplex;
        u8 autoneg;
        u8 num_def_qps;
@@ -431,6 +450,9 @@ struct port_res_cfg {
        int max_entries_rq3;
 };
 
+enum ehea_flag_bits {
+       __EHEA_STOP_XFER
+};
 
 void ehea_set_ethtool_ops(struct net_device *netdev);
 int ehea_sense_port_attr(struct ehea_port *port);