From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: mathias.nyman@intel.com,
"open list:USB XHCI DRIVER" <linux-usb@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xhci: Make debug message consistent with bus and port number
Date: Thu, 7 May 2020 08:45:10 +0200 [thread overview]
Message-ID: <20200507064510.GA787064@kroah.com> (raw)
In-Reply-To: <20200507061755.13280-1-kai.heng.feng@canonical.com>
On Thu, May 07, 2020 at 02:17:55PM +0800, Kai-Heng Feng wrote:
> Current xhci debug message doesn't always output bus number, so it's
> hard to figure out it's from USB2 or USB3 root hub.
>
> In addition to that, some port numbers are offset to 0 and others are
> offset to 1. Use the latter to match the USB core.
>
> So use "bus number - port index + 1" to make debug message consistent.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> drivers/usb/host/xhci-hub.c | 41 +++++++++++++++++++++----------------
> 1 file changed, 23 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> index f37316d2c8fa..83088c262cc4 100644
> --- a/drivers/usb/host/xhci-hub.c
> +++ b/drivers/usb/host/xhci-hub.c
> @@ -1241,7 +1241,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
> temp = readl(ports[wIndex]->addr);
> /* Disable port */
> if (link_state == USB_SS_PORT_LS_SS_DISABLED) {
> - xhci_dbg(xhci, "Disable port %d\n", wIndex);
> + xhci_dbg(xhci, "Disable port %d-%d\n",
> + hcd->self.busnum, wIndex + 1);
Shouldn't xhci_dbg() show the bus number already? If not, please fix
that up there instead of having to add it to all messages "by hand".
thanks,
greg k-h
next prev parent reply other threads:[~2020-05-07 6:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 6:17 [PATCH] xhci: Make debug message consistent with bus and port number Kai-Heng Feng
2020-05-07 6:45 ` Greg Kroah-Hartman [this message]
2020-05-07 7:15 ` Kai-Heng Feng
2020-05-07 7:31 ` Greg Kroah-Hartman
2020-05-07 7:58 ` Kai-Heng Feng
2020-05-07 8:21 ` Greg Kroah-Hartman
2020-05-07 10:35 ` Mathias Nyman
2020-06-08 3:57 ` Kai-Heng Feng
2020-06-08 9:29 ` Mathias Nyman
2020-06-30 11:46 ` Kai-Heng Feng
2020-06-30 14:31 ` Mathias Nyman
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=20200507064510.GA787064@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).