tunnel_pci.h 764 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Thunderbolt Cactus Ridge driver - PCIe tunnel
  4. *
  5. * Copyright (c) 2014 Andreas Noever <andreas.noever@gmail.com>
  6. */
  7. #ifndef TB_PCI_H_
  8. #define TB_PCI_H_
  9. #include "tb.h"
  10. struct tb_pci_tunnel {
  11. struct tb *tb;
  12. struct tb_port *up_port;
  13. struct tb_port *down_port;
  14. struct tb_path *path_to_up;
  15. struct tb_path *path_to_down;
  16. struct list_head list;
  17. };
  18. struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up,
  19. struct tb_port *down);
  20. void tb_pci_free(struct tb_pci_tunnel *tunnel);
  21. int tb_pci_activate(struct tb_pci_tunnel *tunnel);
  22. int tb_pci_restart(struct tb_pci_tunnel *tunnel);
  23. void tb_pci_deactivate(struct tb_pci_tunnel *tunnel);
  24. bool tb_pci_is_invalid(struct tb_pci_tunnel *tunnel);
  25. #endif