mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Enrico Jorns <>
Cc: "Enrico Jörns" <>,
Subject: [PATCH] usb: dwc2: more precise and helpful message for dr_mode config issues
Date: Mon, 17 May 2021 14:49:41 +0200	[thread overview]
Message-ID: <> (raw)

With the previous message I misunderstood that the 'configuration
mismatch' was caused by any entity forcing the dr_mode to
The actual intention however is to tell the user that the selected
'dr_mode' does not match the capabilities provided by the controller or
the selected driver parts (USB_DWC2_HOST/USB_DWC2_GADGET).

The updated warning message attempts to reflect this more explicitly.

Also rename 'device' to 'peripheral' as it is named both in dtb and
in macros that way.

Signed-off-by: Enrico Jorns <>
 drivers/usb/dwc2/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index cc5729ed92..6dfe14f174 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -672,8 +672,8 @@ int dwc2_get_dr_mode(struct dwc2 *dwc2)
 	if (mode != dwc2->dr_mode) {
-			 "Configuration mismatch. dr_mode forced to %s\n",
-			mode == USB_DR_MODE_HOST ? "host" : "device");
+			 "Selected dr_mode not supported by controller/driver. Enforcing '%s' mode.\n",
+			mode == USB_DR_MODE_HOST ? "host" : "peripheral");
 		dwc2->dr_mode = mode;

barebox mailing list

             reply	other threads:[~2021-05-17 12:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 12:49 Enrico Jorns [this message]
2021-05-17 12:51 ` Ahmad Fatoum
2021-05-18  6:34 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox