An error occurred fetching the project authors.
- 20 Oct, 2023 1 commit
-
-
Gil Fine authored
Rework the function to return the link generation, update the name to tb_port_get_link_generation(), and make available to the rest of the driver. This is needed in the subsequent patches. Signed-off-by:
Gil Fine <gil.fine@linux.intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 13 Oct, 2023 2 commits
-
-
Mika Westerberg authored
This function is not used outside of clx.c so make it static. No functional changes. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
It turns out there is no need to use the actual link rate when reclaiming bandwidth for USB 3.x. The reason is that we use consumed bandwidth which is coming from xHCI when releasing bandwidth (for example for DisplayPort tunneling) and this can be anything between 1000 Mb/s to maximum, so when reclaiming we can just bump it up back to maximum instead of actual link rate (which is always <= maximum). This allows us to get rid of couple of unnecessary lines of code. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 08 Aug, 2023 1 commit
-
-
Mika Westerberg authored
The software connection manager needs the device links in order to establish the tunnels before the native protocols so log a warning if they are not found. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 16 Jun, 2023 6 commits
-
-
Mika Westerberg authored
Make sure the DisplayPort bandwidth allocation mode function names are consistent with the existing ones, such as USB3. No functional changes. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
This is new TMU mode introduced with the USB4 v2. This mode is simpler than the existing ones and allows all CL states as well. Enable this for all links where both side routers are v2 and keep the existing functionality for the v1 and earlier links. Currently only support the MedRes rate. We can add the HiFi rate later too if it turns out to be useful. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
Move constants related to NVM into nvm.c to make the code cleaner. Use a separate constant for USB4_DATA_DWORDS in usb4.c. No functional changes. Signed-off-by:
Gil Fine <gil.fine@linux.intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
USB4 v2 spec introduces modified encapsulation of PCIe TLP and DLLP packets. This improves the PCIe tunneled traffic usage by reducing overhead. Enable this if both sides of the link support it. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
USB4 v2 bumps the per-lane speed up to 40 Gb/s. Also the lanes are always bonded which gives 80 Gb/s symmetric link (and 120/40 Gb/s asymmetric). This updates the speed and width of routers and XDomain connections to support the Gen 4 link. For now we keep the link as is even if it is already asymmetric. While there make tb_port_set_link_width() static. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
Add a new function usb4_switch_version() that can be used to figure out the spec version of the router and make tb_switch_is_usb4() to use it as well. Update the uevent accordingly. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 12 Jun, 2023 1 commit
-
-
Mika Westerberg authored
When USB4 port is in offline mode (this mean there is no device attached) we want to keep the sideband up to make it possible to communicate with the retimers. In the same way there is no need to enable sideband transactions when the USB4 port is not offline as they are already up. For this reason make the enabling/disabling depend on the USB4 port offline status. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 09 Jun, 2023 8 commits
-
-
Mika Westerberg authored
In case the boot firmware enabled any of them, read the currently configured CL states and update the router structure accordingly. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
This is more natural and follows the hardware register layout better. This makes it easier to see which CL states we enable (even though they should be enabled together). Rename 'clx_mask' to 'clx' everywhere as this is now always bitmask. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
There really don't belong to switch.c so move them into their own file. As we do this rename the functions to match the conventions used elsewhere in the driver. No functional changes. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
Instead of at enable time we can do this already in tb_switch_tmu_configure(). Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
This is better to be part of the software connection manager flows in tb.c. Also name the new function tb_increase_tmu_accuracy() to match what it actually does. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
There is no point passing it as we already have a field for that. While there clean up the kernel-doc of things that do not really belong to the API documentation (these can be figured out from the spec itself). No functional changes. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
In the same way we did for the routers add a function that returns the parent routers downstream facing port for XDomain devices. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
Introduce tb_switch_downstream_port() helper function that returns the downstream port of a parent switch that is connected to the upstream port of specified switch. From now on, we use it all across the driver where applicable. While there fix a whitespace in comment and rename 'downstream' to 'down' to be consistent with the rest of the driver. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 13 Mar, 2023 2 commits
-
-
Gil Fine authored
Current Intel USB4 host routers have hardware limitation that the USB3 bandwidth cannot go higher than 16376 Mb/s. Work this around by adding a new quirk that limits the bandwidth for the affected host routers. Cc: stable@vger.kernel.org Signed-off-by:
Gil Fine <gil.fine@linux.intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
According to USB4 retimer specification, the process of firmware update sequence requires issuing a SET_INBOUND_SBTX port operation that later shall be followed by UNSET_INBOUND_SBTX port operation. This last step is not currently issued by the driver but it is necessary to make sure the retimers are put back to passthrough mode even during enumeration. If this step is missing the link may not come up properly after soft-reboot for example. For this reason issue UNSET_INBOUND_SBTX after SET_INBOUND_SBTX for enumeration and also when the NVM upgrade is run. Reported-by:
Christian Schaubschläger <christian.schaubschlaeger@gmx.at> Link: https://lore.kernel.org/linux-usb/b556f5ed-5ee8-9990-9910-afd60db93310@gmx.at/ Cc: stable@vger.kernel.org Signed-off-by:
Gil Fine <gil.fine@linux.intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 06 Mar, 2023 1 commit
-
-
Sanjay R Mehta authored
Add QUIRK_NO_CLX to disable the CLx state for hardware which doesn't supports it. AMD Yellow Carp and Pink Sardine don't support CLx state, hence disabling it using QUIRK_NO_CLX. Cc: stable@vger.kernel.org Signed-off-by:
Sanjay R Mehta <sanju.mehta@amd.com> Signed-off-by:
Basavaraj Natikar <Basavaraj.Natikar@amd.com> [mw: added debug log when the quirk is run] Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 27 Jan, 2023 1 commit
-
-
Greg Kroah-Hartman authored
The uevent() callback in struct device_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Andreas Noever <andreas.noever@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bard Liao <yung-chuan.liao@linux.intel.com> Cc: Chaitanya Kulkarni <kch@nvidia.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Ira Weiny <ira.weiny@intel.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jens Axboe <axboe@kernel.dk> Cc: Jilin Yuan <yuanjilin@cdjrlc.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: Mark Gross <markgross@kernel.org> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org> Cc: Maximilian Luz <luzmaximilian@gmail.com> Cc: Michael Jamet <michael.jamet@intel.com> Cc: Ming Lei <ming.lei@redhat.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Sanyog Kale <sanyog.r.kale@intel.com> Cc: Sean Young <sean@mess.org> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Won Chung <wonchung@google.com> Cc: Yehezkel Bernat <YehezkelShB@gmail.com> Acked-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Acked-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by:
Wolfram Sang <wsa@kernel.org> Acked-by:
Vinod Koul <vkoul@kernel.org> Acked-by:
Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.orgSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 Jan, 2023 2 commits
-
-
Mika Westerberg authored
The USB4 spec defines an optional feature that allows the connection manager to negotiate with the graphics through DPCD registers changes in the bandwidth allocation dynamically. This is referred as "bandwidth allocation mode" in the spec. The connection manager uses DP IN adapters registers to communicate with the graphics, and also gets notifications from these adapters when the graphics wants to change the bandwidth allocation. Both the connection manager and the graphics driver needs to support this. We check if the DP IN adapter supports this and if it does enable it before establishing a DP tunnel. Then we react on DP_BW notifications coming from the DP IN adapter and update the bandwidth allocation accordingly (within the maximum common capabilities the DP IN/OUT support). Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
USB4 spec defines an additional feature that DP IN adapters can implement (alongside with the graphics DPCD register set) to support more dynamic bandwidth management for DisplayPort tunnels. For the connection manager the communication happens through the DP IN adapter using a set of registers in the adapter config space allocated for this. Add functions that export this functionality for the rest of the driver. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 27 Dec, 2022 1 commit
-
-
Jiri Slaby (SUSE) authored
tb_port_is_clx_enabled() generates a valid warning with gcc-13: drivers/thunderbolt/switch.c:1286:6: error: conflicting types for 'tb_port_is_clx_enabled' due to enum/integer mismatch; have 'bool(struct tb_port *, unsigned int)' ... drivers/thunderbolt/tb.h:1050:6: note: previous declaration of 'tb_port_is_clx_enabled' with type 'bool(struct tb_port *, enum tb_clx)' ... I.e. the type of the 2nd parameter of tb_port_is_clx_enabled() in the declaration is unsigned int, while the definition spells enum tb_clx. Synchronize them to the former as the parameter is in fact a mask of the enum values. Signed-off-by:
Jiri Slaby (SUSE) <jirislaby@kernel.org> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 26 Sep, 2022 1 commit
-
-
Mario Limonciello authored
Software that has run before the USB4 CM in Linux runs may have disabled hotplug events for a given lane adapter. Other CMs such as that one distributed with Windows 11 will enable hotplug events. Do the same thing in the Linux CM which fixes hotplug events on "AMD Pink Sardine". Cc: stable@vger.kernel.org Signed-off-by:
Mario Limonciello <mario.limonciello@amd.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 07 Sep, 2022 4 commits
-
-
Szuying Chen authored
As there will be more USB4 devices that support NVM firmware upgrade from various vendors, it makes sense to split out the Intel specific NVM image handling from the generic code. This moves the Intel specific NVM handling into a new structure that will be matched by the device type and the vendor ID. Do this for both routers and retimers. This makes it easier to extend the NVM support to cover new vendors and NVM image formats in the future. Signed-off-by:
Szuying Chen <Chloe_Chen@asmedia.com.tw> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
As we are moving the NVM vendor specifics into nvm.c we need to deal witht he retimer NVM formats too. For this reason provide retimer specific function that can be used to read the contents of the NVM and rename the internal ones accordingly analogous to what we do with routers. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Szuying Chen authored
In order to support non-Intel NVM formats the vendor specific NVM validation code that will live in nvm.c needs to be able to read various parts of the NVM so make the function available outside of switch.c and rename it accordingly. Signed-off-by:
Szuying Chen <Chloe_Chen@asmedia.com.tw> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Szuying Chen authored
In order to support non-Intel NVM image formats extend the NVM major and minor version to 32-bits to better accommondate different versioning schemes. No functional impact. Signed-off-by:
Szuying Chen <Chloe_Chen@asmedia.com.tw> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 05 Sep, 2022 4 commits
-
-
Mika Westerberg authored
USB4 spec defines standard set of registers to be used for receiver lane margining. This is useful for I/O interface quality and electrical robustness validation during manufacturing. Expose receiver lane margining through new debugfs directory "margining" that is added under each connected USB4 port. Users can then run the margining by writing to the exposed attributes under that directory. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
We will need this when enabling lane margining support. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
Instead of testing just a single CL state we can pass a bitmask of states to check. This makes it simpler for callers of the function. We also add a check for CL2 even though not fully supported by the driver yet. Suggested-by:
Lukas Wunner <lukas@wunner.de> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Mika Westerberg authored
We are going to need this for lane margining support so make it available outside of xdomain.c. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 31 Aug, 2022 1 commit
-
-
Mika Westerberg authored
Following what we do for routers already, extend this to XDomain connections as well. This will show in sysfs whether the link is in USB4 or Thunderbolt mode. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 11 Jul, 2022 1 commit
-
-
David Gow authored
The new implementation of kunit_test_suite() for modules no longer conflicts with module_init, so can now be used by the thunderbolt tests. Also update the Kconfig entry to enable the test when KUNIT_ALL_TESTS is enabled. This means that kunit_tool can now successfully run and parse the test results with, for example: ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kconfig_add CONFIG_PCI=y --kconfig_add CONFIG_USB4=y \ 'thunderbolt' Acked-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Daniel Latypov <dlatypov@google.com> Acked-by:
Brendan Higgins <brendanhiggins@google.com> Signed-off-by:
David Gow <davidgow@google.com> Signed-off-by:
Shuah Khan <skhan@linuxfoundation.org>
-
- 06 Jun, 2022 2 commits
-
-
Gil Fine authored
Here we configure TMU mode to HiFi uni-directional once DP tunnel is created. This is due to accuracy requirement for DP tunneling as appears in CM guide 1.0, section 7.3.2. Due to Intel hardware limitation, once we changed the TMU mode to HiFi uni-directional (when DP tunnel exists), we don't change TMU mode back to normal uni-directional, even if DP tunnel is torn down later. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
Gil Fine authored
In this patch we add support for a second low power state of the link: CL1. Low power states (called collectively CLx) are used to reduce transmitter and receiver power when a high-speed lane is idle. We enable it, if both sides of the link support it, and only for the first hop router (i.e. the first device that connected to the host router). This is needed for better thermal management. Signed-off-by:
Gil Fine <gil.fine@intel.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-
- 05 May, 2022 1 commit
-
-
Mika Westerberg authored
When bonding lanes over XDomain the host that has "higher" UUID triggers link re-train for bonding, and the host that has "lower" UUID just waits for this to happen. To support this split setting the link width and triggering the actual bonding a separate functions that can be called as needed. While there remove duplicated empty line in the kernel-doc comment of tb_port_lane_bonding_disable(). Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com>
-