[ros-diffs] [gvg] 20044: Merge from trunk:

gvg at svn.reactos.com gvg at svn.reactos.com
Sat Dec 10 23:21:59 CET 2005


Merge from trunk:
Multiple interrupt status bits can be active at the same time, process
them
all instead of just one and ignoring the rest.
On an active network card, this would eventually cause all transmit
buffers
to be marked "in use", blocking all transmits. Sinds no TCP acks would
go out,
it would block TCP receives too.
Modified: branches/ros-branch-0_2_9/reactos/drivers/net/dd/pcnet/pcnet.c
  _____  

Modified: branches/ros-branch-0_2_9/reactos/drivers/net/dd/pcnet/pcnet.c
--- branches/ros-branch-0_2_9/reactos/drivers/net/dd/pcnet/pcnet.c
2005-12-10 22:21:28 UTC (rev 20043)
+++ branches/ros-branch-0_2_9/reactos/drivers/net/dd/pcnet/pcnet.c
2005-12-10 22:21:55 UTC (rev 20044)
@@ -87,11 +87,11 @@

           if (Data & CSR0_CERR)
             Adapter->Statistics.XmtCollisions++;
         }
-      else if(Data & CSR0_IDON)
+      if(Data & CSR0_IDON)
         {
           DPRINT("IDON\n");
         }
-      else if(Data & CSR0_RINT)
+      if(Data & CSR0_RINT)
         {
           DPRINT("receive interrupt\n");
 
@@ -147,7 +147,7 @@
               Adapter->Statistics.RcvGoodFrames++;
             }
         }
-      else if(Data & CSR0_TINT)
+      if(Data & CSR0_TINT)
         {
           PTRANSMIT_DESCRIPTOR Descriptor;
 
@@ -201,10 +201,9 @@
             }
           NdisMSendResourcesAvailable(Adapter->MiniportAdapterHandle);
         }
-      else
+      if(Data & ~(CSR0_ERR | CSR0_IDON | CSR0_RINT | CSR0_TINT))
         {
-          DPRINT1("UNHANDLED INTERRUPT\n");
-          ASSERT(FALSE);
+          DPRINT("UNHANDLED INTERRUPT CSR0 0x%x\n", Data);
         }
 
       NdisRawReadPortUshort(Adapter->PortOffset + RDP, &Data);
@@ -1081,7 +1080,7 @@
       (Adapter->CurrentTransmitEndIndex == NUMBER_OF_BUFFERS - 1 &&
        Adapter->CurrentTransmitStartIndex == 0))
     {
-      DPRINT("No free space in circular buffer\n");
+      DPRINT1("No free space in circular buffer\n");
       NdisDprReleaseSpinLock(&Adapter->Lock);
       return NDIS_STATUS_RESOURCES;
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051210/7dd4dd21/attachment.html


More information about the Ros-diffs mailing list