Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp502466ybj; Thu, 7 May 2020 00:34:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJKrA9I0gPNtrJXfQd6pyvouIJyVu9H8CTmVHD2Ge51qVWKFy9eLE2XS+SNqmSn5Zg3+LZ4 X-Received: by 2002:a17:906:1d4c:: with SMTP id o12mr11016741ejh.357.1588836879464; Thu, 07 May 2020 00:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588836879; cv=none; d=google.com; s=arc-20160816; b=ILCUx4RVgfEMV+Ym5HVB9/JDHZYiUW9xD1u6T/VR0BJOqGDl5W8udHxKX4fqFiuHNC j2T9pyYzqbUuN32t94Q/knmlbEXh6lkk4AzxMAaqVeZk9GoRqpPnMJwEV2AVy6Wb9IK1 MGgDoPYesW4jV/5Tb4ozBGk0UeHbSvc6bmj2fyuh9glGYbqM/E+2p9WwhGh92d91I+iR /qG3W9W/0E0dsIQToTRCLmmYs5upCTdZIYLLQkLOu8iLfN4P7AVB675AIc7jiqoz2UAw 3kV24fGRW6V87ynMSPuvt6F98q7R5p4FVAN75Mdz+uCr2dtrrHp+9F0TT4PhIBKIpMY8 buKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gjiTf7F+43NRLxSwYCTX+pvl1896pBRSWI4NtoLW0m8=; b=Y6xlZ0nHxqnqMYi/nhHR9RXsqnSCxc2jA/wToUSVprY/nF/rDQSPRZ9mqdzRjc3nQ3 ifZ+WgXRmJLEZNbflDJpKP/sw3uJ66iqjsj23cb3vun9x5ULV0f2B+7Mpqmzl2txdovT CjoLmxJZ+TI9/ApaHZy+BtqgFpu7AgwSUOGVVV4lcUas3didISreMef7tN5hoWnxvm7e w1EWQPgSaVe7hoBEVdZtMAw15+d2+sEZXnRlu5WhKoUS4/BvTwZgUzPum3O8RYzINpfQ aw91MFLQCl8yuedQUBQtdvbvjnucw7HaXpJNbS8sCOynF/Kd3s21JcjoZ1yXHWS2CJly YnXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vy9K39+1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si2531175edi.331.2020.05.07.00.34.16; Thu, 07 May 2020 00:34:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Vy9K39+1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726350AbgEGHbW (ORCPT + 99 others); Thu, 7 May 2020 03:31:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgEGHbV (ORCPT ); Thu, 7 May 2020 03:31:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D31242078C; Thu, 7 May 2020 07:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588836681; bh=Ibfrzr4aWOuipCvG0cP+Oq1YAQPydyzZWHO9VbwFXeE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vy9K39+1uKfjiD/hPeV64uMHUe7pj44TE6ZxNNIUaw3S1NuLoVZlUlW08H3lP9Lws ocUEtLJLEVHzZ08n4kCv8ih5TWvcp0SCDW1JdGG5aSYdOLs3C/wpoTB/vb6cRmpanX Q6hCvBmV7MLRpbG4d6ukGbxSIPsJ70P3qBTcyJXI= Date: Thu, 7 May 2020 09:31:19 +0200 From: Greg Kroah-Hartman To: Kai-Heng Feng Cc: mathias.nyman@intel.com, "open list:USB XHCI DRIVER" , open list Subject: Re: [PATCH] xhci: Make debug message consistent with bus and port number Message-ID: <20200507073119.GA876666@kroah.com> References: <20200507061755.13280-1-kai.heng.feng@canonical.com> <20200507064510.GA787064@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2020 at 03:15:01PM +0800, Kai-Heng Feng wrote: > > > > 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... But if this is using dev_dbg(), and it is, then you know how to look that up by seeing where that device is in sysfs at that point in time. So why add this again? > > 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. Why pick these random ones? What makes these different? Either all or none, be consistant please. greg k-h