• Home
  • Raw
  • Download

Lines Matching refs:phy_id

38 static int sas_configure_phy(struct domain_device *dev, int phy_id,
208 static void sas_set_ex_phy(struct domain_device *dev, int phy_id, void *rsp) in sas_set_ex_phy() argument
217 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_set_ex_phy()
225 phy->phy = sas_phy_alloc(&rphy->dev, phy_id); in sas_set_ex_phy()
253 phy->phy_id = phy_id; in sas_set_ex_phy()
262 phy->phy_id = phy_id; in sas_set_ex_phy()
289 phy->phy->identify.phy_identifier = phy_id; in sas_set_ex_phy()
352 SAS_ADDR(dev->sas_addr), phy->phy_id, in sas_set_ex_phy()
358 struct domain_device *sas_ex_to_ata(struct domain_device *ex_dev, int phy_id) in sas_ex_to_ata() argument
360 struct ex_phy *ex_phy = &ex_dev->ex_dev.ex_phy[phy_id]; in sas_ex_to_ata()
590 int sas_smp_phy_control(struct domain_device *dev, int phy_id, in sas_smp_phy_control() argument
609 pc_req[9] = phy_id; in sas_smp_phy_control()
619 SAS_ADDR(dev->sas_addr), phy_id, res); in sas_smp_phy_control()
622 SAS_ADDR(dev->sas_addr), phy_id, pc_resp[2]); in sas_smp_phy_control()
630 static void sas_ex_disable_phy(struct domain_device *dev, int phy_id) in sas_ex_disable_phy() argument
633 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_ex_disable_phy()
635 sas_smp_phy_control(dev, phy_id, PHY_FUNC_DISABLE, NULL); in sas_ex_disable_phy()
716 int sas_get_report_phy_sata(struct domain_device *dev, int phy_id, in sas_get_report_phy_sata() argument
727 rps_req[9] = phy_id; in sas_get_report_phy_sata()
792 struct domain_device *parent, int phy_id) in sas_ex_discover_end_dev() argument
795 struct ex_phy *phy = &parent_ex->ex_phy[phy_id]; in sas_ex_discover_end_dev()
814 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_end_dev()
835 SAS_ADDR(child->sas_addr), phy_id); in sas_ex_discover_end_dev()
836 ret = sas_smp_phy_control(parent, phy_id, in sas_ex_discover_end_dev()
840 SAS_ADDR(child->sas_addr), phy_id, ret); in sas_ex_discover_end_dev()
844 SAS_ADDR(child->sas_addr), phy_id); in sas_ex_discover_end_dev()
858 rphy->identify.phy_identifier = phy_id; in sas_ex_discover_end_dev()
870 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
886 rphy->identify.phy_identifier = phy_id; in sas_ex_discover_end_dev()
896 SAS_ADDR(parent->sas_addr), phy_id, res); in sas_ex_discover_end_dev()
902 phy_id); in sas_ex_discover_end_dev()
924 static bool sas_ex_join_wide_port(struct domain_device *parent, int phy_id) in sas_ex_join_wide_port() argument
926 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_join_wide_port()
948 struct domain_device *parent, int phy_id) in sas_ex_discover_expander() argument
951 struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id]; in sas_ex_discover_expander()
961 SAS_ADDR(parent->sas_addr), phy_id, in sas_ex_discover_expander()
970 phy->port = sas_port_alloc(&parent->rphy->dev, phy_id); in sas_ex_discover_expander()
1027 static int sas_ex_discover_dev(struct domain_device *dev, int phy_id) in sas_ex_discover_dev() argument
1030 struct ex_phy *ex_phy = &ex->ex_phy[phy_id]; in sas_ex_discover_dev()
1036 if (!sas_smp_phy_control(dev, phy_id, PHY_FUNC_LINK_RESET, NULL)) in sas_ex_discover_dev()
1037 res = sas_ex_phy_discover(dev, phy_id); in sas_ex_discover_dev()
1045 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
1050 sas_add_parent_port(dev, phy_id); in sas_ex_discover_dev()
1052 sas_configure_phy(dev, phy_id, dev->port->sas_addr, 1); in sas_ex_discover_dev()
1075 phy_id); in sas_ex_discover_dev()
1088 if (sas_ex_join_wide_port(dev, phy_id)) { in sas_ex_discover_dev()
1090 phy_id, SAS_ADDR(ex_phy->attached_sas_addr)); in sas_ex_discover_dev()
1097 child = sas_ex_discover_end_dev(dev, phy_id); in sas_ex_discover_dev()
1106 phy_id); in sas_ex_discover_dev()
1107 sas_ex_disable_phy(dev, phy_id); in sas_ex_discover_dev()
1114 child = sas_ex_discover_expander(dev, phy_id); in sas_ex_discover_dev()
1301 parent_phy->phy_id, in sas_print_parent_topology_bug()
1305 child_phy->phy_id, in sas_print_parent_topology_bug()
1323 parent_phy->phy_id, in sas_check_eeds()
1325 child_phy->phy_id, in sas_check_eeds()
1347 parent_phy->phy_id, in sas_check_eeds()
1349 child_phy->phy_id); in sas_check_eeds()
1430 static int sas_configure_present(struct domain_device *dev, int phy_id, in sas_configure_present() argument
1435 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_configure_present()
1453 rri_req[9] = phy_id; in sas_configure_present()
1465 SAS_ADDR(dev->sas_addr), phy_id, i); in sas_configure_present()
1470 SAS_ADDR(dev->sas_addr), phy_id, i, res); in sas_configure_present()
1504 static int sas_configure_set(struct domain_device *dev, int phy_id, in sas_configure_set() argument
1523 cri_req[9] = phy_id; in sas_configure_set()
1536 SAS_ADDR(dev->sas_addr), phy_id, index); in sas_configure_set()
1544 static int sas_configure_phy(struct domain_device *dev, int phy_id, in sas_configure_phy() argument
1551 res = sas_configure_present(dev, phy_id, sas_addr, &index, &present); in sas_configure_phy()
1555 return sas_configure_set(dev, phy_id, sas_addr, index,include); in sas_configure_phy()
1722 int phy_id, struct smp_resp *disc_resp) in sas_get_phy_discover() argument
1732 disc_req[9] = phy_id; in sas_get_phy_discover()
1748 int phy_id, int *pcc) in sas_get_phy_change_count() argument
1757 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_change_count()
1765 static int sas_get_phy_attached_dev(struct domain_device *dev, int phy_id, in sas_get_phy_attached_dev() argument
1777 res = sas_get_phy_discover(dev, phy_id, disc_resp); in sas_get_phy_attached_dev()
1788 static int sas_find_bcast_phy(struct domain_device *dev, int *phy_id, in sas_find_bcast_phy() argument
1813 *phy_id = i; in sas_find_bcast_phy()
1873 int phy_id = -1; in sas_find_bcast_dev() local
1885 res = sas_find_bcast_phy(dev, &phy_id, 0, false); in sas_find_bcast_dev()
1886 if (phy_id != -1) { in sas_find_bcast_dev()
1922 int phy_id, bool last) in sas_unregister_devs_sas_addr() argument
1925 struct ex_phy *phy = &ex_dev->ex_phy[phy_id]; in sas_unregister_devs_sas_addr()
1995 static int sas_discover_new(struct domain_device *dev, int phy_id) in sas_discover_new() argument
1997 struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id]; in sas_discover_new()
2002 SAS_ADDR(dev->sas_addr), phy_id); in sas_discover_new()
2003 res = sas_ex_phy_discover(dev, phy_id); in sas_discover_new()
2007 if (sas_ex_join_wide_port(dev, phy_id)) in sas_discover_new()
2010 res = sas_ex_discover_devices(dev, phy_id); in sas_discover_new()
2040 static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last) in sas_rediscover_dev() argument
2043 struct ex_phy *phy = &ex->ex_phy[phy_id]; in sas_rediscover_dev()
2049 res = sas_get_phy_attached_dev(dev, phy_id, sas_addr, &type); in sas_rediscover_dev()
2053 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2057 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2069 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2074 sas_ex_phy_discover(dev, phy_id); in sas_rediscover_dev()
2078 struct domain_device *ata_dev = sas_ex_to_ata(dev, phy_id); in sas_rediscover_dev()
2081 sas_ex_phy_discover(dev, phy_id); in sas_rediscover_dev()
2086 SAS_ADDR(dev->sas_addr), phy_id, action); in sas_rediscover_dev()
2092 SAS_ADDR(dev->sas_addr), phy_id, in sas_rediscover_dev()
2094 sas_unregister_devs_sas_addr(dev, phy_id, last); in sas_rediscover_dev()
2096 return sas_discover_new(dev, phy_id); in sas_rediscover_dev()
2113 static int sas_rediscover(struct domain_device *dev, const int phy_id) in sas_rediscover() argument
2116 struct ex_phy *changed_phy = &ex->ex_phy[phy_id]; in sas_rediscover()
2122 SAS_ADDR(dev->sas_addr), phy_id); in sas_rediscover()
2128 if (i == phy_id) in sas_rediscover()
2133 "phy%d\n", phy_id, i); in sas_rediscover()
2138 res = sas_rediscover_dev(dev, phy_id, last); in sas_rediscover()
2140 res = sas_discover_new(dev, phy_id); in sas_rediscover()
2161 int i = 0, phy_id; in sas_ex_revalidate_domain() local
2164 phy_id = -1; in sas_ex_revalidate_domain()
2165 res = sas_find_bcast_phy(dev, &phy_id, i, true); in sas_ex_revalidate_domain()
2166 if (phy_id == -1) in sas_ex_revalidate_domain()
2168 res = sas_rediscover(dev, phy_id); in sas_ex_revalidate_domain()
2169 i = phy_id + 1; in sas_ex_revalidate_domain()