[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH v2] Fix typos and type problems in previous patch



Also add some extra trace statements that proved useful in debugging

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
v2:
 - Fixed lines that were supposed to zero MaxQueues

 src/xenvif/receiver.c    |  9 ++++++++-
 src/xenvif/transmitter.c | 17 ++++++++++++-----
 2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/xenvif/receiver.c b/src/xenvif/receiver.c
index f09b71c..e414fba 100644
--- a/src/xenvif/receiver.c
+++ b/src/xenvif/receiver.c
@@ -2758,6 +2758,8 @@ ReceiverConnect(
     PCHAR                   Buffer;
     NTSTATUS                status;
 
+    Trace("====>\n");
+
     Frontend = Receiver->Frontend;
 
     status = XENBUS_DEBUG(Acquire, &Receiver->DebugInterface);
@@ -2815,6 +2817,7 @@ ReceiverConnect(
     if (!NT_SUCCESS(status))
         goto fail6;
 
+    Trace("<====\n");
     return STATUS_SUCCESS;
 
 fail6:
@@ -3091,6 +3094,8 @@ ReceiverDisconnect(
     PXENVIF_FRONTEND        Frontend;
     LONG                    Index;
 
+    Trace("=====>\n");
+
     Frontend = Receiver->Frontend;
 
     Receiver->Split = FALSE;
@@ -3116,6 +3121,8 @@ ReceiverDisconnect(
     XENBUS_STORE(Release, &Receiver->StoreInterface);
 
     XENBUS_DEBUG(Release, &Receiver->DebugInterface);
+
+    Trace("<====\n");
 }
 
 VOID
@@ -3142,7 +3149,7 @@ ReceiverTeardown(
 
     __ReceiverFree(Receiver->Ring);
     Receiver->Ring = NULL;
-    Receiver->MaxQueues;
+    Receiver->MaxQueues = 0;
 
     XENBUS_CACHE(Release, &Receiver->CacheInterface);
 
diff --git a/src/xenvif/transmitter.c b/src/xenvif/transmitter.c
index d6357f1..3aeac93 100644
--- a/src/xenvif/transmitter.c
+++ b/src/xenvif/transmitter.c
@@ -3724,6 +3724,8 @@ TransmitterConnect(
     LONG                        Index;
     NTSTATUS                    status;
 
+    Trace("====>\n");
+
     Frontend = Transmitter->Frontend;
 
     status = XENBUS_DEBUG(Acquire, &Transmitter->DebugInterface);
@@ -3806,6 +3808,7 @@ TransmitterConnect(
     if (!NT_SUCCESS(status))
         goto fail8;
 
+    Trace("<====\n");
     return STATUS_SUCCESS;
 
 fail8:
@@ -3934,7 +3937,9 @@ TransmitterDisconnect(
     )
 {
     PXENVIF_FRONTEND        Frontend;
-    ULONG                   Index;
+    LONG                    Index;
+
+    Trace("====>\n");
 
     Frontend = Transmitter->Frontend;
 
@@ -3946,7 +3951,7 @@ TransmitterDisconnect(
     Transmitter->DebugCallback = NULL;
 
     Index = Transmitter->NumQueues;
-    while (--Index >- 0) {
+    while (--Index >= 0) {
         PXENVIF_TRANSMITTER_RING    Ring = Transmitter->Ring[Index];
 
         __TransmitterRingDisconnect(Ring);
@@ -3966,6 +3971,8 @@ TransmitterDisconnect(
     XENBUS_STORE(Release, &Transmitter->StoreInterface);
 
     XENBUS_DEBUG(Release, &Transmitter->DebugInterface);
+
+    Trace("<====\n");
 }
 
 VOID
@@ -3973,7 +3980,7 @@ TransmitterTeardown(
     IN  PXENVIF_TRANSMITTER Transmitter
     )
 {
-    ULONG                   Index;
+    LONG                    Index;
 
     ASSERT3U(KeGetCurrentIrql(), ==, PASSIVE_LEVEL);
     KeFlushQueuedDpcs();
@@ -3982,7 +3989,7 @@ TransmitterTeardown(
                   sizeof (LONG_PTR) *  
XENVIF_TRANSMITTER_PACKET_OFFSET_COUNT); 
 
     Index = Transmitter->MaxQueues;
-    while (--Index >- 0) {
+    while (--Index >= 0) {
         PXENVIF_TRANSMITTER_RING    Ring = Transmitter->Ring[Index];
 
         Transmitter->Ring[Index] = NULL;
@@ -3991,7 +3998,7 @@ TransmitterTeardown(
 
     __TransmitterFree(Transmitter->Ring);
     Transmitter->Ring = NULL;
-    Transmitter->MaxQueues;
+    Transmitter->MaxQueues = 0;
 
     XENBUS_CACHE(Release, &Transmitter->CacheInterface);
 
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.