From ba09834c5ebdaf8d3e2a518c7fb78eaa7d89bb50 Mon Sep 17 00:00:00 2001 From: Victor Perevertkin Date: Wed, 21 Oct 2020 15:24:10 +0300 Subject: [PATCH] [PARPORT] Fix I/O port length check The Standard Parallel Port (SPP) has 3 registers, not 4: data, status, control This fixes the driver on the Compaq N600c laptop --- drivers/parallel/parport/fdo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/parallel/parport/fdo.c b/drivers/parallel/parport/fdo.c index 82590607f48..deb9b63ba7e 100644 --- a/drivers/parallel/parport/fdo.c +++ b/drivers/parallel/parport/fdo.c @@ -161,7 +161,7 @@ FdoStartDevice(IN PDEVICE_OBJECT DeviceObject, if (DeviceExtension->BaseAddress == 0) { - if (PartialDescriptor->u.Port.Length < 4) + if (PartialDescriptor->u.Port.Length < 3) return STATUS_INSUFFICIENT_RESOURCES; DeviceExtension->BaseAddress = PartialDescriptor->u.Port.Start.u.LowPart;