<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/thunderbolt, branch v6.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-03-02T18:47:01Z</updated>
<entry>
<title>Merge tag 'thunderbolt-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus</title>
<updated>2024-03-02T18:47:01Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-03-02T18:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c4a311c2c15ef0fa07c225ee02197a316e10e00'/>
<id>urn:sha1:3c4a311c2c15ef0fa07c225ee02197a316e10e00</id>
<content type='text'>
Mika writes:

thunderbolt: Fix for v6.8-rc7

This includes one USB4/Thunderbolt fix for v6.8-rc7:

  - Fix NULL pointer dereference in tb_port_update_credits() on
    Apple Thunderbolt 1 hardware.

This has been in linux-next with no reported issues.

* tag 'thunderbolt-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Fix NULL pointer dereference in tb_port_update_credits()
</content>
</entry>
<entry>
<title>thunderbolt: Fix NULL pointer dereference in tb_port_update_credits()</title>
<updated>2024-02-16T08:36:51Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2024-02-12T11:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3d17e23d1a0d1f959b4fa55b35f1802d9c584fa'/>
<id>urn:sha1:d3d17e23d1a0d1f959b4fa55b35f1802d9c584fa</id>
<content type='text'>
Olliver reported that his system crashes when plugging in Thunderbolt 1
device:

 BUG: kernel NULL pointer dereference, address: 0000000000000020
 #PF: supervisor read access in kernel mode
 #PF: error_code(0x0000) - not-present page
 PGD 0 P4D 0
 Oops: 0000 [#1] PREEMPT SMP NOPTI
 RIP: 0010:tb_port_do_update_credits+0x1b/0x130 [thunderbolt]
 Call Trace:
  &lt;TASK&gt;
  ? __die+0x23/0x70
  ? page_fault_oops+0x171/0x4e0
  ? exc_page_fault+0x7f/0x180
  ? asm_exc_page_fault+0x26/0x30
  ? tb_port_do_update_credits+0x1b/0x130
  ? tb_switch_update_link_attributes+0x83/0xd0
  tb_switch_add+0x7a2/0xfe0
  tb_scan_port+0x236/0x6f0
  tb_handle_hotplug+0x6db/0x900
  process_one_work+0x171/0x340
  worker_thread+0x27b/0x3a0
  ? __pfx_worker_thread+0x10/0x10
  kthread+0xe5/0x120
  ? __pfx_kthread+0x10/0x10
  ret_from_fork+0x31/0x50
  ? __pfx_kthread+0x10/0x10
  ret_from_fork_asm+0x1b/0x30
  &lt;/TASK&gt;

This is due the fact that some Thunderbolt 1 devices only have one lane
adapter. Fix this by checking for the lane 1 before we read its credits.

Reported-by: Olliver Schinagl &lt;oliver@schinagl.nl&gt;
Closes: https://lore.kernel.org/linux-usb/c24c7882-6254-4e68-8f22-f3e8f65dc84f@schinagl.nl/
Fixes: 81af2952e606 ("thunderbolt: Add support for asymmetric link")
Cc: stable@vger.kernel.org
Cc: Gil Fine &lt;gil.fine@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Fix setting the CNS bit in ROUTER_CS_5</title>
<updated>2024-01-29T07:48:40Z</updated>
<author>
<name>Mohammad Rahimi</name>
<email>rahimi.mhmmd@gmail.com</email>
</author>
<published>2024-01-27T03:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec4d82f855ce332de26fe080892483de98cc1a19'/>
<id>urn:sha1:ec4d82f855ce332de26fe080892483de98cc1a19</id>
<content type='text'>
The bit 23, CM TBT3 Not Supported (CNS), in ROUTER_CS_5 indicates
whether a USB4 Connection Manager is TBT3-Compatible and should be:
    0b for TBT3-Compatible
    1b for Not TBT3-Compatible

Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4")
Cc: stable@vger.kernel.org
Signed-off-by: Mohammad Rahimi &lt;rahimi.mhmmd@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2024-01-18T19:43:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-18T19:43:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c94ccc7cd691472461448f98e2372c75849406c'/>
<id>urn:sha1:8c94ccc7cd691472461448f98e2372c75849406c</id>
<content type='text'>
Pull USB / Thunderbolt updates from Greg KH:
 "Here is the big set of USB and Thunderbolt changes for 6.8-rc1.
  Included in here are the following:

   - Thunderbolt subsystem and driver updates for USB 4 hardware and
     issues reported by real devices

   - xhci driver updates

   - dwc3 driver updates

   - uvc_video gadget driver updates

   - typec driver updates

   - gadget string functions cleaned up

   - other small changes

  All of these have been in the linux-next tree for a while with no
  reported issues"

* tag 'usb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (169 commits)
  usb: typec: tipd: fix use of device-specific init function
  usb: typec: tipd: Separate reset for TPS6598x
  usb: mon: Fix atomicity violation in mon_bin_vma_fault
  usb: gadget: uvc: Remove nested locking
  usb: gadget: uvc: Fix use are free during STREAMOFF
  usb: typec: class: fix typec_altmode_put_partner to put plugs
  dt-bindings: usb: dwc3: Limit num-hc-interrupters definition
  dt-bindings: usb: xhci: Add num-hc-interrupters definition
  xhci: add support to allocate several interrupters
  USB: core: Use device_driver directly in struct usb_driver and usb_device_driver
  arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry
  usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer
  dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue
  arm64: dts: qcom: msm8996: Remove PNoC clock from MSS
  arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI
  arm64: dts: qcom: msm8998: Remove AGGRE2 clock from SLPI
  arm64: dts: qcom: msm8939: Drop RPM bus clocks
  arm64: dts: qcom: sdm630: Drop RPM bus clocks
  arm64: dts: qcom: qcs404: Drop RPM bus clocks
  arm64: dts: qcom: msm8996: Drop RPM bus clocks
  ...
</content>
</entry>
<entry>
<title>Merge tag 'thunderbolt-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next</title>
<updated>2024-01-02T13:25:05Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-01-02T13:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21bea26c848e056e58e01448db41fabd47168c73'/>
<id>urn:sha1:21bea26c848e056e58e01448db41fabd47168c73</id>
<content type='text'>
Mika writes:

thunderbolt: Changes for v6.8 merge window

This includes following USB4/Thunderbolt changes for the v6.8 merge
window:

  - Intel Lunar Lake support
  - PCIe tunneling improvements
  - DisplayPort tunneling improvements
  - Asymmetric switching improvements
  - Couple of minor fixes and cleanups.

All these have been in linux-next with no reported issues.

* tag 'thunderbolt-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
  thunderbolt: Reduce retry timeout to speed up boot for some devices
  thunderbolt: Keep link as asymmetric if preferred by hardware
  thunderbolt: Add support for Intel Lunar Lake
  thunderbolt: Disable PCIe extended encapsulation upon teardown properly
  thunderbolt: Make PCIe tunnel setup and teardown follow CM guide
  thunderbolt: Improve logging when DisplayPort resource is added due to hotplug
  thunderbolt: Use tb_dp_read_cap() to read DP_COMMON_CAP as well
  thunderbolt: Disable CL states only when actually needed
  thunderbolt: Transition link to asymmetric only when both sides support it
  thunderbolt: Log XDomain link speed and width
  thunderbolt: Move width_name() helper to tb.h
  thunderbolt: Handle lane bonding of Gen 4 XDomain links properly
  thunderbolt: Unwind TMU configuration if tb_switch_set_tmu_mode_params() fails
  thunderbolt: Remove duplicated re-assignment of pointer 'out'
</content>
</entry>
<entry>
<title>thunderbolt: Reduce retry timeout to speed up boot for some devices</title>
<updated>2023-12-22T11:00:26Z</updated>
<author>
<name>Werner Sembach</name>
<email>wse@tuxedocomputers.com</email>
</author>
<published>2023-12-20T15:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04b99eac389adc6485f7913d83ec9ed68bbc8326'/>
<id>urn:sha1:04b99eac389adc6485f7913d83ec9ed68bbc8326</id>
<content type='text'>
This is a followup to "thunderbolt: Workaround an IOMMU fault on certain
systems with Intel Maple Ridge".

It seems like the timeout can be reduced to 250ms. This reduces the overall
delay caused by the retires to ~1s. This is about the time other things
being initialized in parallel need anyway*, so like this the effective boot
time is no longer compromised.

*I only had a single device available for my measurements: A Clevo X170KM-G
desktop replacement notebook.

Signed-off-by: Werner Sembach &lt;wse@tuxedocomputers.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Keep link as asymmetric if preferred by hardware</title>
<updated>2023-12-22T10:58:39Z</updated>
<author>
<name>Gil Fine</name>
<email>gil.fine@linux.intel.com</email>
</author>
<published>2023-12-04T13:14:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba2a2a86de04e67bb1d7f8251894eb11eed062e9'/>
<id>urn:sha1:ba2a2a86de04e67bb1d7f8251894eb11eed062e9</id>
<content type='text'>
In case of the link is brought up as asymmetric (due to hardware preference), we
honor that and don't transition it to symmetric, unless a router with symmetric
link got plugged below, in the topology (and a bandwidth allows transition to
symmetric).

Signed-off-by: Gil Fine &lt;gil.fine@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: make tb_bus_type const</title>
<updated>2023-12-20T07:21:57Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-12-19T15:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8be0c877fb3b671dac0cf56d1f1f9e65f9a9fb81'/>
<id>urn:sha1:8be0c877fb3b671dac0cf56d1f1f9e65f9a9fb81</id>
<content type='text'>
Now that the driver core can properly handle constant struct bus_type,
move the tb_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Andreas Noever &lt;andreas.noever@gmail.com&gt;
Cc: Michael Jamet &lt;michael.jamet@intel.com&gt;
Cc: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Cc:  &lt;linux-usb@vger.kernel.org&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/2023121904-utopia-broadcast-06d1@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Add support for Intel Lunar Lake</title>
<updated>2023-12-14T06:07:45Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2022-05-20T10:47:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2cd3da4e37453019e21a486d9de3144f46b4fdf7'/>
<id>urn:sha1:2cd3da4e37453019e21a486d9de3144f46b4fdf7</id>
<content type='text'>
Intel Lunar Lake has similar integrated Thunderbolt/USB4 controller as
Intel Meteor Lake with some small differences in the host router (it has
3 DP IN adapters for instance). Add the Intel Lunar Lake PCI IDs to the
driver list of supported devices.

Tested-by: Pengfei Xu &lt;pengfei.xu@intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>thunderbolt: Disable PCIe extended encapsulation upon teardown properly</title>
<updated>2023-12-14T06:07:45Z</updated>
<author>
<name>Gil Fine</name>
<email>gil.fine@linux.intel.com</email>
</author>
<published>2023-11-15T10:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b3a6239d286d6b74295ccf21905ba6533bcf3a9'/>
<id>urn:sha1:2b3a6239d286d6b74295ccf21905ba6533bcf3a9</id>
<content type='text'>
In case of PCIe tunnel teardown (including if caused by router unplug),
PCIe extended encapsulation bit should be cleared in downstream and
upstream routers accordingly.

Signed-off-by: Gil Fine &lt;gil.fine@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
</feed>
