win-pvdrivers

changeset 881:730447ed7524

Make xennet import functions from xenpci (no functions yet though). Add lfds include to fix build problem.
Cleanups.
author James Harper <james.harper@bendigoit.com.au>
date Tue Mar 15 12:23:44 2011 +1100 (2011-03-15)
parents e315b8490131
children 5020c1c55f95
files xennet/sources xennet/xennet.c
line diff
     1.1 --- a/xennet/sources	Tue Mar 15 12:22:19 2011 +1100
     1.2 +++ b/xennet/sources	Tue Mar 15 12:23:44 2011 +1100
     1.3 @@ -6,5 +6,11 @@ INF_NAME=$(TARGETNAME)
     1.4  C_DEFINES=$(C_DEFINES) -D_WIN2K_COMPAT_SLIST_USAGE
     1.5  !ENDIF
     1.6  TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\ndis.lib
     1.7 +TARGETLIBS=$(TARGETLIBS) ..\xenpci\$(O)\xenpci.lib
     1.8 +!IF $(386)
     1.9 +TARGETLIBS=$(TARGETLIBS) $(LIBLFDS_DIR)\bin\i386\liblfds.lib
    1.10 +!ELSE
    1.11 +TARGETLIBS=$(TARGETLIBS) $(LIBLFDS_DIR)\bin\AMD64\liblfds.lib
    1.12 +!ENDIF
    1.13  NTTARGETFILES=$(NTTARGETFILES) $(OBJ_PATH)\$(O)\$(INF_NAME).inf
    1.14  SOURCES=xennet.rc xennet.c xennet_tx.c xennet_rx.c xennet_oid.c xennet_common.c
     2.1 --- a/xennet/xennet.c	Tue Mar 15 12:22:19 2011 +1100
     2.2 +++ b/xennet/xennet.c	Tue Mar 15 12:23:44 2011 +1100
     2.3 @@ -782,44 +782,6 @@ XenNet_Init(
     2.4    
     2.5    NdisCloseConfiguration(config_handle);
     2.6  
     2.7 -#if 0
     2.8 -  ptr = xi->config_page;
     2.9 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_RING, "tx-ring-ref", NULL, NULL);
    2.10 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_RING, "rx-ring-ref", NULL, NULL);
    2.11 -  #pragma warning(suppress:4054)
    2.12 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_EVENT_CHANNEL, "event-channel", (PVOID)XenNet_HandleEvent, xi);
    2.13 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "mac", NULL, NULL);
    2.14 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "feature-sg", NULL, NULL);
    2.15 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_READ_STRING_BACK, "feature-gso-tcpv4", NULL, NULL);
    2.16 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_WRITE_STRING, "request-rx-copy", "1", NULL);
    2.17 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_WRITE_STRING, "feature-rx-notify", "1", NULL);
    2.18 -  RtlStringCbPrintfA(buf, ARRAY_SIZE(buf), "%d", !xi->config_csum);
    2.19 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_WRITE_STRING, "feature-no-csum-offload", buf, NULL);
    2.20 -  RtlStringCbPrintfA(buf, ARRAY_SIZE(buf), "%d", (int)xi->config_sg);
    2.21 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_WRITE_STRING, "feature-sg", buf, NULL);
    2.22 -  RtlStringCbPrintfA(buf, ARRAY_SIZE(buf), "%d", !!xi->config_gso);
    2.23 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_WRITE_STRING, "feature-gso-tcpv4", buf, NULL);
    2.24 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_XB_STATE_MAP_PRE_CONNECT, NULL, NULL, NULL);
    2.25 -  __ADD_XEN_INIT_UCHAR(&ptr, 0); /* no pre-connect required */
    2.26 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_XB_STATE_MAP_POST_CONNECT, NULL, NULL, NULL);
    2.27 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateConnected);
    2.28 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateConnected);
    2.29 -  __ADD_XEN_INIT_UCHAR(&ptr, 20);
    2.30 -  __ADD_XEN_INIT_UCHAR(&ptr, 0);
    2.31 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_XB_STATE_MAP_SHUTDOWN, NULL, NULL, NULL);
    2.32 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateClosing);
    2.33 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateClosing);
    2.34 -  __ADD_XEN_INIT_UCHAR(&ptr, 50);
    2.35 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateClosed);
    2.36 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateClosed);
    2.37 -  __ADD_XEN_INIT_UCHAR(&ptr, 50);
    2.38 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateInitialising);
    2.39 -  __ADD_XEN_INIT_UCHAR(&ptr, XenbusStateInitWait);
    2.40 -  __ADD_XEN_INIT_UCHAR(&ptr, 50);
    2.41 -  __ADD_XEN_INIT_UCHAR(&ptr, 0);
    2.42 -  ADD_XEN_INIT_REQ(&ptr, XEN_INIT_TYPE_END, NULL, NULL, NULL);
    2.43 -#endif
    2.44 -
    2.45    status = XenNet_D0Entry(xi);
    2.46    if (!NT_SUCCESS(status))
    2.47    {