Lines Matching full:peer

198 	struct usb_port *peer = port_dev->peer;  in usb_port_runtime_resume()  local
210 * Power on our usb3 peer before this usb2 port to prevent a usb3 in usb_port_runtime_resume()
213 if (!port_dev->is_superspeed && peer) in usb_port_runtime_resume()
214 pm_runtime_get_sync(&peer->dev); in usb_port_runtime_resume()
256 struct usb_port *peer = port_dev->peer; in usb_port_runtime_suspend() local
283 * Our peer usb3 port may now be able to suspend, so in usb_port_runtime_suspend()
287 if (!port_dev->is_superspeed && peer) in usb_port_runtime_suspend()
288 pm_runtime_put(&peer->dev); in usb_port_runtime_suspend()
326 if (left->peer == right && right->peer == left) in link_peers()
329 if (left->peer || right->peer) { in link_peers()
330 struct usb_port *lpeer = left->peer; in link_peers()
331 struct usb_port *rpeer = right->peer; in link_peers()
339 pr_debug("usb: failed to peer %s and %s by %s (%s:%s) (%s:%s)\n", in link_peers()
348 rc = sysfs_create_link(&left->dev.kobj, &right->dev.kobj, "peer"); in link_peers()
351 rc = sysfs_create_link(&right->dev.kobj, &left->dev.kobj, "peer"); in link_peers()
353 sysfs_remove_link(&left->dev.kobj, "peer"); in link_peers()
359 * setting ->peer with usb_port_runtime_suspend(). Otherwise we in link_peers()
373 left->peer = right; in link_peers()
374 right->peer = left; in link_peers()
398 dev_dbg(&left->dev, "failed to peer to %s (%d)\n", in link_peers_report()
409 WARN(right->peer != left || left->peer != right, in unlink_peers()
416 * when ->peer is !NULL. in unlink_peers()
428 sysfs_remove_link(&left->dev.kobj, "peer"); in unlink_peers()
429 right->peer = NULL; in unlink_peers()
430 sysfs_remove_link(&right->dev.kobj, "peer"); in unlink_peers()
431 left->peer = NULL; in unlink_peers()
442 * peer domain of the given port_dev, and if it is check to see if it
449 struct usb_port *port_dev = p, *peer; in match_location() local
458 /* peer_hcd is provisional until we verify it against the known peer */ in match_location()
463 peer = peer_hub->ports[port1 - 1]; in match_location()
464 if (peer && peer->location == port_dev->location) { in match_location()
465 link_peers_report(port_dev, peer); in match_location()
474 * Find the peer port either via explicit platform firmware "location"
475 * data, the peer hcd for root hubs, or the upstream peer relationship
480 struct usb_port *port_dev = hub->ports[port1 - 1], *peer; in find_and_link_peer() local
486 * If location data is available then we can only peer this port in find_and_link_peer()
487 * by a location match, not the default peer (lest we create a in find_and_link_peer()
492 /* we link the peer in match_location() if found */ in find_and_link_peer()
512 if (!upstream || !upstream->peer) in find_and_link_peer()
515 peer_hdev = upstream->peer->child; in find_and_link_peer()
523 * we found a valid default peer, last check is to make sure it in find_and_link_peer()
526 peer = peer_hub->ports[port1 - 1]; in find_and_link_peer()
527 if (peer && peer->location == 0) in find_and_link_peer()
528 link_peers_report(port_dev, peer); in find_and_link_peer()
617 struct usb_port *peer; in usb_hub_remove_port_device() local
619 peer = port_dev->peer; in usb_hub_remove_port_device()
620 if (peer) in usb_hub_remove_port_device()
621 unlink_peers(port_dev, peer); in usb_hub_remove_port_device()