mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 22:30:17 +00:00
- The slot number passed directly to NdisImmediateReadPciSlotInformation/NdisImmediateWritePciSlotInformation is ignored according to MSDN so store a valid slot number in the wrapper context to use instead
svn path=/trunk/; revision=41024
This commit is contained in:
parent
c0e9d6e37d
commit
000423fd64
3 changed files with 7 additions and 2 deletions
|
@ -80,6 +80,7 @@ typedef struct _NDIS_WRAPPER_CONTEXT {
|
|||
HANDLE RegistryHandle;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
ULONG BusNumber;
|
||||
ULONG SlotNumber;
|
||||
} NDIS_WRAPPER_CONTEXT, *PNDIS_WRAPPER_CONTEXT;
|
||||
|
||||
#define GET_MINIPORT_DRIVER(Handle)((PNDIS_M_DRIVER_BLOCK)Handle)
|
||||
|
|
|
@ -28,8 +28,9 @@ NdisImmediateReadPciSlotInformation(
|
|||
IN ULONG Length)
|
||||
{
|
||||
PNDIS_WRAPPER_CONTEXT WrapperContext = (PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
|
||||
/* Slot number is ignored. */
|
||||
return HalGetBusDataByOffset(PCIConfiguration, WrapperContext->BusNumber,
|
||||
SlotNumber, Buffer, Offset, Length);
|
||||
WrapperContext->SlotNumber, Buffer, Offset, Length);
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,8 +47,9 @@ NdisImmediateWritePciSlotInformation(
|
|||
IN ULONG Length)
|
||||
{
|
||||
PNDIS_WRAPPER_CONTEXT WrapperContext = (PNDIS_WRAPPER_CONTEXT)WrapperConfigurationContext;
|
||||
/* Slot number is ignored. */
|
||||
return HalSetBusDataByOffset(PCIConfiguration, WrapperContext->BusNumber,
|
||||
SlotNumber, Buffer, Offset, Length);
|
||||
WrapperContext->SlotNumber, Buffer, Offset, Length);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1817,6 +1817,8 @@ NdisIPnPStartDevice(
|
|||
|
||||
Adapter->NdisMiniportBlock.SlotNumber = SlotNumber.u.AsULONG;
|
||||
}
|
||||
WrapperContext.SlotNumber = Adapter->NdisMiniportBlock.SlotNumber;
|
||||
|
||||
NdisCloseConfiguration(ConfigHandle);
|
||||
|
||||
/* Set handlers (some NDIS macros require these) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue