mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Prashanth K <prashanth.k@oss.qualcomm.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 0/3] Add the DWC3 instance name in traces
Date: Mon, 5 Jan 2026 17:01:00 +0000	[thread overview]
Message-ID: <20260105170044.vuuoyiszyptokmfp@synopsys.com> (raw)
In-Reply-To: <2026010528-animal-avenging-dad2@gregkh>

On Mon, Jan 05, 2026, Greg Kroah-Hartman wrote:
> On Mon, Jan 05, 2026 at 04:11:50PM +0000, Thinh Nguyen wrote:
> > Hi Greg,
> > 
> > On Mon, Jan 05, 2026, Greg Kroah-Hartman wrote:
> > > On Mon, Jan 05, 2026 at 05:23:22PM +0530, Prashanth K wrote:
> > > > When multiple DWC3 controllers are being used, trace events from
> > > > different instances get mixed up making debugging difficult as
> > > > there's no way to distinguish which instance generated the trace.
> > > > 
> > > > Hence append the controller base address into ftrace. This needs
> > > > the following reworks which is addressed using this patch series.
> > > > 
> > > >   1. Removal of dep->regs and use dwc->regs everywhere
> > > >   2. Use dwc pointer in all dwc3_readl/writel()
> > > >   3. Adding the base addr in traces.
> > > > 
> > > > Changes in v2:
> > > > - Avoid using macros for dwc3_readl/writel()
> > > > - Use base address intraces instead of dev name.
> > > 
> > > Wait, why change this?  The dev name is what you should care about.
> > > "base address" doesn't make much sense as this is on a lot of different
> > > busses, right?
> > > 
> > 
> > I asked Prashanth to do so. The reason is because the device name is not
> > consistent and not obvious for different busses. For example, for PCI
> > devices, the device name may be in a form of "dwc3.N.auto". If we only
> > have access to the traces and not the testing setup (which often is the
> > case), it's difficult to tell which is which. Also, very often the
> > consumer of the traces is also the hardware validation engineer, and
> > IMO, it's more understandable reading base address than device name.
> 
> But all you need to know is "this is different than the other one", you
> don't "need" the io address, right?  And if you really did, just add
> that to the trace as well _when_ you actually need it.

The base address preserves that context to know which instance is which.
If we have the base address, do we still need the device name?

> 
> device name is how Linux handles devices, please use that otherwise it
> just gets confusing for everyone in the end (hint, teach the hardware
> engineer what it means.)
> 

I'm not suggesting to change how we use the device name in term of how
Linux handle devices. This is for the trace event prints specific to
dwc3. The base address carries the additional context which the device
name may not. We should not be confused in the beginning since we are
not replacing any old device name print. There's none to begin with.
We're just adding new context to the trace event.

BR,
Thinh

  reply	other threads:[~2026-01-05 17:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 11:53 Prashanth K
2026-01-05 11:53 ` [PATCH v2 1/3] usb: dwc3: Remove of dep->regs Prashanth K
2026-01-09  0:53   ` Thinh Nguyen
2026-01-05 11:53 ` [PATCH v2 2/3] usb: dwc3: Add dwc pointer to dwc3_readl/writel Prashanth K
2026-01-09  0:54   ` Thinh Nguyen
2026-01-05 11:53 ` [PATCH v2 3/3] usb: dwc3: Log dwc3 instance name in traces Prashanth K
2026-01-05 12:43   ` Greg Kroah-Hartman
2026-01-06  9:58   ` Greg Kroah-Hartman
2026-01-07  6:03     ` Prashanth K
2026-01-07  6:40       ` Greg Kroah-Hartman
2026-01-07  9:05         ` Prashanth K
2026-01-09  1:18   ` Thinh Nguyen
2026-01-09 10:04     ` Prashanth K
2026-01-13  1:38       ` Thinh Nguyen
2026-01-05 12:44 ` [PATCH v2 0/3] Add the DWC3 " Greg Kroah-Hartman
2026-01-05 16:11   ` Thinh Nguyen
2026-01-05 16:27     ` Greg Kroah-Hartman
2026-01-05 17:01       ` Thinh Nguyen [this message]
2026-01-05 19:59         ` Greg Kroah-Hartman
2026-01-05 21:16           ` Thinh Nguyen
2026-01-06  5:50             ` Greg Kroah-Hartman

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=20260105170044.vuuoyiszyptokmfp@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=prashanth.k@oss.qualcomm.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

all inboxes | Powered by JetHome®