https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c96ba5a713b70c61403ec993a25745e75f6d1200

commit c96ba5a713b70c61403ec993a25745e75f6d1200
Author:     Hervé Poussineau <[email protected]>
AuthorDate: Mon Feb 10 21:30:07 2020 +0100
Commit:     Hervé Poussineau <[email protected]>
CommitDate: Mon Feb 10 21:33:36 2020 +0100

    [ISAPNP] Also read serial numbers of devices
---
 drivers/bus/isapnp/hardware.c | 5 +++--
 drivers/bus/isapnp/isapnp.h   | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c
index be7eda08a47..fbf53eb8059 100644
--- a/drivers/bus/isapnp/hardware.c
+++ b/drivers/bus/isapnp/hardware.c
@@ -516,11 +516,12 @@ ProbeIsaPnpBus(PISAPNP_FDO_EXTENSION FdoExt)
       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->SerialNumber = RtlUlongByteSwap(Identifier.Serial);
       LogDevice->IoAddr = ReadIoBase(FdoExt->ReadDataPort, 0);
       LogDevice->IrqNo = ReadIrqNo(FdoExt->ReadDataPort, 0);
 
-      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);
+      DPRINT1("Detected ISA PnP device - VID: '%3s' PID: 0x%x SN: 0x04x 
IoBase: 0x%x IRQ:0x%x\n",
+               LogDevice->VendorId, LogDevice->ProdId, 
LogDevice->SerialNumber, LogDevice->IoAddr, LogDevice->IrqNo);
 
       WaitForKey();
 
diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h
index cb7e64d44ab..aaa0f2c9962 100644
--- a/drivers/bus/isapnp/isapnp.h
+++ b/drivers/bus/isapnp/isapnp.h
@@ -34,6 +34,7 @@ typedef struct _ISAPNP_LOGICAL_DEVICE {
   ISAPNP_COMMON_EXTENSION Common;
   UCHAR VendorId[3];
   USHORT ProdId;
+  ULONG SerialNumber;
   USHORT IoAddr;
   UCHAR IrqNo;
   UCHAR CSN;

Reply via email to