Lines Matching refs:phy_id

38 static int sas_configure_phy(struct domain_device *dev, int phy_id,
198 static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) in sas_set_ex_phy() argument
207 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_set_ex_phy()
215 phy->phy = sas_phy_alloc(&rphy->dev, phy_id); in sas_set_ex_phy()
243 phy->phy_id = phy_id; in sas_set_ex_phy()
252 phy->phy_id = phy_id; in sas_set_ex_phy()
279 phy->phy->identify.phy_identifier = phy_id; in sas_set_ex_phy()
341 SAS_ADDR(dev->sas_addr), phy->phy_id, in sas_set_ex_phy()
347 struct domain_device *sas_ex_to_ata(struct domain_device *ex_dev, int phy_id) in sas_ex_to_ata() argument
349 struct ex_phy *ex_phy = &ex_dev->ex_dev.ex_phy[phy_id]; in sas_ex_to_ata()
579 int sas_smp_phy_control(struct domain_device *dev, int phy_id, in sas_smp_phy_control() argument
598 pc_req[9] = phy_id; in sas_smp_phy_control()
612 static void sas_ex_disable_phy(struct domain_device *dev, int phy_id) in sas_ex_disable_phy() argument
615 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_ex_disable_phy()
617 sas_smp_phy_control(dev, phy_id, PHY_FUNC_DISABLE, NULL); in sas_ex_disable_phy()
697 int sas_get_report_phy_sata(struct domain_device *dev, int phy_id, in sas_get_report_phy_sata() argument
708 rps_req[9] = phy_id; in sas_get_report_phy_sata()
773 struct domain_device *parent, int phy_id) in sas_ex_discover_end_dev() argument
776 struct ex_phy *phy = &parent_ex->ex_phy[phy_id]; in sas_ex_discover_end_dev()
795 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_end_dev()
830 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
855 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
861 phy_id); in sas_ex_discover_end_dev()
883 static bool sas_ex_join_wide_port(struct domain_device *parent, int phy_id) in sas_ex_join_wide_port() argument
885 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_join_wide_port()
907 struct domain_device *parent, int phy_id) in sas_ex_discover_expander() argument
910 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_discover_expander()
920 SAS_ADDR(parent->sas_addr), phy_id, in sas_ex_discover_expander()
929 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_expander()
984 static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) in sas_ex_discover_dev() argument
987 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_ex_discover_dev()
993 if (!sas_smp_phy_control(dev, phy_id, PHY_FUNC_LINK_RESET, NULL)) in sas_ex_discover_dev()
994 res = sas_ex_phy_discover(dev, phy_id); in sas_ex_discover_dev()
1002 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
1007 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
1009 sas_configure_phy(dev, phy_id, dev->port->sas_addr, 1); in sas_ex_discover_dev()
1032 phy_id); in sas_ex_discover_dev()
1045 if (sas_ex_join_wide_port(dev, phy_id)) { in sas_ex_discover_dev()
1047 phy_id, SAS_ADDR(ex_phy->attached_sas_addr)); in sas_ex_discover_dev()
1054 child = sas_ex_discover_end_dev(dev, phy_id); in sas_ex_discover_dev()
1063 phy_id); in sas_ex_discover_dev()
1064 sas_ex_disable_phy(dev, phy_id); in sas_ex_discover_dev()
1071 child = sas_ex_discover_expander(dev, phy_id); in sas_ex_discover_dev()
1258 parent_phy->phy_id, in sas_print_parent_topology_bug()
1262 child_phy->phy_id, in sas_print_parent_topology_bug()
1280 parent_phy->phy_id, in sas_check_eeds()
1282 child_phy->phy_id, in sas_check_eeds()
1304 parent_phy->phy_id, in sas_check_eeds()
1306 child_phy->phy_id); in sas_check_eeds()
1387 static int sas_configure_present(struct domain_device *dev, int phy_id, in sas_configure_present() argument
1392 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_configure_present()
1410 rri_req[9] = phy_id; in sas_configure_present()
1422 SAS_ADDR(dev->sas_addr), phy_id, i); in sas_configure_present()
1427 SAS_ADDR(dev->sas_addr), phy_id, i, res); in sas_configure_present()
1461 static int sas_configure_set(struct domain_device *dev, int phy_id, in sas_configure_set() argument
1480 cri_req[9] = phy_id; in sas_configure_set()
1493 SAS_ADDR(dev->sas_addr), phy_id, index); in sas_configure_set()
1501 static int sas_configure_phy(struct domain_device *dev, int phy_id, in sas_configure_phy() argument
1508 res = sas_configure_present(dev, phy_id, sas_addr, &index, &present); in sas_configure_phy()
1512 return sas_configure_set(dev, phy_id, sas_addr, index,include); in sas_configure_phy()
1679 int phy_id, struct smp_resp *disc_resp) in sas_get_phy_discover() argument
1689 disc_req[9] = phy_id; in sas_get_phy_discover()
1705 int phy_id, int *pcc) in sas_get_phy_change_count() argument
1714 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_change_count()
1722 static int sas_get_phy_attached_dev(struct domain_device *dev, int phy_id, in sas_get_phy_attached_dev() argument
1734 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_attached_dev()
1745 static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, in sas_find_bcast_phy() argument
1770 *phy_id = i; in sas_find_bcast_phy()
1830 int phy_id = -1; in sas_find_bcast_dev() local
1842 res = sas_find_bcast_phy(dev, &phy_id, 0, false); in sas_find_bcast_dev()
1843 if (phy_id != -1) { in sas_find_bcast_dev()
1879 int phy_id, bool last) in sas_unregister_devs_sas_addr() argument
1882 struct ex_phy *phy = &ex_dev->ex_phy[phy_id]; in sas_unregister_devs_sas_addr()
1952 static int sas_discover_new(struct domain_device *dev, int phy_id) in sas_discover_new() argument
1954 struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id]; in sas_discover_new()
1959 SAS_ADDR(dev->sas_addr), phy_id); in sas_discover_new()
1960 res = sas_ex_phy_discover(dev, phy_id); in sas_discover_new()
1964 if (sas_ex_join_wide_port(dev, phy_id)) in sas_discover_new()
1967 res = sas_ex_discover_devices(dev, phy_id); in sas_discover_new()
1997 static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last) in sas_rediscover_dev() argument
2000 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_rediscover_dev()
2006 res = sas_get_phy_attached_dev(dev, phy_id, sas_addr, &type); in sas_rediscover_dev()
2010 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2014 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2026 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2030 struct domain_device *ata_dev = sas_ex_to_ata(dev, phy_id); in sas_rediscover_dev()
2033 sas_ex_phy_discover(dev, phy_id); in sas_rediscover_dev()
2038 SAS_ADDR(dev->sas_addr), phy_id, action); in sas_rediscover_dev()
2046 SAS_ADDR(dev->sas_addr), phy_id, in sas_rediscover_dev()
2048 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2051 return sas_discover_new(dev, phy_id); in sas_rediscover_dev()
2068 static int sas_rediscover(struct domain_device *dev, const int phy_id) in sas_rediscover() argument
2071 struct ex_phy *changed_phy = &ex->ex_phy[phy_id]; in sas_rediscover()
2077 SAS_ADDR(dev->sas_addr), phy_id); in sas_rediscover()
2083 if (i == phy_id) in sas_rediscover()
2088 "phy%d\n", phy_id, i); in sas_rediscover()
2093 res = sas_rediscover_dev(dev, phy_id, last); in sas_rediscover()
2095 res = sas_discover_new(dev, phy_id); in sas_rediscover()
2116 int i = 0, phy_id; in sas_ex_revalidate_domain() local
2119 phy_id = -1; in sas_ex_revalidate_domain()
2120 res = sas_find_bcast_phy(dev, &phy_id, i, true); in sas_ex_revalidate_domain()
2121 if (phy_id == -1) in sas_ex_revalidate_domain()
2123 res = sas_rediscover(dev, phy_id); in sas_ex_revalidate_domain()
2124 i = phy_id + 1; in sas_ex_revalidate_domain()