Linux USB
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [PATCH 4/6] xhci: show fault reason for a failed enable slot command
Date: Wed, 21 Sep 2022 15:34:48 +0300	[thread overview]
Message-ID: <20220921123450.671459-5-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <20220921123450.671459-1-mathias.nyman@linux.intel.com>

Show the completion code of a unsuccessful "enable slot" command.
Add it in a human readable form to the existing error message.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
 drivers/usb/host/xhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index a7ef675f00fd..17f5dda913be 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4096,7 +4096,8 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
 	slot_id = command->slot_id;
 
 	if (!slot_id || command->status != COMP_SUCCESS) {
-		xhci_err(xhci, "Error while assigning device slot ID\n");
+		xhci_err(xhci, "Error while assigning device slot ID: %s\n",
+			 xhci_trb_comp_code_string(command->status));
 		xhci_err(xhci, "Max number of devices this xHCI host supports is %u.\n",
 				HCS_MAX_SLOTS(
 					readl(&xhci->cap_regs->hcs_params1)));
-- 
2.25.1


  parent reply	other threads:[~2022-09-21 12:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 12:34 [PATCH 0/6] xhci features and fixes for usb-next Mathias Nyman
2022-09-21 12:34 ` [PATCH 1/6] usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info() Mathias Nyman
2022-09-21 12:34 ` [PATCH 2/6] xhci: dbc: Fix memory leak in xhci_alloc_dbc() Mathias Nyman
2022-09-21 12:34 ` [PATCH 3/6] xhci: Don't show warning for reinit on known broken suspend Mathias Nyman
2022-09-21 12:34 ` Mathias Nyman [this message]
2022-09-21 12:34 ` [PATCH 5/6] xhci: remove unused command member from struct xhci_hcd struct Mathias Nyman
2022-09-21 12:34 ` [PATCH 6/6] xhci: remove unused lpm_failed_dev member from struct xhci_hcd Mathias Nyman
2022-09-22 12:08 ` [PATCH 0/6] xhci features and fixes for usb-next Greg KH
2022-09-22 12:43   ` Mathias Nyman
2022-09-22 12:52     ` Greg KH

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20220921123450.671459-5-mathias.nyman@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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