From nobody Mon Feb 9 20:09:35 2026 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+43880+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+43880+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1563364027; cv=none; d=zoho.com; s=zohoarc; b=h7OYMc+VYJ5l/aKbPtaiwjkukCfv5hbuajYnuVaEt8jigxphETYMVu156AeSwmHQTPBvh2hY9MTl0Xoyfl0eJEqSOorGLGazXFD+V0ngU8gMbgtxelfGlksFnRF/uBgSO3ahR/ZuWzUTZPDl303dPBaYONINoC2APQD751J+qKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563364027; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Oc6sT8+mD52VOosXtb3X+z3IDYk3ErDrzcg3WClmgt0=; b=UGS4PD0tJpJgycUfKC+pEdtSkWSB63conHb25/7Vwx6XIYjD64Q4cxRWCz2CKEs9cfrVKvRmf3atG6IAK0h1XX6EGzuTX7+9ghdxavMGMWML+z/Qr2Y5pbifWlmnIq8V5THxtiDyZkDJZasQZ5Br5uCKlLTI1F3eI7vKurPEUw4= 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+43880+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563364027421876.8958200626621; Wed, 17 Jul 2019 04:47:07 -0700 (PDT) Return-Path: X-Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by groups.io with SMTP; Wed, 17 Jul 2019 04:47:06 -0700 X-Received: by mail-wr1-f66.google.com with SMTP id p13so24440035wru.10 for ; Wed, 17 Jul 2019 04:47:05 -0700 (PDT) X-Gm-Message-State: APjAAAXXHypEXmeIF12i5hxJdoGyKKeFNc8OT9Us7B4qvUddb778HuKw sPXes7kQ7QkRYci1pFENBUqVB+0Z X-Google-Smtp-Source: APXvYqx6TKaEuss7TeEN8FfCiEWRBOemqMS6GnPF42a5x9Jm1uN9wZGnuopPB+Fi8reZBH5gmMhB5w== X-Received: by 2002:a5d:4403:: with SMTP id z3mr43775442wrq.29.1563364024226; Wed, 17 Jul 2019 04:47:04 -0700 (PDT) X-Received: from localhost.localdomain ([84.203.61.230]) by smtp.gmail.com with ESMTPSA id c3sm26885778wrx.19.2019.07.17.04.47.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jul 2019 04:47:03 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org Subject: [edk2-devel] [edk2-platforms: PATCH 3/3] Platform/RPi3: Reduce debug noise when using a USB network device Date: Wed, 17 Jul 2019 12:46:45 +0100 Message-Id: <20190717114645.7776-4-pete@akeo.ie> In-Reply-To: <20190717114645.7776-1-pete@akeo.ie> References: <20190717114645.7776-1-pete@akeo.ie> MIME-Version: 1.0 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,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563364026; bh=40EErqI1O0U1LicqdP/BZMETAqMApwV7oiXmgehU1vE=; h=Cc:Date:From:Reply-To:Subject:To; b=weL4IavTByPqJaFZwnnZGwyNhipt7TZGjt9gf4qc9BHnHVSbGvJgx0ORClK0PUOUQEC v+BP16sWT9CR16ik1EZ3FowDjyGvhlHLgx9+9io8EZgTdD+1ldqJQRDaKYtg74yDDvGtz 3zVqK0Dg8yrMGhKWlvuP1I9L5d9Zvst6RIU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Michael Brown The design of the EFI_USB2_HC_PROTOCOL does not allow for long-lived bulk IN transactions as used by network devices, but instead requires the network driver to rely on repeatedly issuing bulk IN transactions with a very short timeout and in the expectation that most bulk IN transactions will time out since no packet will have been received. Timeouts are therefore normal and expected events when using a USB network device under UEFI. This currently results in a constant stream of spurious "Wait4Bit: set timeout" and "Channel %u did not halt" debug messages whenever the network device is open. All callers of Wait4Bit already report a meaningful error in the event of a timeout, so the Wait4Bit message may safely be removed without impacting the ability to debug the code. The "Channel %u did not halt" message may be moved to its sole call site and restricted to the situation in which the subsequent attempt to gracefully disable the channel did actually fail. Signed-off-by: Michael Brown Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi3/Drivers/DwUsbHostDxe/DwUsbHostDxe.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Platform/RaspberryPi/RPi3/Drivers/DwUsbHostDxe/DwUsbHostDxe.c = b/Platform/RaspberryPi/RPi3/Drivers/DwUsbHostDxe/DwUsbHostDxe.c index 22d9bd822f96..37ebf503fd60 100644 --- a/Platform/RaspberryPi/RPi3/Drivers/DwUsbHostDxe/DwUsbHostDxe.c +++ b/Platform/RaspberryPi/RPi3/Drivers/DwUsbHostDxe/DwUsbHostDxe.c @@ -74,9 +74,6 @@ Wait4Bit ( } } while (EFI_ERROR (gBS->CheckEvent (Timeout))); =20 - DEBUG ((DEBUG_ERROR, "Wait4Bit: %a timeout (reg:0x%x, value:0x%x, mask:0= x%x)\n", - Set ? "set" : "clear", Reg, Set ? Value : ~Value, Mask)); - return EFI_TIMEOUT; } =20 @@ -99,7 +96,6 @@ Wait4Chhltd ( Status =3D Wait4Bit (Timeout, DwHc->DwUsbBase + HCINT (Channel), DWC2_HCINT_CHHLTD, 1); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Channel %u did not halt\n", Channel)); return XFER_NOT_HALTED; } =20 @@ -331,6 +327,7 @@ DwHcTransfer ( if (Status =3D=3D EFI_SUCCESS) { Status =3D EFI_TIMEOUT; } else { + DEBUG ((DEBUG_ERROR, "Channel %u did not halt\n", Channel)); Status =3D EFI_DEVICE_ERROR; } break; --=20 2.21.0.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 (#43880): https://edk2.groups.io/g/devel/message/43880 Mute This Topic: https://groups.io/mt/32502336/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-