From nobody Thu May 9 00:40:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44666+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44666+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1564554341; cv=none; d=zoho.com; s=zohoarc; b=SVTU2rsmqDrH/UAfZck5pHSJHlWzGAsx9I/3C6xtsMbzEaEoAAEYLc6TUn5+dGu6o+qJLfGkfzhKKovHJKvJ147gwosjpn9J+JjVvA5c4Qvn2Zx1lc0yiKIOnF0xTl2jFPLmsySy7962lrdlFEPero7AmL/KtlJPm9xiEO4HPKY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564554341; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=+NOTcHGg9G+oXFSv0qFbPdmW4bLuRg6cNoW7Rm5poSk=; b=VbJKbhaY/8xH8Kykl5tzL5y2SE1u3qVJIPBHvO77s1x87eZFV2pU/fZTQSiuNO2g0ge65ck3G2dcJJoP9wlio9AuIx1PAaY+MXL8U0yCRrERQVKwV1/QWLyMZ1L0jt7m2o7ATrC7k8EgfjACh678GIEJoBkoAREhOxHd5taukYs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44666+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564554341126823.8700528835562; Tue, 30 Jul 2019 23:25:41 -0700 (PDT) Return-Path: X-Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by groups.io with SMTP; Tue, 30 Jul 2019 23:25:39 -0700 X-Received: by mail-lj1-f193.google.com with SMTP id x25so64508238ljh.2 for ; Tue, 30 Jul 2019 23:25:39 -0700 (PDT) X-Gm-Message-State: APjAAAWxMM4Ai+WTOK1bnxFChiFjIbTPwW8vs2W16InNF5pgq4k9rzQ6 YJ7pxoa+eEFIMjh3PsJgNkC+/C7KL+A= X-Google-Smtp-Source: APXvYqw47o36TFG0PrF/QftdvcIml1LDH2a/+etOe4zSoFjRUKAAv1ltCck8oWGiO7X/z70yi3koGA== X-Received: by 2002:a2e:5b5b:: with SMTP id p88mr26662045ljb.192.1564554337196; Tue, 30 Jul 2019 23:25:37 -0700 (PDT) X-Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id m17sm11496056lfj.22.2019.07.30.23.25.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jul 2019 23:25:36 -0700 (PDT) From: "Marcin Wojtas" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com, feng.tian@intel.com, michael.d.kinney@intel.com, liming.gao@intel.com, lersek@redhat.com Subject: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Return error when the device is not present Date: Wed, 31 Jul 2019 08:25:19 +0200 Message-Id: <1564554319-26810-1-git-send-email-mw@semihalf.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mw@semihalf.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564554340; bh=T/CQCZCbMGnE1wRnVLGhOGZEXCZuiI+wi9lVGj0Y8SA=; h=Cc:Date:From:Reply-To:Subject:To; b=qORqBfSNzeXdJvyNFOhmdp36BwLTMKJHYuVCQaa3EkkMBZLu3ljuEeLv/FfBWf07bCq 4pJz65PcJpnJsiCPnnqarMwR4Z8+zE8nTKfd59J2tB+FUj5cn9q+YTti6NKn0fywVTPU6 yUGy6kNuvQYlo+Z9sPUo5+NCdaWeHKnliM4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Until now, during the USB device enumeration when its PortState USB_PORT_STAT_CONNECTION bit was not set, the stack was not informed that the device is not present. Fix that by returning appropriate error code. Change-Id: I588f82b987993e9755f64ce76cde9eb690ef1d54 Signed-off-by: Marcin Wojtas Reviewed-by: Hao A Wu Reviewed-by: Laszlo Ersek --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/= Usb/UsbBusDxe/UsbEnumer.c index be9d9bd..ab1db15 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -719,6 +719,7 @@ UsbEnumerateNewDev ( =20 if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) { DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: No device present at port %d= \n", Port)); + Status =3D EFI_NOT_FOUND; goto ON_ERROR; } else if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_SUPER_SPE= ED)){ Child->Speed =3D EFI_USB_SPEED_SUPER; --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44666): https://edk2.groups.io/g/devel/message/44666 Mute This Topic: https://groups.io/mt/32662408/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-