Author: fireball
Date: Sun Jun 29 06:34:46 2008
New Revision: 34184
URL:
http://svn.reactos.org/svn/reactos?rev=34184&view=rev
Log:
- Revert PCNET hack.
- Merge 34154 (a correct fix instead).
Modified:
branches/ros-branch-0_3_5/reactos/drivers/network/dd/pcnet/pcnet.c
branches/ros-branch-0_3_5/reactos/drivers/network/ndis/ndis/miniport.c
Modified: branches/ros-branch-0_3_5/reactos/drivers/network/dd/pcnet/pcnet.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/driver…
==============================================================================
--- branches/ros-branch-0_3_5/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_5/reactos/drivers/network/dd/pcnet/pcnet.c [iso-8859-1] Sun
Jun 29 06:34:46 2008
@@ -706,7 +706,7 @@
/* load init block and start the card */
NdisRawWritePortUshort(Adapter->PortOffset + RAP, CSR0);
- NdisRawWritePortUshort(Adapter->PortOffset + RDP, CSR0_STRT|CSR0_INIT);
+ NdisRawWritePortUshort(Adapter->PortOffset + RDP, CSR0_STRT|CSR0_INIT|CSR0_IENA);
/* detect the media state */
NdisRawWritePortUshort(Adapter->PortOffset + RAP, BCR4);
Modified: branches/ros-branch-0_3_5/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/driver…
==============================================================================
--- branches/ros-branch-0_3_5/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1]
(original)
+++ branches/ros-branch-0_3_5/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1]
Sun Jun 29 06:34:46 2008
@@ -1418,27 +1418,7 @@
}
NdisCloseConfiguration(ConfigHandle);
- /*
- * Call MiniportInitialize.
- */
-
- NDIS_DbgPrint(MID_TRACE, ("calling MiniportInitialize\n"));
- NdisStatus =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.InitializeHandler)(
- &OpenErrorStatus, &SelectedMediumIndex, &MediaArray[0],
- MEDIA_ARRAY_SIZE, Adapter, (NDIS_HANDLE)&WrapperContext);
-
- ZwClose(WrapperContext.RegistryHandle);
-
- if (NdisStatus != NDIS_STATUS_SUCCESS ||
- SelectedMediumIndex >= MEDIA_ARRAY_SIZE)
- {
- NDIS_DbgPrint(MIN_TRACE, ("MiniportInitialize() failed for an
adapter.\n"));
- ExInterlockedRemoveEntryList( &Adapter->ListEntry, &AdapterListLock );
- return (NTSTATUS)NdisStatus;
- }
-
/* Set handlers (some NDIS macros require these) */
-
Adapter->NdisMiniportBlock.EthRxCompleteHandler =
EthFilterDprIndicateReceiveComplete;
Adapter->NdisMiniportBlock.EthRxIndicateHandler = EthFilterDprIndicateReceive;
Adapter->NdisMiniportBlock.SendCompleteHandler = MiniSendComplete;
@@ -1448,6 +1428,25 @@
Adapter->NdisMiniportBlock.PacketIndicateHandler= MiniIndicateReceivePacket;
Adapter->NdisMiniportBlock.StatusHandler = MiniStatus;
Adapter->NdisMiniportBlock.StatusCompleteHandler= MiniStatusComplete;
+
+ /*
+ * Call MiniportInitialize.
+ */
+
+ NDIS_DbgPrint(MID_TRACE, ("calling MiniportInitialize\n"));
+ NdisStatus =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.InitializeHandler)(
+ &OpenErrorStatus, &SelectedMediumIndex, &MediaArray[0],
+ MEDIA_ARRAY_SIZE, Adapter, (NDIS_HANDLE)&WrapperContext);
+
+ ZwClose(WrapperContext.RegistryHandle);
+
+ if (NdisStatus != NDIS_STATUS_SUCCESS ||
+ SelectedMediumIndex >= MEDIA_ARRAY_SIZE)
+ {
+ NDIS_DbgPrint(MIN_TRACE, ("MiniportInitialize() failed for an
adapter.\n"));
+ ExInterlockedRemoveEntryList( &Adapter->ListEntry, &AdapterListLock );
+ return (NTSTATUS)NdisStatus;
+ }
Adapter->NdisMiniportBlock.MediaType = MediaArray[SelectedMediumIndex];