- Fix a critical bug in NdisMGetDmaAlignment which was causing every NIC driver calling this function to crash because we thought we were passed an NDIS_DMA_BLOCK handle when in fact we receive an NDIS_MINIPORT_BLOCK handle
- Fixes RTL8169 and 3Com NICs (and probably several more) [bug 6651 and bug 4330]

svn path=/trunk/; revision=54372
This commit is contained in:
Cameron Gutman 2011-11-13 06:02:08 +00:00
parent edc6eb9eca
commit 6735cfc56e

View file

@ -831,6 +831,7 @@ EXPORT
NdisMReadDmaCounter(
IN NDIS_HANDLE MiniportDmaHandle)
{
/* NOTE: Unlike NdisMGetDmaAlignment() below, this is a handle to the DMA block */
PNDIS_DMA_BLOCK DmaBlock = MiniportDmaHandle;
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)DmaBlock->SystemAdapterObject;
@ -846,10 +847,11 @@ NdisMReadDmaCounter(
ULONG
EXPORT
NdisMGetDmaAlignment(
IN NDIS_HANDLE MiniportDmaHandle)
IN NDIS_HANDLE MiniportAdapterHandle)
{
PNDIS_DMA_BLOCK DmaBlock = MiniportDmaHandle;
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)DmaBlock->SystemAdapterObject;
/* NOTE: Unlike NdisMReadDmaCounter() above, this is a handle to the NDIS miniport block */
PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
PDMA_ADAPTER AdapterObject = (PDMA_ADAPTER)Adapter->NdisMiniportBlock.SystemAdapterObject;
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));