Lines Matching refs:port

66 		      __tunnel->src_port->port,                         \
68 __tunnel->dst_port->port, \
82 static inline unsigned int tb_usable_credits(const struct tb_port *port)
84 return port->total_credits - port->ctl_credits;
89 * @port: Lane adapter to check
93 static unsigned int tb_available_credits(const struct tb_port *port,
96 const struct tb_switch *sw = port->sw;
111 credits = tb_usable_credits(port);
204 struct tb_port *port = hop->in_port;
205 struct tb_switch *sw = port->sw;
208 if (tb_port_use_credit_allocation(port)) {
211 available = tb_available_credits(port, NULL);
219 if (tb_port_is_null(port))
220 credits = port->bonded ? 32 : 16;
286 /* Just disable the downstream port */
334 * @up: PCIe upstream adapter port
335 * @down: PCIe downstream adapter port
652 * the IN port remote caps.
1166 struct tb_port *port = hop->in_port;
1167 struct tb_switch *sw = port->sw;
1169 if (tb_port_use_credit_allocation(port))
1192 struct tb_port *port = hop->in_port;
1193 struct tb_switch *sw = port->sw;
1195 if (tb_port_use_credit_allocation(port)) {
1199 tb_available_credits(port, &max_dp_streams);
1206 nfc_credits = port->config.nfc_credits &
1213 hop->nfc_credits = min(port->total_credits - 2, 12U);
1298 struct tb_port *port;
1320 /* Just disable the DP IN port */
1336 &port, "AUX RX", alloc_hopid);
1354 if (port != tunnel->src_port) {
1375 * @in: DP in adapter port
1376 * @out: DP out adapter port
1445 static unsigned int tb_dma_available_credits(const struct tb_port *port)
1447 const struct tb_switch *sw = port->sw;
1450 credits = tb_available_credits(port, NULL);
1453 credits -= port->dma_credits;
1460 struct tb_port *port = hop->in_port;
1462 if (tb_port_use_credit_allocation(port)) {
1463 unsigned int available = tb_dma_available_credits(port);
1475 tb_port_dbg(port, "reserving %u credits for DMA path\n",
1478 port->dma_credits += credits;
1480 if (tb_port_is_null(port))
1481 credits = port->bonded ? 14 : 6;
1483 credits = min(port->total_credits, credits);
1551 struct tb_port *port = hop->in_port;
1553 if (tb_port_use_credit_allocation(port)) {
1554 port->dma_credits -= hop->initial_credits;
1556 tb_port_dbg(port, "released %u DMA path credits\n",
1583 * @nhi: Host controller port
1584 * @dst: Destination null port which the other domain is connected to
1850 struct tb_port *port = hop->in_port;
1851 struct tb_switch *sw = port->sw;
1854 if (tb_port_use_credit_allocation(port)) {
1857 if (tb_port_is_null(port))
1858 credits = port->bonded ? 32 : 16;
1916 /* Just disable the downstream port */
1985 * @up: USB3 upstream adapter port
1986 * @down: USB3 downstream adapter port
2200 * tb_tunnel_port_on_path() - Does the tunnel go through port
2202 * @port: Port to check
2204 * Returns true if @tunnel goes through @port (direction does not matter),
2208 const struct tb_port *port)
2216 if (tb_path_port_on_path(tunnel->paths[i], port))