mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 23:02:27 +07:00
3364f0c127
A pci downstream and pci upstream port can be connected through a tunnel. To establish the tunnel we have to setup two unidirectional paths between the two ports. Right now we only support paths with two hops (i.e. no chaining) and at most one pci device per thunderbolt device. Signed-off-by: Andreas Noever <andreas.noever@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31 lines
725 B
C
31 lines
725 B
C
/*
|
|
* Thunderbolt Cactus Ridge driver - PCIe tunnel
|
|
*
|
|
* Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
|
|
*/
|
|
|
|
#ifndef TB_PCI_H_
|
|
#define TB_PCI_H_
|
|
|
|
#include "tb.h"
|
|
|
|
struct tb_pci_tunnel {
|
|
struct tb *tb;
|
|
struct tb_port *up_port;
|
|
struct tb_port *down_port;
|
|
struct tb_path *path_to_up;
|
|
struct tb_path *path_to_down;
|
|
struct list_head list;
|
|
};
|
|
|
|
struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up,
|
|
struct tb_port *down);
|
|
void tb_pci_free(struct tb_pci_tunnel *tunnel);
|
|
int tb_pci_activate(struct tb_pci_tunnel *tunnel);
|
|
int tb_pci_restart(struct tb_pci_tunnel *tunnel);
|
|
void tb_pci_deactivate(struct tb_pci_tunnel *tunnel);
|
|
bool tb_pci_is_invalid(struct tb_pci_tunnel *tunnel);
|
|
|
|
#endif
|
|
|