Lines Matching refs:ex
38 struct expander_device *ex = &dev->ex_dev; in sas_ex_add_parent_port() local
39 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_ex_add_parent_port()
41 if (!ex->parent_port) { in sas_ex_add_parent_port()
42 ex->parent_port = sas_port_alloc(&dev->rphy->dev, phy_id); in sas_ex_add_parent_port()
44 BUG_ON(!ex->parent_port); in sas_ex_add_parent_port()
45 BUG_ON(sas_port_add(ex->parent_port)); in sas_ex_add_parent_port()
46 sas_port_mark_backlink(ex->parent_port); in sas_ex_add_parent_port()
48 sas_port_add_ex_phy(ex->parent_port, ex_phy); in sas_ex_add_parent_port()
208 struct expander_device *ex = &dev->ex_dev; in sas_set_ex_phy() local
209 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_set_ex_phy()
396 struct expander_device *ex = &dev->ex_dev; in sas_ex_phy_discover() local
413 if (0 <= single && single < ex->num_phys) { in sas_ex_phy_discover()
418 for (i = 0; i < ex->num_phys; i++) { in sas_ex_phy_discover()
433 struct expander_device *ex = &dev->ex_dev; in sas_expander_discover() local
436 ex->ex_phy = kcalloc(ex->num_phys, sizeof(*ex->ex_phy), GFP_KERNEL); in sas_expander_discover()
437 if (!ex->ex_phy) in sas_expander_discover()
446 kfree(ex->ex_phy); in sas_expander_discover()
447 ex->ex_phy = NULL; in sas_expander_discover()
618 struct expander_device *ex = &dev->ex_dev; in sas_ex_disable_phy() local
619 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_ex_disable_phy()
627 struct expander_device *ex = &dev->ex_dev; in sas_ex_disable_port() local
630 for (i = 0; i < ex->num_phys; i++) { in sas_ex_disable_port()
631 struct ex_phy *phy = &ex->ex_phy[i]; in sas_ex_disable_port()
970 struct expander_device *ex = &dev->ex_dev; in sas_ex_discover_dev() local
971 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_ex_discover_dev()
1065 struct expander_device *ex = &dev->ex_dev; in sas_find_sub_addr() local
1068 for (i = 0; i < ex->num_phys; i++) { in sas_find_sub_addr()
1069 struct ex_phy *phy = &ex->ex_phy[i]; in sas_find_sub_addr()
1088 struct expander_device *ex = &dev->ex_dev; in sas_check_level_subtractive_boundary() local
1092 list_for_each_entry(child, &ex->children, siblings) { in sas_check_level_subtractive_boundary()
1126 struct expander_device *ex = &dev->ex_dev; in sas_ex_discover_devices() local
1127 int i = 0, end = ex->num_phys; in sas_ex_discover_devices()
1136 struct ex_phy *ex_phy = &ex->ex_phy[i]; in sas_ex_discover_devices()
1164 struct expander_device *ex = &dev->ex_dev; in sas_check_ex_subtractive_boundary() local
1171 for (i = 0; i < ex->num_phys; i++) { in sas_check_ex_subtractive_boundary()
1172 struct ex_phy *phy = &ex->ex_phy[i]; in sas_check_ex_subtractive_boundary()
1358 struct expander_device *ex = &dev->ex_dev; in sas_configure_present() local
1359 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_configure_present()
1379 for (i = 0; i < ex->max_route_indexes ; i++) { in sas_configure_present()
1589 struct sas_expander_device *ex = in sas_ex_level_discovery() local
1592 if (level == ex->level) in sas_ex_level_discovery()
1620 struct sas_expander_device *ex = rphy_to_expander_device(dev->rphy); in sas_discover_root_expander() local
1626 ex->level = dev->port->disc.max_level; /* 0 */ in sas_discover_root_expander()
1715 struct expander_device *ex = &dev->ex_dev; in sas_find_bcast_phy() local
1719 for (i = from_phy; i < ex->num_phys; i++) { in sas_find_bcast_phy()
1733 if (phy_change_count != ex->ex_phy[i].phy_change_count) { in sas_find_bcast_phy()
1735 ex->ex_phy[i].phy_change_count = in sas_find_bcast_phy()
1795 struct expander_device *ex = &dev->ex_dev; in sas_find_bcast_dev() local
1804 if (ex_change_count != -1 && ex_change_count != ex->ex_change_count) { in sas_find_bcast_dev()
1812 ex->ex_change_count = ex_change_count; in sas_find_bcast_dev()
1820 list_for_each_entry(ch, &ex->children, siblings) { in sas_find_bcast_dev()
1833 struct expander_device *ex = &dev->ex_dev; in sas_unregister_ex_tree() local
1836 list_for_each_entry_safe(child, n, &ex->children, siblings) { in sas_unregister_ex_tree()
1890 struct sas_expander_device *ex = in sas_discover_bfs_by_root_level() local
1893 if (level > ex->level) in sas_discover_bfs_by_root_level()
1896 else if (level == ex->level) in sas_discover_bfs_by_root_level()
1906 struct sas_expander_device *ex = rphy_to_expander_device(dev->rphy); in sas_discover_bfs_by_root() local
1907 int level = ex->level+1; in sas_discover_bfs_by_root()
1967 struct expander_device *ex = &dev->ex_dev; in sas_rediscover_dev() local
1968 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_rediscover_dev()
2059 struct expander_device *ex = &dev->ex_dev; in sas_rediscover() local
2060 struct ex_phy *changed_phy = &ex->ex_phy[phy_id]; in sas_rediscover()
2069 for (i = 0; i < ex->num_phys; i++) { in sas_rediscover()
2070 struct ex_phy *phy = &ex->ex_phy[i]; in sas_rediscover()
2101 struct expander_device *ex = &dev->ex_dev; in sas_ex_revalidate_domain() local
2111 } while (i < ex->num_phys); in sas_ex_revalidate_domain()