From 8ae1702a16a290fc1025cdd5214efaec861d6f5b Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Thu, 7 May 2020 09:16:18 +0200 Subject: [PATCH] [PCIIDEX] Increase command port length to 8 from 7. CORE-9922 (#2711) Co-Authored-By: Vadim Galyant --- drivers/storage/ide/pciidex/pdo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/storage/ide/pciidex/pdo.c b/drivers/storage/ide/pciidex/pdo.c index c82d9d7feaa..7289cd44001 100644 --- a/drivers/storage/ide/pciidex/pdo.c +++ b/drivers/storage/ide/pciidex/pdo.c @@ -257,10 +257,10 @@ PciIdeXPdoQueryResourceRequirements( Descriptor->Flags = CM_RESOURCE_PORT_IO | CM_RESOURCE_PORT_16_BIT_DECODE | CM_RESOURCE_PORT_POSITIVE_DECODE; - Descriptor->u.Port.Length = 7; + Descriptor->u.Port.Length = 8; Descriptor->u.Port.Alignment = 1; Descriptor->u.Port.MinimumAddress.QuadPart = (ULONGLONG)CommandPortBase; - Descriptor->u.Port.MaximumAddress.QuadPart = (ULONGLONG)(CommandPortBase + 7 - 1); + Descriptor->u.Port.MaximumAddress.QuadPart = (ULONGLONG)(CommandPortBase + Descriptor->u.Port.Length - 1); Descriptor++; /* Control port base */ @@ -273,7 +273,7 @@ PciIdeXPdoQueryResourceRequirements( Descriptor->u.Port.Length = 1; Descriptor->u.Port.Alignment = 1; Descriptor->u.Port.MinimumAddress.QuadPart = (ULONGLONG)ControlPortBase; - Descriptor->u.Port.MaximumAddress.QuadPart = (ULONGLONG)(ControlPortBase + 1 - 1); + Descriptor->u.Port.MaximumAddress.QuadPart = (ULONGLONG)(ControlPortBase + Descriptor->u.Port.Length - 1); Descriptor++; /* Interrupt */