public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Konrad Dybcio <konradybcio@kernel.org>
Cc: Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	usb4-upstream@oss.qualcomm.com,
	Raghavendra Thoorpu <rthoorpu@qti.qualcomm.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Subject: Re: [PATCH RFC/RFT 1/3] thunderbolt: Move pci_device out of tb_nhi
Date: Mon, 9 Mar 2026 12:49:48 +0100	[thread overview]
Message-ID: <20260309114948.GM2275908@black.igk.intel.com> (raw)
In-Reply-To: <20260309-topic-usb4_nonpcie_prepwork-v1-1-d901d85fc794@oss.qualcomm.com>

On Mon, Mar 09, 2026 at 11:32:59AM +0100, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> 
> Not all USB4/TB implementations are based on a PCIe-attached
> controller. In order to make way for these, start off with moving the
> pci_device reference out of the main tb_nhi structure.
> 
> Encapsulate the existing struct in a new tb_nhi_pci, that shall also
> house all properties that relate to the parent bus. Similarly, any
> other type of controller will be expected to contain tb_nhi as a
> member.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> ---
>  drivers/thunderbolt/acpi.c      |  14 +--
>  drivers/thunderbolt/ctl.c       |  14 +--
>  drivers/thunderbolt/domain.c    |   2 +-
>  drivers/thunderbolt/eeprom.c    |   2 +-
>  drivers/thunderbolt/icm.c       |  25 ++--
>  drivers/thunderbolt/nhi.c       | 247 ++++++++++++++++++++++++++++++----------
>  drivers/thunderbolt/nhi.h       |  11 ++
>  drivers/thunderbolt/nhi_ops.c   |  29 +++--
>  drivers/thunderbolt/nhi_pci.h   |  20 ++++

I think this patch should just make the nhi->pdev to be nhi->dev.

If there is a header needed it should be called pci.h and the corresponding
implementation pci.c (ditto for the non-PCI: platform.c).

Further more there is no need to keep the struct pci_dev anywhere we can
get that with to_pci_dev() and that allows both implementations share the
same struct nhi (no need a separate structs).

  reply	other threads:[~2026-03-09 11:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 10:32 [RFC/RFT PATCH 0/3] Prepwork for non-PCIe NHI/TBT hosts Konrad Dybcio
2026-03-09 10:32 ` [PATCH RFC/RFT 1/3] thunderbolt: Move pci_device out of tb_nhi Konrad Dybcio
2026-03-09 11:49   ` Mika Westerberg [this message]
2026-03-09 10:33 ` [PATCH RFC/RFT 2/3] thunderbolt: Separate out common NHI bits Konrad Dybcio
2026-03-09 11:51   ` Mika Westerberg
2026-03-09 10:33 ` [PATCH RFC/RFT 3/3] thunderbolt: Add some more descriptive probe error messages Konrad Dybcio
2026-03-09 11:53   ` Mika Westerberg
2026-03-10  5:40 ` [RFC/RFT PATCH 0/3] Prepwork for non-PCIe NHI/TBT hosts Mika Westerberg

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=20260309114948.GM2275908@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rthoorpu@qti.qualcomm.com \
    --cc=usb4-upstream@oss.qualcomm.com \
    --cc=westeri@kernel.org \
    /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