From bec0ceb82f2ca3d04426934ff536f9f417921c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 10 Feb 2020 21:29:28 +0100 Subject: [PATCH] [ISAPNP] Store VendorId/ProdId in the usual form --- drivers/bus/isapnp/hardware.c | 8 +++++--- drivers/bus/isapnp/isapnp.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c index 6922349a53c..be7eda08a47 100644 --- a/drivers/bus/isapnp/hardware.c +++ b/drivers/bus/isapnp/hardware.c @@ -512,12 +512,14 @@ ProbeIsaPnpBus(PISAPNP_FDO_EXTENSION FdoExt) WriteLogicalDeviceNumber(LogDev); - LogDevice->VendorId = LogDevId.VendorId; - LogDevice->ProdId = LogDevId.ProdId; + LogDevice->VendorId[0] = ((LogDevId.VendorId >> 2) & 0x1f) + 'A' - 1, + LogDevice->VendorId[1] = (((LogDevId.VendorId & 0x3) << 3) | ((LogDevId.VendorId >> 13) & 0x7)) + 'A' - 1, + LogDevice->VendorId[2] = ((LogDevId.VendorId >> 8) & 0x1f) + 'A' - 1, + LogDevice->ProdId = RtlUshortByteSwap(LogDevId.ProdId); LogDevice->IoAddr = ReadIoBase(FdoExt->ReadDataPort, 0); LogDevice->IrqNo = ReadIrqNo(FdoExt->ReadDataPort, 0); - DPRINT1("Detected ISA PnP device - VID: 0x%x PID: 0x%x IoBase: 0x%x IRQ:0x%x\n", + DPRINT1("Detected ISA PnP device - VID: '%3s' PID: 0x%x IoBase: 0x%x IRQ:0x%x\n", LogDevice->VendorId, LogDevice->ProdId, LogDevice->IoAddr, LogDevice->IrqNo); WaitForKey(); diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index 04c10bd4b64..cb7e64d44ab 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -32,7 +32,7 @@ typedef struct _ISAPNP_FDO_EXTENSION { typedef struct _ISAPNP_LOGICAL_DEVICE { ISAPNP_COMMON_EXTENSION Common; - USHORT VendorId; + UCHAR VendorId[3]; USHORT ProdId; USHORT IoAddr; UCHAR IrqNo;