tunnel_pci.h 725 B

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