From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=xDc6aRW8; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.66, mailfrom: pete@akeo.ie) 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 Received: by mail-wr1-f66.google.com with SMTP id p13so24440035wru.10 for ; Wed, 17 Jul 2019 04:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9HfxvsAeiPqqUmYlvHcASH1vw6aBN97dfgjlWtgYEis=; b=xDc6aRW8cIXWhtm2jc5rF9qZOMYbCl86dI5bLg2hvZ1r7fOsN/f8hgxQl34MY5dJ4F +XVkzRAET6Ghrc0VPWwXPxt4WZV1k6/JkzfoLlbpbtjuOSy28UE4srEXTKoLVzCCTzZ6 Y/sawsFNyTV33MhsKuvPYrFIeIWFuKnu63yTKmuUcUzaHbiDHf+LpIkIHqopf/3zUkes 1cqDneyvoHmFN17M/VoNgJl+6G4aOwGwoNHo1bYxHykEYA7YBDiPl4bkbIQWxSm7Xeww mZBapQBvaTQmVHGL99S7kKsNjKVo/0xq9K+2zqT7xwiFQWQYcdBomwfVf+9HbJtMnAZU 8J5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9HfxvsAeiPqqUmYlvHcASH1vw6aBN97dfgjlWtgYEis=; b=AFagCCgaw9CUZTgSdc3qthVHpuDSqCGMXUp/DKIKwmsa8cTySc73gYKdSwJf3dE6d+ 3c5sizXMCa5RchVbFJt9yrRecldMgsDCJP4r4n8hr3WTZ5Ja6SbUt9luyuD9Yqg9ku1d L7Qv/2w7sC0QHFhkaMUO3WTkYhJKSzR0mTFFdxBPNrQU7DWd9dU7nXfJxeTdOZLgblki xR0IpKUWoc58ewwMrvncr1pvkAX5Fy+Hb1Nj0OGY9jPsCClLWAWxZm3FQI6QImkIv/lP QbBpRDSzpYA8CdWQLlcoPciy08JGuPK1vMtdGchmLCnQRRz0iq8V2Yugnu2hPJACRJCb /Iow== 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) Return-Path: 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-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> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190717114645.7776-1-pete@akeo.ie> References: <20190717114645.7776-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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))); - DEBUG ((DEBUG_ERROR, "Wait4Bit: %a timeout (reg:0x%x, value:0x%x, mask:0x%x)\n", - Set ? "set" : "clear", Reg, Set ? Value : ~Value, Mask)); - return EFI_TIMEOUT; } @@ -99,7 +96,6 @@ Wait4Chhltd ( Status = 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; } @@ -331,6 +327,7 @@ DwHcTransfer ( if (Status == EFI_SUCCESS) { Status = EFI_TIMEOUT; } else { + DEBUG ((DEBUG_ERROR, "Channel %u did not halt\n", Channel)); Status = EFI_DEVICE_ERROR; } break; -- 2.21.0.windows.1