Lines Matching refs:phy_id
36 static int sas_configure_phy(struct domain_device *dev, int phy_id,
157 static void sas_set_ex_phy(struct domain_device *dev, int phy_id, in sas_set_ex_phy() argument
161 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_set_ex_phy()
168 phy->phy = sas_phy_alloc(&rphy->dev, phy_id); in sas_set_ex_phy()
186 phy->phy_id = phy_id; in sas_set_ex_phy()
203 phy->phy->identify.phy_identifier = phy_id; in sas_set_ex_phy()
214 SAS_ADDR(dev->sas_addr), phy->phy_id, in sas_set_ex_phy()
442 int sas_smp_phy_control(struct domain_device *dev, int phy_id, in sas_smp_phy_control() argument
461 pc_req[9] = phy_id; in sas_smp_phy_control()
475 static void sas_ex_disable_phy(struct domain_device *dev, int phy_id) in sas_ex_disable_phy() argument
478 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_ex_disable_phy()
480 sas_smp_phy_control(dev, phy_id, PHY_FUNC_DISABLE, NULL); in sas_ex_disable_phy()
561 int phy_id, in sas_get_report_phy_sata() argument
572 rps_req[9] = phy_id; in sas_get_report_phy_sata()
637 struct domain_device *parent, int phy_id) in sas_ex_discover_end_dev() argument
640 struct ex_phy *phy = &parent_ex->ex_phy[phy_id]; in sas_ex_discover_end_dev()
658 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_end_dev()
675 res = sas_get_report_phy_sata(parent, phy_id, in sas_ex_discover_end_dev()
680 phy_id, res); in sas_ex_discover_end_dev()
703 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
729 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
735 phy_id); in sas_ex_discover_end_dev()
755 static int sas_ex_join_wide_port(struct domain_device *parent, int phy_id) in sas_ex_join_wide_port() argument
757 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_join_wide_port()
778 struct domain_device *parent, int phy_id) in sas_ex_discover_expander() argument
781 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_discover_expander()
791 SAS_ADDR(parent->sas_addr), phy_id, in sas_ex_discover_expander()
800 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_expander()
849 static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) in sas_ex_discover_dev() argument
852 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_ex_discover_dev()
858 if (!sas_smp_phy_control(dev, phy_id, PHY_FUNC_LINK_RESET, NULL)) in sas_ex_discover_dev()
859 res = sas_ex_phy_discover(dev, phy_id); in sas_ex_discover_dev()
867 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
872 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
874 sas_configure_phy(dev, phy_id, dev->port->sas_addr, 1); in sas_ex_discover_dev()
896 phy_id); in sas_ex_discover_dev()
909 res = sas_ex_join_wide_port(dev, phy_id); in sas_ex_discover_dev()
912 phy_id, SAS_ADDR(ex_phy->attached_sas_addr)); in sas_ex_discover_dev()
918 child = sas_ex_discover_end_dev(dev, phy_id); in sas_ex_discover_dev()
927 phy_id); in sas_ex_discover_dev()
928 sas_ex_disable_phy(dev, phy_id); in sas_ex_discover_dev()
935 child = sas_ex_discover_expander(dev, phy_id); in sas_ex_discover_dev()
1119 parent_phy->phy_id, in sas_print_parent_topology_bug()
1123 child_phy->phy_id, in sas_print_parent_topology_bug()
1141 parent_phy->phy_id, in sas_check_eeds()
1143 child_phy->phy_id, in sas_check_eeds()
1165 parent_phy->phy_id, in sas_check_eeds()
1167 child_phy->phy_id); in sas_check_eeds()
1243 static int sas_configure_present(struct domain_device *dev, int phy_id, in sas_configure_present() argument
1248 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_configure_present()
1266 rri_req[9] = phy_id; in sas_configure_present()
1278 SAS_ADDR(dev->sas_addr), phy_id, i); in sas_configure_present()
1283 SAS_ADDR(dev->sas_addr), phy_id, i, res); in sas_configure_present()
1317 static int sas_configure_set(struct domain_device *dev, int phy_id, in sas_configure_set() argument
1336 cri_req[9] = phy_id; in sas_configure_set()
1349 SAS_ADDR(dev->sas_addr), phy_id, index); in sas_configure_set()
1357 static int sas_configure_phy(struct domain_device *dev, int phy_id, in sas_configure_phy() argument
1364 res = sas_configure_present(dev, phy_id, sas_addr, &index, &present); in sas_configure_phy()
1368 return sas_configure_set(dev, phy_id, sas_addr, index,include); in sas_configure_phy()
1535 int phy_id, struct smp_resp *disc_resp) in sas_get_phy_discover() argument
1545 disc_req[9] = phy_id; in sas_get_phy_discover()
1561 int phy_id, int *pcc) in sas_get_phy_change_count() argument
1570 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_change_count()
1579 int phy_id, u8 *attached_sas_addr) in sas_get_phy_attached_sas_addr() argument
1590 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_attached_sas_addr()
1600 static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, in sas_find_bcast_phy() argument
1615 *phy_id = i; in sas_find_bcast_phy()
1703 int phy_id) in sas_unregister_devs_sas_addr() argument
1706 struct ex_phy *phy = &ex_dev->ex_phy[phy_id]; in sas_unregister_devs_sas_addr()
1769 static int sas_discover_new(struct domain_device *dev, int phy_id) in sas_discover_new() argument
1771 struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id]; in sas_discover_new()
1776 SAS_ADDR(dev->sas_addr), phy_id); in sas_discover_new()
1777 res = sas_ex_phy_discover(dev, phy_id); in sas_discover_new()
1780 res = sas_ex_discover_devices(dev, phy_id); in sas_discover_new()
1796 static int sas_rediscover_dev(struct domain_device *dev, int phy_id) in sas_rediscover_dev() argument
1799 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_rediscover_dev()
1803 res = sas_get_phy_attached_sas_addr(dev, phy_id, attached_sas_addr); in sas_rediscover_dev()
1807 sas_unregister_devs_sas_addr(dev, phy_id); in sas_rediscover_dev()
1811 sas_unregister_devs_sas_addr(dev, phy_id); in sas_rediscover_dev()
1819 sas_unregister_devs_sas_addr(dev, phy_id); in sas_rediscover_dev()
1823 SAS_ADDR(dev->sas_addr), phy_id); in sas_rediscover_dev()
1824 sas_ex_phy_discover(dev, phy_id); in sas_rediscover_dev()
1826 res = sas_discover_new(dev, phy_id); in sas_rediscover_dev()
1831 static int sas_rediscover(struct domain_device *dev, const int phy_id) in sas_rediscover() argument
1834 struct ex_phy *changed_phy = &ex->ex_phy[phy_id]; in sas_rediscover()
1839 SAS_ADDR(dev->sas_addr), phy_id); in sas_rediscover()
1845 if (i == phy_id) in sas_rediscover()
1850 "phy%d\n", phy_id, i); in sas_rediscover()
1854 res = sas_rediscover_dev(dev, phy_id); in sas_rediscover()
1856 res = sas_discover_new(dev, phy_id); in sas_rediscover()
1880 int i = 0, phy_id; in sas_ex_revalidate_domain() local
1883 phy_id = -1; in sas_ex_revalidate_domain()
1884 res = sas_find_bcast_phy(dev, &phy_id, i); in sas_ex_revalidate_domain()
1885 if (phy_id == -1) in sas_ex_revalidate_domain()
1887 res = sas_rediscover(dev, phy_id); in sas_ex_revalidate_domain()
1888 i = phy_id + 1; in sas_ex_revalidate_domain()