mbox series

[0/8] thunderbolt: Add credit allocation for USB4 devices

Message ID 20210518141002.63616-1-mika.westerberg@linux.intel.com
Headers show
Series thunderbolt: Add credit allocation for USB4 devices | expand

Message

Mika Westerberg May 18, 2021, 2:09 p.m. UTC
Hi all,

USB4 spec requires that routers expose their credit (buffer) allocation
preferences through a special router operation. Furthermore the Connection
Manager guide (as part of the USB4 spec bundle) provides some guidance how
the credits should be allocated between different tunneled protocols. This
series adds the credit allocation support for USB4 routers. For Intel
Thunderbolt 1-3 devices we keep using the existing hard-coded scheme.

We also add some KUnit tests for the credit allocation.

Mika Westerberg (8):
  thunderbolt: Make tb_port_type() take const parameter
  thunderbolt: Move nfc_credits field to struct tb_path_hop
  thunderbolt: Wait for the lanes to actually bond
  thunderbolt: Read router preferred credit allocation information
  thunderbolt: Update port credits after bonding is enabled/disabled
  thunderbolt: Allocate credits according to router preferences
  thunderbolt: Add quirk for Intel Goshen Ridge DP credits
  thunderbolt: Add KUnit tests for credit allocation

 drivers/thunderbolt/path.c    |   4 +-
 drivers/thunderbolt/quirks.c  |  29 +-
 drivers/thunderbolt/switch.c  | 151 +++++++++-
 drivers/thunderbolt/tb.h      |  44 ++-
 drivers/thunderbolt/tb_regs.h |   1 +
 drivers/thunderbolt/test.c    | 545 ++++++++++++++++++++++++++++++++++
 drivers/thunderbolt/tunnel.c  | 401 ++++++++++++++++++++-----
 drivers/thunderbolt/tunnel.h  |   2 +
 drivers/thunderbolt/usb4.c    | 155 ++++++++++
 drivers/thunderbolt/xdomain.c |  10 +
 10 files changed, 1253 insertions(+), 89 deletions(-)

Comments

Mika Westerberg June 1, 2021, 7:50 a.m. UTC | #1
On Tue, May 18, 2021 at 05:09:54PM +0300, Mika Westerberg wrote:
> Hi all,

> 

> USB4 spec requires that routers expose their credit (buffer) allocation

> preferences through a special router operation. Furthermore the Connection

> Manager guide (as part of the USB4 spec bundle) provides some guidance how

> the credits should be allocated between different tunneled protocols. This

> series adds the credit allocation support for USB4 routers. For Intel

> Thunderbolt 1-3 devices we keep using the existing hard-coded scheme.

> 

> We also add some KUnit tests for the credit allocation.

> 

> Mika Westerberg (8):

>   thunderbolt: Make tb_port_type() take const parameter

>   thunderbolt: Move nfc_credits field to struct tb_path_hop

>   thunderbolt: Wait for the lanes to actually bond

>   thunderbolt: Read router preferred credit allocation information

>   thunderbolt: Update port credits after bonding is enabled/disabled

>   thunderbolt: Allocate credits according to router preferences

>   thunderbolt: Add quirk for Intel Goshen Ridge DP credits

>   thunderbolt: Add KUnit tests for credit allocation


All applied to thunderbolt.git/next.