]> err.no Git - linux-2.6/blobdiff - drivers/net/ehea/ehea.h
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / drivers / net / ehea / ehea.h
index 88fb53eba715368e9685ff5dbd6db275bc826626..fe872fbd671e3c740705f910be4e6af3d7549373 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME       "ehea"
-#define DRV_VERSION    "EHEA_0083"
+#define DRV_VERSION    "EHEA_0091"
 
 /* eHEA capability flags */
 #define DLPAR_PORT_ADD_REM 1
 #define EHEA_MR_ACC_CTRL       0x00800000
 
 #define EHEA_BUSMAP_START      0x8000000000000000ULL
+#define EHEA_INVAL_ADDR        0xFFFFFFFFFFFFFFFFULL
+#define EHEA_DIR_INDEX_SHIFT 13                   /* 8k Entries in 64k block */
+#define EHEA_TOP_INDEX_SHIFT (EHEA_DIR_INDEX_SHIFT * 2)
+#define EHEA_MAP_ENTRIES (1 << EHEA_DIR_INDEX_SHIFT)
+#define EHEA_MAP_SIZE (0x10000)                   /* currently fixed map size */
+#define EHEA_INDEX_MASK (EHEA_MAP_ENTRIES - 1)
+
 
 #define EHEA_WATCH_DOG_TIMEOUT 10*HZ
 
@@ -192,10 +199,20 @@ 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;
+/*
+ * Memory map data structures
+ */
+struct ehea_dir_bmap
+{
+       u64 ent[EHEA_MAP_ENTRIES];
+};
+struct ehea_top_bmap
+{
+       struct ehea_dir_bmap *dir[EHEA_MAP_ENTRIES];
+};
+struct ehea_bmap
+{
+       struct ehea_top_bmap *top[EHEA_MAP_ENTRIES];
 };
 
 struct ehea_qp;
@@ -371,6 +388,7 @@ struct ehea_port_res {
        struct ehea_q_skb_arr rq2_skba;
        struct ehea_q_skb_arr rq3_skba;
        struct ehea_q_skb_arr sq_skba;
+       int sq_skba_size;
        spinlock_t netif_queue;
        int queue_stopped;
        int swqe_refill_th;
@@ -386,6 +404,13 @@ struct ehea_port_res {
 
 
 #define EHEA_MAX_PORTS 16
+
+#define EHEA_NUM_PORTRES_FW_HANDLES    6  /* QP handle, SendCQ handle,
+                                            RecvCQ handle, EQ handle,
+                                            SendMR handle, RecvMR handle */
+#define EHEA_NUM_PORT_FW_HANDLES       1  /* EQ handle */
+#define EHEA_NUM_ADAPTER_FW_HANDLES    2  /* MR handle, NEQ handle */
+
 struct ehea_adapter {
        u64 handle;
        struct of_device *ofdev;
@@ -405,6 +430,31 @@ struct ehea_mc_list {
        u64 macaddr;
 };
 
+/* kdump support */
+struct ehea_fw_handle_entry {
+       u64 adh;               /* Adapter Handle */
+       u64 fwh;               /* Firmware Handle */
+};
+
+struct ehea_fw_handle_array {
+       struct ehea_fw_handle_entry *arr;
+       int num_entries;
+       struct mutex lock;
+};
+
+struct ehea_bcmc_reg_entry {
+       u64 adh;               /* Adapter Handle */
+       u32 port_id;           /* Logical Port Id */
+       u8 reg_type;           /* Registration Type */
+       u64 macaddr;
+};
+
+struct ehea_bcmc_reg_array {
+       struct ehea_bcmc_reg_entry *arr;
+       int num_entries;
+       struct mutex lock;
+};
+
 #define EHEA_PORT_UP 1
 #define EHEA_PORT_DOWN 0
 #define EHEA_PHY_LINK_UP 1
@@ -420,7 +470,7 @@ struct ehea_port {
        struct vlan_group *vgrp;
        struct ehea_eq *qp_eq;
        struct work_struct reset_task;
-       struct semaphore port_lock;
+       struct mutex port_lock;
        char int_aff_name[EHEA_IRQ_NAME_SIZE];
        int allmulti;                    /* Indicates IFF_ALLMULTI state */
        int promisc;                     /* Indicates IFF_PROMISC state */