<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Index:
mlx4/kernel/bus/core/SOURCES<BR>===================================================================<BR>---
mlx4/kernel/bus/core/SOURCES (revision 1301)<BR>+++
mlx4/kernel/bus/core/SOURCES (working copy)<BR>@@ -43,7 +43,7
@@<BR> C_DEFINES = $(C_DEFINES) -DEVENT_TRACING<BR> <BR> RUN_WPP
= $(SOURCES) -km -ext: .c .h .C .H \<BR>- -scan:..\inc\mlx4_debug.h
\<BR>+ -scan:..\..\inc\mlx4_debug.h
\<BR> -func:MLX4_PRINT(LEVEL,FLAGS,(MSG,...))
\<BR> -func:MLX4_PRINT_EXIT(LEVEL,FLAGS,(MSG,...))
<BR> !ENDIF<BR>Index:
mlx4/kernel/bus/drv/drv.c<BR>===================================================================<BR>---
mlx4/kernel/bus/drv/drv.c (revision 1301)<BR>+++
mlx4/kernel/bus/drv/drv.c (working copy)<BR>@@ -917,11 +917,11
@@<BR> //<BR> status =
WdfRegistryQueryULong(hKey, &debugLevel,
&value);<BR> if (NT_SUCCESS (status))
<BR>- g_mlx4_dbg_level = g.DebugPrintLevel =
value;<BR>+ g_mlx4_dbg_level = g.bwsd.DebugPrintLevel =
value;<BR> <BR> status =
WdfRegistryQueryULong(hKey, &debugFlags,
&value);<BR> if (NT_SUCCESS (status))
<BR>- g_mlx4_dbg_flags = g.DebugPrintFlags =
value;<BR>+ g_mlx4_dbg_flags = g.bwsd.DebugPrintFlags =
value;<BR> <BR> status = WdfRegistryQueryULong(hKey,
&numQp, &value);<BR> if (NT_SUCCESS (status)) <BR>@@
-1051,8 +1051,8 @@<BR> <BR> <BR> // global
initializations<BR>- g_mlx4_dbg_level = g.DebugPrintLevel =
TRACE_LEVEL_VERBOSE;<BR>- g_mlx4_dbg_flags = g.DebugPrintFlags =
0xffff;<BR>+ g_mlx4_dbg_level = g.bwsd.DebugPrintLevel =
TRACE_LEVEL_VERBOSE;<BR>+ g_mlx4_dbg_flags = g.bwsd.DebugPrintFlags =
0xffff;<BR> <BR> MLX4_ENTER(MLX4_DBG_DRV);<BR> MLX4_PRINT(TRACE_LEVEL_INFORMATION,
MLX4_DBG_DRV, <BR>Index:
mlx4/kernel/bus/drv/drv.h<BR>===================================================================<BR>---
mlx4/kernel/bus/drv/drv.h (revision 1301)<BR>+++
mlx4/kernel/bus/drv/drv.h (working copy)<BR>@@ -56,6 +56,14 @@<BR> //
The device extension of the bus itself. From whence the PDO's are
born.<BR> //<BR> <BR>+<BR>+typedef<BR>+BOOLEAN<BR>+(*PISR_FUNC)( <BR>+ IN
PVOID IsrContext<BR>+ );<BR>+<BR>+<BR> typedef struct
_FDO_DEVICE_DATA<BR> {<BR> BUS_WMI_STD_DATA WmiData;<BR>Index:
mlx4/kernel/bus/drv/pdo.c<BR>===================================================================<BR>---
mlx4/kernel/bus/drv/pdo.c (revision 1301)<BR>+++
mlx4/kernel/bus/drv/pdo.c (working copy)<BR>@@ -226,6 +226,8
@@<BR> <BR> p_fdo->bus_ib_ifc.mlx4_interface.mlx4_INIT_PORT =
mlx4_INIT_PORT;<BR> p_fdo->bus_ib_ifc.mlx4_interface.mlx4_CLOSE_PORT
= mlx4_CLOSE_PORT;<BR>+ p_fdo->bus_ib_ifc.mlx4_interface.mlx4_add_eq =
mlx4_add_eq;<BR>+ p_fdo->bus_ib_ifc.mlx4_interface.mlx4_remove_eq =
mlx4_remove_eq;<BR> <BR> <BR> //<BR>Index:
mlx4/kernel/bus/inc/bus_intf.h<BR>===================================================================<BR>---
mlx4/kernel/bus/inc/bus_intf.h (revision 1301)<BR>+++
mlx4/kernel/bus/inc/bus_intf.h (working copy)<BR>@@ -12,9 +12,9
@@<BR> enum mlx4_qp_state;<BR> struct mlx4_qp_context;<BR> enum
mlx4_qp_optpar;<BR>+struct mlx4_eq;<BR> <BR> <BR>-<BR> typedef
int (*MLX4_REGISTER_INTERFACE)(struct mlx4_interface *intf);<BR> typedef
VOID (*MLX4_UNREGISTER_INTERFACE)(struct mlx4_interface *intf);<BR> <BR>@@
-98,6 +98,20 @@<BR> typedef int (*MLX4_CLOSE_PORT)(struct mlx4_dev *dev,
int
port);<BR> <BR> <BR>+typedef<BR>+BOOLEAN<BR>+(*PISR_FUNC)( <BR>+ IN
PVOID IsrContext<BR>+ );<BR>+<BR>+<BR>+typedef int (*MLX4_ADD_EQ)
(struct mlx4_dev *dev, int nent,<BR>+ u8 intr, PISR_FUNC
func, PVOID func_context ,<BR>+ u8* p_eq_num, struct
mlx4_eq ** p_eq);<BR>+<BR>+typedef VOID (*MLX4_REMOVE_EQ) (struct mlx4_dev *dev,
u8 eq_num);<BR>+<BR>+<BR> struct mlx4_interface_ex
{<BR> MLX4_PD_ALLOC
mlx4_pd_alloc;<BR> MLX4_PD_FREE
mlx4_pd_free;<BR>@@ -141,6 +155,9
@@<BR> <BR> MLX4_INIT_PORT
mlx4_INIT_PORT;<BR> MLX4_CLOSE_PORT
mlx4_CLOSE_PORT;<BR>+<BR>+ MLX4_ADD_EQ
mlx4_add_eq;<BR>+ MLX4_REMOVE_EQ
mlx4_remove_eq;<BR> <BR> };<BR> <BR>@@ -154,7 +171,7
@@<BR> int is_livefish;<BR> MLX4_REGISTER_INTERFACE
register_interface;<BR> MLX4_UNREGISTER_INTERFACE
unregister_interface;<BR>- ULONG port_id;<BR>+ u8 port_id;<BR> struct
VipBusIfc *pVipBusIfc;<BR> <BR> }
MLX4_BUS_IB_INTERFACE, *PMLX4_BUS_IB_INTERFACE;<BR>Index:
mlx4/kernel/bus/net/cq.c<BR>===================================================================<BR>---
mlx4/kernel/bus/net/cq.c (revision 1301)<BR>+++
mlx4/kernel/bus/net/cq.c (working copy)<BR>@@ -127,7 +127,6
@@<BR> u64 mtt_addr;<BR> int
err;<BR> <BR>- UNREFERENCED_PARAMETER(vector);<BR> #define
COLLAPSED_SHIFT 18<BR> #define ENTRIES_SHIFT 24<BR> <BR>@@
-161,7 +160,11 @@<BR> cq_context->flags = cpu_to_be32(!!collapsed
<< COLLAPSED_SHIFT);<BR> cq_context->logsize_usrpage =
cpu_to_be32(<BR> (ilog2(nent) <<
ENTRIES_SHIFT) |
uar->index);<BR>- cq_context->comp_eqn
= (u8)priv->eq_table.eq[MLX4_EQ_COMP].eqn;<BR>+ if (vector == 0)
{<BR>+ cq_context->comp_eqn
= (u8)priv->eq_table.eq[MLX4_EQ_COMP].eqn;<BR>+ } else
{<BR>+ cq_context->comp_eqn
=
(u8)priv->eq_table.eq[vector].eqn;<BR>+ }<BR> cq_context->log_page_size
= (u8)(mtt->page_shift -
MLX4_ICM_PAGE_SHIFT);<BR> <BR> mtt_addr = mlx4_mtt_addr(dev,
mtt);<BR>Index:
mlx4/kernel/bus/net/eq.c<BR>===================================================================<BR>---
mlx4/kernel/bus/net/eq.c (revision 1303)<BR>+++
mlx4/kernel/bus/net/eq.c (working copy)<BR>@@ -308,6 +308,19
@@<BR> }<BR> }<BR> <BR>+ for (i =
MLX4_NUM_EQ; i <= priv->eq_table.max_extra_eqs; ++i) {<BR>+ if
(priv->eq_table.eq[i].isr) {<BR>+ int ret =
0;<BR>+ if ( next_eqe_sw(&priv->eq_table.eq[i]) )
{<BR>+ ret =
priv->eq_table.eq[i].isr(priv->eq_table.eq[i].ctx);<BR>+ work
|= ret;<BR>+ }<BR>+ else
{<BR>+ eq_set_ci(&priv->eq_table.eq[i],
1);<BR>+ }<BR>+ }<BR>+ }<BR>+<BR> return
(BOOLEAN)work;<BR> }<BR> <BR>@@ -708,6 +721,65
@@<BR> return err;<BR> }<BR> <BR>+<BR>+int
mlx4_add_eq(struct mlx4_dev *dev, int nent,<BR>+ u8
intr, PISR_FUNC func, PVOID func_context ,<BR>+ u8*
p_eq_num, struct mlx4_eq ** p_eq)<BR>+{<BR>+ struct mlx4_priv *priv =
mlx4_priv(dev);<BR>+ int err;<BR>+ u8 i, new_eq = 0;<BR>+ for (i
= MLX4_NUM_EQ; i < MLX4_NUM_EQ + MLX4_MAX_EXTRA_EQS ; i++)
{<BR>+ if(priv->eq_table.eq[MLX4_NUM_EQ].isr == NULL)
{<BR>+ new_eq =
i;<BR>+ break;<BR>+ }<BR>+ }<BR>+ if
(new_eq == 0)<BR>+ return -ENOMEM;<BR>+<BR>+ err =
mlx4_create_eq(dev, nent,<BR>+
(dev->flags & MLX4_FLAG_MSI_X) ? MLX4_EQ_COMP :
0,<BR>+
&priv->eq_table.eq[new_eq]);<BR>+ if (err)<BR>+ return
err;<BR>+<BR>+ *p_eq = &priv->eq_table.eq[new_eq
];<BR>+ *p_eq_num = new_eq;<BR>+ priv->eq_table.eq[MLX4_NUM_EQ].isr
= func;<BR>+ priv->eq_table.eq[MLX4_NUM_EQ].ctx =
func_context;<BR>+ priv->eq_table.max_extra_eqs =
max(priv->eq_table.max_extra_eqs, new_eq);<BR>+ return
0;<BR>+}<BR>+<BR>+void mlx4_remove_eq(struct mlx4_dev *dev, u8
eq_num)<BR>+{<BR>+ struct mlx4_priv *priv = mlx4_priv(dev);<BR>+ int
err;<BR>+ struct mlx4_eq_table *eq_table =
&mlx4_priv(dev)->eq_table;<BR>+<BR>+ priv->eq_table.eq[eq_num].isr
= NULL;<BR>+ priv->eq_table.eq[eq_num].ctx = NULL;<BR>+<BR>+ if
(priv->eq_table.max_extra_eqs ==
eq_num)<BR>+ priv->eq_table.max_extra_eqs--;<BR>+<BR>+ mlx4_free_eq(dev,
&priv->eq_table.eq[eq_num]);<BR>+<BR>+<BR>+ if
(eq_table->have_irq)
{<BR>+ free_irq(dev->pdev->int_obj);<BR>+<BR>+<BR>+ err
= request_irq( dev,
<BR>+ dev->pdev->int_info.u.Interrupt.Vector,<BR>+ mlx4_interrupt,
dev, <BR>+ mlx4_dpc,
&priv->eq_table.eq[0],<BR>+ &dev->pdev->int_obj
);<BR>+ // BUGBUG: how should the error be propogated
?<BR>+ }<BR>+}<BR>+<BR> void mlx4_cleanup_eq_table(struct mlx4_dev
*dev)<BR> {<BR> struct mlx4_priv *priv =
mlx4_priv(dev);<BR>Index:
mlx4/kernel/bus/net/mlx4.h<BR>===================================================================<BR>---
mlx4/kernel/bus/net/mlx4.h (revision 1301)<BR>+++
mlx4/kernel/bus/net/mlx4.h (working copy)<BR>@@ -68,7 +68,7
@@<BR> <BR> #pragma warning(disable:4201) // nameless
struct/union<BR> typedef struct _GLOBALS
{<BR>- BUS_WMI_STD_DATA;<BR>+ BUS_WMI_STD_DATA
bwsd;<BR> <BR> int mod_num_qp;<BR> int
mod_rdmarc_per_qp;<BR>@@ -109,6 +109,8
@@<BR> MLX4_NUM_EQ<BR> };<BR> <BR>+#define
MLX4_MAX_EXTRA_EQS 5<BR>+<BR> enum
{<BR> MLX4_NUM_PDS = 1 << 15<BR> };<BR>@@
-172,8 +174,9 @@<BR> KDPC dpc; /* DPC routine
*/<BR> spinlock_t lock; /* spinlock for simult DPCs
*/<BR> int eq_ix; /* EQ index -
0..MLX4_NUM_EQ */<BR>- BOOLEAN (*isr)(int,void*); /* isr
*/<BR>+ BOOLEAN (*isr)(void*); /* isr */<BR> void
* ctx; /* isr ctx */<BR>+ USHORT
eq_no_progress; /* used to look for stacked card
*/<BR> };<BR> <BR> struct mlx4_profile {<BR>@@ -238,13 +241,14
@@<BR> void __iomem
*clr_int;<BR> u8 __iomem
*uar_map[(MLX4_NUM_EQ + 6) /
4];<BR> u32 clr_mask;<BR>- struct
mlx4_eq eq[MLX4_NUM_EQ];<BR>+ struct
mlx4_eq eq[MLX4_NUM_EQ +
MLX4_MAX_EXTRA_EQS];<BR> u64 icm_virt;<BR> dma_addr_t icm_page;<BR> dma_addr_t icm_dma;<BR> struct
mlx4_icm_table cmpt_table;<BR> int have_irq;<BR> u8 inta_pin;<BR>+ u8 max_extra_eqs;<BR> };<BR> <BR> struct
mlx4_srq_table {<BR>@@ -432,4 +436,16 @@<BR> #define
ETH_FCS_LEN 4 /* Frame Check Sequence Length
*/<BR> #define ETH_HLEN
14<BR> <BR>+<BR>+typedef<BR>+BOOLEAN<BR>+(*PISR_FUNC)( <BR>+ IN
PVOID IsrContext<BR>+ );<BR>+<BR>+int mlx4_add_eq(struct mlx4_dev
*dev, int nent,<BR>+ u8 intr, PISR_FUNC func,PVOID
func_context ,<BR>+ u8* p_eq_num, struct mlx4_eq **
p_eq);<BR>+<BR>+void mlx4_remove_eq(struct mlx4_dev *dev, u8
eq_num);<BR> #endif /* MLX4_H */<BR>Index:
mlx4/kernel/inc/vip_dev.h<BR>===================================================================<BR>---
mlx4/kernel/inc/vip_dev.h (revision 1301)<BR>+++
mlx4/kernel/inc/vip_dev.h (working copy)<BR>@@ -25,7 +25,7
@@<BR> <BR> #define MTNIC_MAX_PORTS
2<BR> <BR>-#define MAX_PORT_SIZE 120000<BR>+#define MAX_PORT_SIZE
250000<BR> #define MXE_INTERFACE_VERSION 2<BR> <BR> enum
mtnic_state {<BR>@@ -47,13 +47,15 @@<BR>
LONG
ResetCount;<BR> <BR> // Objects that are needed in
order to work with the hw<BR>-// struct
mlx4_dev
*dev;<BR> <BR>
u32
priv_pdn;<BR> struct
mlx4_uar
priv_uar;<BR> void
__iomem
*uar_map;<BR> struct
mlx4_mr
mr;<BR>
spinlock_t
uar_lock;<BR>+<BR>+ struct mlx4_eq
* eq;<BR>+
u8
eq_number;<BR> } NicData_t;<BR> <BR> //typedef struct
_VipBusIfc<BR></FONT></DIV></BODY></HTML>