mbox series

[00/10] thunderbolt: Add DMA traffic test driver

Message ID 20201104140030.6853-1-mika.westerberg@linux.intel.com
Headers show
Series thunderbolt: Add DMA traffic test driver | expand

Message

Mika Westerberg Nov. 4, 2020, 2 p.m. UTC
Hi all,

This series adds a new Thunderbolt service driver that can be used on
manufacturing floor to test that each Thunderbolt/USB4 port is functional.
It can be done either using a special loopback dongle that has RX and TX
lanes crossed, or by connecting a cable back to the host (for those who
don't have these dongles).

This takes advantage of the existing XDomain protocol and creates XDomain
devices for the loops back to the host where the DMA traffic test driver
can bind to.

The DMA traffic test driver creates a tunnel through the fabric and then
sends and receives data frames over the tunnel checking for different
errors.

Isaac Hazan (4):
  thunderbolt: Add link_speed and link_width to XDomain
  thunderbolt: Add functions for enabling and disabling lane bonding on XDomain
  thunderbolt: Add DMA traffic test driver
  MAINTAINERS: Add Isaac as maintainer of Thunderbolt DMA traffic test driver

Mika Westerberg (6):
  thunderbolt: Do not clear USB4 router protocol adapter IFC and ISE bits
  thunderbolt: Find XDomain by route instead of UUID
  thunderbolt: Create XDomain devices for loops back to the host
  thunderbolt: Create debugfs directory automatically for services
  thunderbolt: Make it possible to allocate one directional DMA tunnel
  thunderbolt: Add support for end-to-end flow control

 .../ABI/testing/sysfs-bus-thunderbolt         |  28 +
 MAINTAINERS                                   |   6 +
 drivers/net/thunderbolt.c                     |   2 +-
 drivers/thunderbolt/Kconfig                   |  13 +
 drivers/thunderbolt/Makefile                  |   3 +
 drivers/thunderbolt/ctl.c                     |   4 +-
 drivers/thunderbolt/debugfs.c                 |  24 +
 drivers/thunderbolt/dma_test.c                | 736 ++++++++++++++++++
 drivers/thunderbolt/nhi.c                     |  36 +-
 drivers/thunderbolt/path.c                    |  13 +-
 drivers/thunderbolt/switch.c                  |  33 +-
 drivers/thunderbolt/tb.h                      |   8 +
 drivers/thunderbolt/tunnel.c                  |  50 +-
 drivers/thunderbolt/xdomain.c                 | 144 +++-
 include/linux/thunderbolt.h                   |  18 +-
 15 files changed, 1077 insertions(+), 41 deletions(-)
 create mode 100644 drivers/thunderbolt/dma_test.c

Comments

Yehezkel Bernat Nov. 4, 2020, 6:38 p.m. UTC | #1
On Wed, Nov 4, 2020 at 4:00 PM Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
>
> +#define DMA_TEST_DATA_PATTERN          0x0123456789abcdefLL

Have you considered making it configurable? For mem test, for example, there is
a reason to try different patterns. Not sure if it's relevant here.
Mika Westerberg Nov. 5, 2020, 7:16 a.m. UTC | #2
On Wed, Nov 04, 2020 at 08:38:10PM +0200, Yehezkel Bernat wrote:
> On Wed, Nov 4, 2020 at 4:00 PM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> >
> > +#define DMA_TEST_DATA_PATTERN          0x0123456789abcdefLL
> 
> Have you considered making it configurable? For mem test, for example, there is
> a reason to try different patterns. Not sure if it's relevant here.

Yes, we did but we went for the simple hard-coded for now. This can
always be enhanched if needed :)
Mika Westerberg Nov. 5, 2020, 7:17 a.m. UTC | #3
On Wed, Nov 04, 2020 at 08:39:01PM +0200, Yehezkel Bernat wrote:
> On Wed, Nov 4, 2020 at 4:00 PM Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
> >
> > Hi all,
> >
> > This series adds a new Thunderbolt service driver that can be used on
> > manufacturing floor to test that each Thunderbolt/USB4 port is functional.
> > It can be done either using a special loopback dongle that has RX and TX
> > lanes crossed, or by connecting a cable back to the host (for those who
> > don't have these dongles).
> >
> > This takes advantage of the existing XDomain protocol and creates XDomain
> > devices for the loops back to the host where the DMA traffic test driver
> > can bind to.
> >
> > The DMA traffic test driver creates a tunnel through the fabric and then
> > sends and receives data frames over the tunnel checking for different
> > errors.
> 
> For the whole series,
> 
> Acked-by: Yehezkel Bernat <YehezkelShB@gmail.com>

Thanks!