From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: ray.ni@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Wed, 31 Jul 2019 09:51:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2019 09:51:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="166450734" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga008.jf.intel.com with ESMTP; 31 Jul 2019 09:51:06 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 31 Jul 2019 09:51:06 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 31 Jul 2019 09:51:05 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 00:51:04 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "mw@semihalf.com" CC: "leif.lindholm@linaro.org" , "ard.biesheuvel@linaro.org" , "jsd@semihalf.com" , "jaz@semihalf.com" , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , "lersek@redhat.com" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Return error when the device is not present Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Return error when the device is not present Thread-Index: AQHVR2jQteTC2Jl0B0OacFH31LWiiabk8Tag Date: Wed, 31 Jul 2019 16:51:03 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C265FC4@SHSMSX104.ccr.corp.intel.com> References: <1564554319-26810-1-git-send-email-mw@semihalf.com> In-Reply-To: <1564554319-26810-1-git-send-email-mw@semihalf.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjRlZmMxZDYtNGE0ZC00NzdhLWExZWYtNjMwNjY5ZmMwYWY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibEJmU3RVVlJyaUQ0SnRJRG9sRUZoRnpQM2pVZlBhemJwd09KTThpbzJUNFFzNm53bVdjT29uSzBzTExKTVdoWSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Marcin, What does the failure look like without your fix? Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Marcin Wo= jtas > Sent: Wednesday, July 31, 2019 2:25 PM > To: devel@edk2.groups.io > Cc: leif.lindholm@linaro.org; ard.biesheuvel@linaro.org; mw@semihalf.com= ; jsd@semihalf.com; jaz@semihalf.com; Tian, Feng > ; Kinney, Michael D ; G= ao, Liming ; > lersek@redhat.com > Subject: [edk2-devel] [PATCH] MdeModulePkg/UsbBusDxe: Return error when = the device is not present >=20 > 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. >=20 > Change-Id: I588f82b987993e9755f64ce76cde9eb690ef1d54 > Signed-off-by: Marcin Wojtas > --- > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/B= us/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_= SPEED)){ > Child->Speed =3D EFI_USB_SPEED_SUPER; > -- > 2.7.4 >=20 >=20 >=20