<!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><SPAN class=283594413-21052008>and also: <FONT
size=3></DIV>
<P>[mlx4] Add 2 more functions for interface with
Ethernet.</P></FONT></SPAN></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
mlx4/kernel/bus/drv/drv.c<BR>===================================================================<BR>---
mlx4/kernel/bus/drv/drv.c (revision 1197)<BR>+++
mlx4/kernel/bus/drv/drv.c (working copy)<BR>@@ -683,6 +683,14
@@<BR> <BR> #endif<BR> <BR>+inline void
InitBusIsr(<BR>+ struct VipBusIfc*
pVipBusIfc<BR>+ )<BR>+{<BR>+
memset(pVipBusIfc, 0, sizeof(struct VipBusIfc));<BR>+
KeInitializeEvent(&pVipBusIfc->NicData.ConfigChangeEvent,
SynchronizationEvent,
TRUE);<BR>+}<BR>+<BR> NTSTATUS<BR> EvtDeviceAdd(<BR> IN
WDFDRIVER Driver,<BR>@@ -767,6 +775,11
@@<BR> p_fdo->FdoDevice =
device;<BR> <BR> //<BR>+ // Init the BusIsr
data<BR>+ //<BR>+ InitBusIsr(&p_fdo->mtnic_Ifc);<BR>+<BR>+ //<BR> //
Purpose of this lock is documented in PlugInDevice routine
below.<BR> //<BR> WDF_OBJECT_ATTRIBUTES_INIT(&attributes);<BR>Index:
mlx4/kernel/bus/inc/bus_intf.h<BR>===================================================================<BR>---
mlx4/kernel/bus/inc/bus_intf.h (revision 1197)<BR>+++
mlx4/kernel/bus/inc/bus_intf.h (working copy)<BR>@@ -6,16 +6,21
@@<BR> // Interface for work with MLX4 IB
driver<BR> //<BR> <BR>-#pragma warning(disable:4201) // nameless
struct/union<BR>+struct mlx4_interface;<BR>+typedef int
(*MLX4_REGISTER_INTERFACE)(struct mlx4_interface *intf);<BR>+typedef VOID
(*MLX4_UNREGISTER_INTERFACE)(struct mlx4_interface *intf);<BR>+<BR> typedef
struct _MLX4_BUS_IB_INTERFACE{<BR> INTERFACE i;<BR> struct
ib_device * p_ibdev;<BR> struct
pci_dev * pdev;<BR> int is_livefish;<BR>+ MLX4_REGISTER_INTERFACE
register_interface;<BR>+ MLX4_UNREGISTER_INTERFACE
unregister_interface;<BR> ULONG port_id;<BR> struct
VipBusIfc *pVipBusIfc;<BR> <BR> }
MLX4_BUS_IB_INTERFACE, *PMLX4_BUS_IB_INTERFACE;<BR>-#pragma
warning(default:4201) // nameless
struct/union<BR> <BR> <BR>+<BR>Index:
mlx4/kernel/inc/l2w_bit.h<BR>===================================================================<BR>---
mlx4/kernel/inc/l2w_bit.h (revision 1197)<BR>+++
mlx4/kernel/inc/l2w_bit.h (working copy)<BR>@@ -184,3 +184,9
@@<BR> return fls(val) - 1;<BR> }<BR> <BR>+static inline
BOOLEAN is_power_of_2(unsigned long n)<BR>+{<BR>+ return (!!n & !(n
& (n-1))) ? TRUE : FALSE;<BR>+}<BR>+<BR>+<BR>Index:
mlx4/kernel/inc/l2w_list.h<BR>===================================================================<BR>---
mlx4/kernel/inc/l2w_list.h (revision 1197)<BR>+++
mlx4/kernel/inc/l2w_list.h (working copy)<BR>@@ -38,14 +38,14 @@<BR> *
This is only for internal list manipulation where we know<BR> * the
prev/next entries already!<BR> */<BR>-static inline void __list_add(struct
list_head *new,<BR>+static inline void __list_add(struct list_head
*new1,<BR>
struct list_head
*prev,<BR>
struct list_head *next)<BR> {<BR>-
next->prev = new;<BR>- new->next =
next;<BR>- new->prev =
prev;<BR>- prev->next =
new;<BR>+ next->prev =
new1;<BR>+ new1->next =
next;<BR>+ new1->prev =
prev;<BR>+ prev->next =
new1;<BR> }<BR> <BR> /**<BR>@@ -56,9 +56,9 @@<BR> * Insert a
new entry after the specified head.<BR> * This is good for implementing
stacks.<BR> */<BR>-static inline void list_add(struct list_head *new,
struct list_head *head)<BR>+static inline void list_add(struct list_head *new1,
struct list_head *head)<BR> {<BR>-
__list_add(new, head, head->next);<BR>+
__list_add(new1, head, head->next);<BR> }<BR> <BR> /**<BR>@@
-69,9 +69,9 @@<BR> * Insert a new entry before the specified
head.<BR> * This is useful for implementing queues.<BR> */<BR>-static
inline void list_add_tail(struct list_head *new, struct list_head
*head)<BR>+static inline void list_add_tail(struct list_head *new1, struct
list_head *head)<BR> {<BR>-
__list_add(new, head->prev, head);<BR>+
__list_add(new1, head->prev, head);<BR> }<BR> <BR> /*<BR>@@
-96,8 +96,8 @@<BR> static inline void list_del(struct list_head
*entry)<BR> {<BR>
__list_del(entry->prev,
entry->next);<BR>- entry->next =
LIST_POISON1;<BR>- entry->prev =
LIST_POISON2;<BR>+ entry->next =
(struct list_head *)LIST_POISON1;<BR>+
entry->prev = (struct list_head
*)LIST_POISON2;<BR> }<BR> <BR> /**<BR>@@ -192,3 +192,4
@@<BR> &pos->member !=
(head); \<BR>
pos = n, n = list_entry(n->member.next, type_n,
member))<BR> <BR>+<BR>Index:
mlx4/kernel/inc/l2w_pci.h<BR>===================================================================<BR>---
mlx4/kernel/inc/l2w_pci.h (revision 1197)<BR>+++
mlx4/kernel/inc/l2w_pci.h (working copy)<BR>@@ -25,7 +25,7
@@<BR> #define HCA(v, d, t) \<BR> {
PCI_VENDOR_ID_##v, DEVID_HERMON_##d, t }<BR> <BR>-static struct
pci_device_id {<BR>+struct pci_device_id
{<BR> USHORT vendor;<BR> USHORT device;<BR> hca_type_t driver_data;<BR>@@
-106,3 +106,4 @@<BR> #define
__raw_writes writes<BR> #define
__raw_writeb writeb<BR> <BR>+<BR>Index:
mlx4/kernel/inc/l2w_sync.h<BR>===================================================================<BR>---
mlx4/kernel/inc/l2w_sync.h (revision 1197)<BR>+++
mlx4/kernel/inc/l2w_sync.h (working copy)<BR>@@ -5,6 +5,9
@@<BR> #define LONG_MAX
2147483647L /* maximum (signed) long value
*/<BR> #endif<BR> <BR>+#ifndef ULONG_MAX<BR>+#define ULONG_MAX
4294967295UL<BR>+#endif<BR> <BR> //<BR> // mutex wrapper<BR>@@
-162,3 +165,4
@@<BR> KeFlushQueuedDpcs();<BR> }<BR> <BR>+<BR></DIV></FONT></BODY></HTML>