Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp492632ybj; Thu, 7 May 2020 00:17:11 -0700 (PDT) X-Google-Smtp-Source: APiQypLHZTg6ULddFs9ESF2BWQWbw3vVNwsQnUfujYfKdbCVZuT6vk6+P6J5x1XXgL3kCM6oVeuz X-Received: by 2002:a05:6402:30ad:: with SMTP id df13mr10621750edb.339.1588835831269; Thu, 07 May 2020 00:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588835831; cv=none; d=google.com; s=arc-20160816; b=pC1CITCJVbdY0OFXdtd4KO7HU97CxDUrbTbo68lbiIO5lP6kVjAvZa/t9I0R4earjH UosY+0T9/IVDfWjjDnuPAACXGZAtOG8z0gPieAqa36HticfuVhGiO9CVgXeT6iRAYMnV EoMHRRlf3a6hAZPzVkJHlSJvHEtfqMu8L9gdOJbolr/FCYv8Aug3AabxqyPeOB07SDpF G/6yI+JsqgTZT6+g03GM9yE14BgHHJGdrHi9n/OBcvuzb8Ch7ReDyT66SkfMXE51lPfq 98XL4SeSKY+WLvGJ5uHeYwkiYfsAs8SpEbtHOdVZ3gywP+gHsOUxcf1XQVaja5K3LZkk nvCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=B8+WC6YXOe1Zn/Oi5lblcC7KXb4I15LpRyfmRnTN3Is=; b=Ced2jRAnWn7ujAPsRul1jrBP5vSh7vWyy4dEWhAaeBPRoYAzWaYumDxtJU2E1nBi+0 eoFZWY5xtl8dN0Yu68Efn8PrZ8uHM3sN5w4ZzaNazVwxBH2AysRV7jBN/RIp2ZMx6kkG VtJDCWNsBJmHNIFbIJw4fJAJnjWNdvhFvM5Py0KaLlHLaxf9vvv1ZkyGyTRK71x6JWSG ZG6P4UdSICWTPLhU5vEmI+Trywcdy/7WsZjRvz6AG9R+RPYCF05L6RfXjnfARRYRXs4E 9bOHImxfQn2KJbrObYjw1VmKl1rL7n8NU1hOIk6Os0KT2GDy1TZwohLb89D8MfmXdYuj TJjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g12si2541336ejw.314.2020.05.07.00.16.47; Thu, 07 May 2020 00:17:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725914AbgEGHPY convert rfc822-to-8bit (ORCPT + 99 others); Thu, 7 May 2020 03:15:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40590 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgEGHPX (ORCPT ); Thu, 7 May 2020 03:15:23 -0400 Received: from mail-pf1-f197.google.com ([209.85.210.197]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jWakL-00019B-EW for linux-kernel@vger.kernel.org; Thu, 07 May 2020 07:15:05 +0000 Received: by mail-pf1-f197.google.com with SMTP id r198so4708221pfc.8 for ; Thu, 07 May 2020 00:15:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QxD6a8Q1LwdmN+/x3ssG6/MZTccaR3rqc0dMBZe7Goc=; b=km/Y7Fn8SKGueaPqJM43IufVBYu+hlAM3kr0qXNaVNO0SIkMKM/eMFO5jpuWZOJ853 6xWreJai8zpXlRzX70/umhedqY03Nw6JGYq/8d7R8uHX4eLADnAvOwjuocm45zwEe314 jXaozcQIUG1Fx3fOVjjN/uow2wrkLdsYm7SVfDU957agm80gN1aMsXxfAJrO6uZq8JCh 5HFlvWv33pDuKZW9SEebENwSrNfsPchi0alYiKFs9XdcBWw5IP0i7tsGADO83ti7eWv/ QpYqXUI6ooIu0cxgpTNkHXm3PZ9LPOnytHZCwITqlfKiEsZA+oRRUUaw1U+5UG+7q8ei VcWg== X-Gm-Message-State: AGi0PuY2h/XUCHvqdXBDV2PDeZ73UmDuB96rZYucj5vSIHvHKpm3w/kR uoh8Ba8b7slGx50Gr9OsJStcnpjtkLz6+SJ/rFVdR3VhunXjyrftByyRMR4gnwLXfBpqbf/7Xe/ y+RM65SUDJaunCGA3X7yriSRf49SjaZNsPSv7ScFzlQ== X-Received: by 2002:a63:1863:: with SMTP id 35mr8629313pgy.295.1588835704055; Thu, 07 May 2020 00:15:04 -0700 (PDT) X-Received: by 2002:a63:1863:: with SMTP id 35mr8629293pgy.295.1588835703651; Thu, 07 May 2020 00:15:03 -0700 (PDT) Received: from [192.168.1.208] (220-133-187-190.HINET-IP.hinet.net. [220.133.187.190]) by smtp.gmail.com with ESMTPSA id e4sm3155383pge.45.2020.05.07.00.15.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2020 00:15:03 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH] xhci: Make debug message consistent with bus and port number From: Kai-Heng Feng In-Reply-To: <20200507064510.GA787064@kroah.com> Date: Thu, 7 May 2020 15:15:01 +0800 Cc: mathias.nyman@intel.com, "open list:USB XHCI DRIVER" , open list Content-Transfer-Encoding: 8BIT Message-Id: References: <20200507061755.13280-1-kai.heng.feng@canonical.com> <20200507064510.GA787064@kroah.com> To: Greg Kroah-Hartman X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 7, 2020, at 14:45, Greg Kroah-Hartman wrote: > > 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 >> --- >> 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? It's the PCI bus number, different to USB2/USB3 root hub bus number... > If not, please fix > that up there instead of having to add it to all messages "by hand". Not all xhci debug messages need roothub number in it. Kai-Heng > > thanks, > > greg k-h