mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 04:03:56 +00:00
[MSPORTS]
- Only use the first port base address for parallel port identification. ECP ports have a second base address that confused the identification code. - Apply the same check to the serial port identification code because it can prevent potential malfunction. At least it doesn't hurt to be on the safe side. svn path=/trunk/; revision=59082
This commit is contained in:
parent
6b5c8cd891
commit
c5855337f5
1 changed files with 8 additions and 2 deletions
|
@ -129,7 +129,7 @@ GetSerialPortNumber(IN HDEVINFO DeviceInfoSet,
|
|||
TRACE("Port: Start: %I64x Length: %lu\n",
|
||||
lpResDes->u.Port.Start.QuadPart,
|
||||
lpResDes->u.Port.Length);
|
||||
if (lpResDes->u.Port.Start.HighPart == 0)
|
||||
if ((lpResDes->u.Port.Start.HighPart == 0) && (dwBaseAddress == 0))
|
||||
dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart;
|
||||
break;
|
||||
|
||||
|
@ -201,7 +201,7 @@ GetParallelPortNumber(IN HDEVINFO DeviceInfoSet,
|
|||
TRACE("Port: Start: %I64x Length: %lu\n",
|
||||
lpResDes->u.Port.Start.QuadPart,
|
||||
lpResDes->u.Port.Length);
|
||||
if (lpResDes->u.Port.Start.HighPart == 0)
|
||||
if ((lpResDes->u.Port.Start.HighPart == 0) && (dwBaseAddress == 0))
|
||||
dwBaseAddress = (DWORD)lpResDes->u.Port.Start.LowPart;
|
||||
break;
|
||||
|
||||
|
@ -416,12 +416,16 @@ InstallParallelPort(IN HDEVINFO DeviceInfoSet,
|
|||
|
||||
/* ... try to determine the port number from its resources */
|
||||
if (dwPortNumber == 0)
|
||||
{
|
||||
dwPortNumber = GetParallelPortNumber(DeviceInfoSet,
|
||||
DeviceInfoData);
|
||||
TRACE("GetParallelPortNumber() returned port number: %lu\n", dwPortNumber);
|
||||
}
|
||||
|
||||
if (dwPortNumber == 0)
|
||||
{
|
||||
/* FIXME */
|
||||
FIXME("Got no valid port numer!\n");
|
||||
}
|
||||
|
||||
if (dwPortNumber != 0)
|
||||
|
@ -486,6 +490,8 @@ InstallParallelPort(IN HDEVINFO DeviceInfoSet,
|
|||
szPortName);
|
||||
}
|
||||
|
||||
TRACE("Friendly name: %S\n", szFriendlyName);
|
||||
|
||||
/* Set the friendly name for the device */
|
||||
SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet,
|
||||
DeviceInfoData,
|
||||
|
|
Loading…
Reference in a new issue