From nobody Mon May 20 12:09:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58141+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58141+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1587885894; cv=none; d=zohomail.com; s=zohoarc; b=Bz877n9jpKPq4Uv2kZPojatbi022pK17X5eFUQAdvU8hD8kRx8p36pV5Yw3mIE/kk/AnaGxazauXBEtXwbhRutGrRiX5ECNe9ZesZ8NRypG/lv/LfSfkWJk+so3QnDvSmWxek2NUkdwJE6ZQwUPt+mVUmDwW2rKqYUzPYUYsUJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587885894; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=ntilMPW7D9PToPAQY9Dzjl94duATbCLVQHDzLdi/JMg=; b=cE4wAkjaKY/Vgh3nyOwUTo8zhHY5nS2qPXlHa5EGYBQrJ9Gd7Ywxe0zYaJP5A5F/H4JfxDLBHhk9miM2mgWksPOLzLWJun/MquYEBWMA5OALEB1hu30i7q9Xq4kcGEZxxq9QI3Slj3XHiFi4IcxiKtKMCpF1f6cQbmRlknFfDMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58141+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587885894166257.6737059480961; Sun, 26 Apr 2020 00:24:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id cIc1YY1788612x60bYKwrpHM; Sun, 26 Apr 2020 00:24:53 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.7454.1587885893396144986 for ; Sun, 26 Apr 2020 00:24:53 -0700 IronPort-SDR: MctKdmT2c4nj2FelBsB2sDfa2APjbi0AtSB2C9TdrSgcxb3ElkZwdKdHs7irSouQfDdTMxkn+J DY8fdAHrRwEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2020 00:24:53 -0700 IronPort-SDR: 6mTX+vGy4BZMbMbaSGeuccam9SF9XtkCxPgrRqeyu2cFcwzO1U+ot5g+fR0eAjs6258yeAB2RF IpY0EgkN2t/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,319,1583222400"; d="scan'208";a="457949206" X-Received: from guominji-mobl.ccr.corp.intel.com ([10.238.5.173]) by fmsmga005.fm.intel.com with ESMTP; 26 Apr 2020 00:24:51 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v2] MdeModulePkg/UsbBusDxe: Rebuild the description table after Reset Device Date: Sun, 26 Apr 2020 15:24:51 +0800 Message-Id: <20200426072451.884-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: <27952.devel.edk2.groups.io> Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: W4vARQBOtubKkFnA7FLMS9Qsx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587885893; bh=OJIoSxSgDDbtXLwEEvi5HlyEHo0tAAwBRl2nB0Uu3gA=; h=Cc:Date:From:Reply-To:Subject:To; b=hw4kvtvc1rVlIFqzh16qXInNLAD3kSiloNO9yvCTDf9cBB0P4qg13aq5jcxqkoPT2WL vWJ0lR3R7wwNQIcNFrzq5znMpo0Ddb2sC+q+WAU3RZcGnWi82TSS2+mvKl1FdsluMdxAo sYfq+NH+1eaN8prMOHj3LrFMvTBkVG2aiCE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2694 When the USB fail and then Reset Device, it should rebuild description. Signed-off-by: Guomin Jiang Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni --- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb= /UsbBusDxe/UsbBus.c index 4b4915c019..90548da38b 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c @@ -869,6 +869,18 @@ UsbIoPortReset ( =20 DEBUG (( EFI_D_INFO, "UsbIoPortReset: device is now ADDRESSED at %d\n", = Dev->Address)); =20 + Status =3D UsbGetMaxPacketSize0 (Dev); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "UsbIoPortRest: Fail to get max packet size - %r\= n", Status)); + goto ON_EXIT; + } + + Status =3D UsbBuildDescTable (Dev); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "UsbIoPortRest: Fail to build description table -= %r\n", Status)); + goto ON_EXIT; + } + // // Reset the current active configure, after this device // is in CONFIGURED state. --=20 2.25.1.windows.1 -=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 (#58141): https://edk2.groups.io/g/devel/message/58141 Mute This Topic: https://groups.io/mt/73278167/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-