From: Mathias Nyman Date: Wed, 21 Sep 2022 12:34:48 +0000 (+0300) Subject: xhci: show fault reason for a failed enable slot command X-Git-Tag: v6.6.17~6449^2~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e11487f1f6a61be48b080ce2edbe3785759dfc7b;p=platform%2Fkernel%2Flinux-rpi.git xhci: show fault reason for a failed enable slot command 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 Link: https://lore.kernel.org/r/20220921123450.671459-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 9f6b552..5176765 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)));