Lines Matching refs:port

29 static void sas_port_add_ex_phy(struct sas_port *port, struct ex_phy *ex_phy)
31 sas_port_add_phy(port, ex_phy->phy);
32 ex_phy->port = port;
62 to_sas_internal(dev->port->ha->shost->transportt);
63 struct sas_ha_struct *ha = dev->port->ha;
207 struct sas_ha_struct *ha = dev->port->ha;
339 set_bit(DISCE_REVALIDATE_DOMAIN, &dev->port->disc.pending);
355 if (!ex_phy->port)
358 rphy = ex_phy->port->rphy;
642 static int sas_dev_present_in_domain(struct asd_sas_port *port,
647 if (SAS_ADDR(port->sas_addr) == SAS_ADDR(sas_addr))
649 list_for_each_entry(dev, &port->dev_list, dev_list_node) {
748 struct sas_port *port;
753 port = parent_phy->port;
768 sas_port_add_phy(port, phy->phy);
782 rphy = sas_end_device_alloc(phy->port);
794 list_add_tail(&child->disco_list_node, &parent->port->disco_list);
826 child->port = parent->port;
830 if (!phy->port) {
831 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id);
832 if (unlikely(!phy->port))
834 if (unlikely(sas_port_add(phy->port) != 0)) {
835 sas_port_free(phy->port);
840 sas_device_set_phy(child, phy->port);
860 sas_port_delete(phy->port);
862 phy->port = NULL;
867 /* See if this phy is part of a wide port */
880 SAS_ADDR_SIZE) && ephy->port) {
881 sas_port_add_ex_phy(ephy->port, phy);
897 struct asd_sas_port *port;
911 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id);
913 BUG_ON(sas_port_add(phy->port) != 0);
918 rphy = sas_expander_alloc(phy->port,
922 rphy = sas_expander_alloc(phy->port,
929 port = parent->port;
936 child->port = port;
943 parent->port->disc.max_level = max(parent->port->disc.max_level,
949 spin_lock_irq(&parent->port->dev_list_lock);
950 list_add_tail(&child->dev_list_node, &parent->port->dev_list);
951 spin_unlock_irq(&parent->port->dev_list_lock);
956 spin_lock_irq(&parent->port->dev_list_lock);
958 spin_unlock_irq(&parent->port->dev_list_lock);
960 sas_port_delete(phy->port);
961 phy->port = NULL;
984 if (!dev->parent && sas_phy_match_port_addr(dev->port, ex_phy)) {
991 sas_configure_phy(dev, phy_id, dev->port->sas_addr, 1);
995 if (sas_dev_present_in_domain(dev->port, ex_phy->attached_sas_addr))
1027 pr_debug("Attaching ex phy%02d to wide port %016llx\n",
1038 if (SAS_ADDR(dev->port->disc.fanout_sas_addr)) {
1047 memcpy(dev->port->disc.fanout_sas_addr,
1223 struct sas_discovery *disc = &parent->port->disc;
1237 struct sas_discovery *disc = &parent->port->disc;
1487 * @sas_addr: SAS port identifier of device directly attached to child
1528 * @sas_addr: port identifier of device directly attached to the expander device
1582 static int sas_ex_level_discovery(struct asd_sas_port *port, const int level)
1587 list_for_each_entry(dev, &port->dev_list, dev_list_node) {
1595 res = sas_ex_discover_devices(port->port_dev, -1);
1603 static int sas_ex_bfs_disc(struct asd_sas_port *port)
1609 level = port->disc.max_level;
1610 res = sas_ex_level_discovery(port, level);
1612 } while (level < port->disc.max_level);
1626 ex->level = dev->port->disc.max_level; /* 0 */
1631 sas_ex_bfs_disc(dev->port);
1831 static void sas_unregister_ex_tree(struct asd_sas_port *port, struct domain_device *dev)
1839 sas_unregister_ex_tree(port, child);
1841 sas_unregister_dev(port, child);
1843 sas_unregister_dev(port, dev);
1858 sas_unregister_ex_tree(parent->port, child);
1860 sas_unregister_dev(parent->port, child);
1868 if (phy->port) {
1869 sas_port_delete_phy(phy->port, phy->phy);
1870 sas_device_set_phy(found, phy->port);
1871 if (phy->port->num_phys == 0) {
1872 list_add_tail(&phy->port->del_list,
1873 &parent->port->sas_port_del_list);
1874 if (ex_dev->parent_port == phy->port)
1877 phy->port = NULL;
1916 } while (level <= dev->port->disc.max_level);
1976 sprintf(msg, ", part of a wide port with phy%02d", sibling);
2052 * the last phy in the port, for other phys in this port, we just delete it
2053 * from the port.For inserting, we do discovery when it is the
2054 * first phy,for other phys in this port, we add it to the port to
2055 * forming the wide-port.
2063 bool last = true; /* is this the last phy of the port */
2087 * @port_dev: port domain device.