mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
- Add comment to NdisMRegisterIoPortRange about the meaning of InitialPort parameter and pass the bus number to HalTranslateBusAddress.
svn path=/trunk/; revision=11302
This commit is contained in:
parent
d788739c0e
commit
921ff5c94d
1 changed files with 7 additions and 2 deletions
|
@ -858,16 +858,21 @@ NdisMRegisterIoPortRange(
|
|||
|
||||
memset(&PortAddress, 0, sizeof(PortAddress));
|
||||
|
||||
/*
|
||||
* FIXME: NDIS 5+ completely ignores the InitialPort parameter, but
|
||||
* currently Adapter->BaseIoAddress isn't initialized anywhere.
|
||||
*/
|
||||
#if 1
|
||||
/* this might be a hack - ndis5 miniports seem to specify 0 */
|
||||
if(InitialPort)
|
||||
PortAddress = RtlConvertUlongToLargeInteger(InitialPort);
|
||||
else
|
||||
#endif
|
||||
PortAddress = Adapter->BaseIoAddress;
|
||||
|
||||
NDIS_DbgPrint(MAX_TRACE, ("Translating address 0x%x 0x%x\n", PortAddress.u.HighPart, PortAddress.u.LowPart));
|
||||
|
||||
/* FIXME: hard-coded bus number */
|
||||
if(!HalTranslateBusAddress(Adapter->BusType, 0, PortAddress, &AddressSpace, &TranslatedAddress))
|
||||
if(!HalTranslateBusAddress(Adapter->BusType, Adapter->BusNumber, PortAddress, &AddressSpace, &TranslatedAddress))
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("Unable to translate address\n"));
|
||||
return NDIS_STATUS_RESOURCES;
|
||||
|
|
Loading…
Reference in a new issue