Lines Matching refs:phy
512 dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev, in _transport_delete_phy()
518 sas_port_delete_phy(mpt2sas_port->port, mpt2sas_phy->phy); in _transport_delete_phy()
536 dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev, in _transport_add_phy()
542 sas_port_add_phy(mpt2sas_port->port, mpt2sas_phy->phy); in _transport_add_phy()
630 if (sas_node->phy[i].remote_identify.sas_address != sas_address) in _transport_sanity_check()
632 if (sas_node->phy[i].phy_belongs_to_port == 1) in _transport_sanity_check()
634 &sas_node->phy[i]); in _transport_sanity_check()
699 if (sas_node->phy[i].remote_identify.sas_address != in mpt2sas_transport_port_add()
702 list_add_tail(&sas_node->phy[i].port_siblings, in mpt2sas_transport_port_add()
728 sas_port_add_phy(port, mpt2sas_phy->phy); in mpt2sas_transport_port_add()
818 if (sas_node->phy[i].remote_identify.sas_address == sas_address) in mpt2sas_transport_port_remove()
819 memset(&sas_node->phy[i].remote_identify, 0 , in mpt2sas_transport_port_remove()
833 sas_port_delete_phy(mpt2sas_port->port, mpt2sas_phy->phy); in mpt2sas_transport_port_remove()
853 struct sas_phy *phy; in mpt2sas_transport_add_host_phy() local
858 phy = sas_phy_alloc(parent_dev, phy_index); in mpt2sas_transport_add_host_phy()
859 if (!phy) { in mpt2sas_transport_add_host_phy()
870 phy->identify = mpt2sas_phy->identify; in mpt2sas_transport_add_host_phy()
875 phy->identify.phy_identifier = mpt2sas_phy->phy_id; in mpt2sas_transport_add_host_phy()
876 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_host_phy()
878 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt2sas_transport_add_host_phy()
880 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt2sas_transport_add_host_phy()
882 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_host_phy()
884 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_host_phy()
887 if ((sas_phy_add(phy))) { in mpt2sas_transport_add_host_phy()
890 sas_phy_free(phy); in mpt2sas_transport_add_host_phy()
894 dev_printk(KERN_INFO, &phy->dev, in mpt2sas_transport_add_host_phy()
902 mpt2sas_phy->phy = phy; in mpt2sas_transport_add_host_phy()
920 struct sas_phy *phy; in mpt2sas_transport_add_expander_phy() local
924 phy = sas_phy_alloc(parent_dev, phy_index); in mpt2sas_transport_add_expander_phy()
925 if (!phy) { in mpt2sas_transport_add_expander_phy()
936 phy->identify = mpt2sas_phy->identify; in mpt2sas_transport_add_expander_phy()
942 phy->identify.phy_identifier = mpt2sas_phy->phy_id; in mpt2sas_transport_add_expander_phy()
943 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_expander_phy()
946 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt2sas_transport_add_expander_phy()
948 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt2sas_transport_add_expander_phy()
950 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_expander_phy()
952 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt2sas_transport_add_expander_phy()
955 if ((sas_phy_add(phy))) { in mpt2sas_transport_add_expander_phy()
958 sas_phy_free(phy); in mpt2sas_transport_add_expander_phy()
962 dev_printk(KERN_INFO, &phy->dev, in mpt2sas_transport_add_expander_phy()
970 mpt2sas_phy->phy = phy; in mpt2sas_transport_add_expander_phy()
1002 mpt2sas_phy = &sas_node->phy[phy_number]; in mpt2sas_transport_update_links()
1014 if (mpt2sas_phy->phy) in mpt2sas_transport_update_links()
1015 mpt2sas_phy->phy->negotiated_linkrate = in mpt2sas_transport_update_links()
1019 dev_printk(KERN_INFO, &mpt2sas_phy->phy->dev, in mpt2sas_transport_update_links()
1029 phy_to_ioc(struct sas_phy *phy) in phy_to_ioc() argument
1031 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in phy_to_ioc()
1080 struct sas_phy *phy) in _transport_get_expander_phy_error_log() argument
1163 phy_error_log_request->phy_identifier = phy->number; in _transport_get_expander_phy_error_log()
1170 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_get_expander_phy_error_log()
1196 (unsigned long long)phy->identify.sas_address, phy->number)); in _transport_get_expander_phy_error_log()
1234 phy->invalid_dword_count = in _transport_get_expander_phy_error_log()
1236 phy->running_disparity_error_count = in _transport_get_expander_phy_error_log()
1238 phy->loss_of_dword_sync_count = in _transport_get_expander_phy_error_log()
1240 phy->phy_reset_problem_count = in _transport_get_expander_phy_error_log()
1268 _transport_get_linkerrors(struct sas_phy *phy) in _transport_get_linkerrors() argument
1270 struct MPT2SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_get_linkerrors()
1277 phy->identify.sas_address) == NULL) { in _transport_get_linkerrors()
1283 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_get_linkerrors()
1284 return _transport_get_expander_phy_error_log(ioc, phy); in _transport_get_linkerrors()
1288 phy->number))) { in _transport_get_linkerrors()
1297 phy->number, le16_to_cpu(mpi_reply.IOCStatus), in _transport_get_linkerrors()
1300 phy->invalid_dword_count = le32_to_cpu(phy_pg1.InvalidDwordCount); in _transport_get_linkerrors()
1301 phy->running_disparity_error_count = in _transport_get_linkerrors()
1303 phy->loss_of_dword_sync_count = in _transport_get_linkerrors()
1305 phy->phy_reset_problem_count = in _transport_get_linkerrors()
1403 struct sas_phy *phy, u8 phy_operation) in _transport_expander_phy_control() argument
1486 phy_control_request->phy_identifier = phy->number; in _transport_expander_phy_control()
1489 phy->minimum_linkrate << 4; in _transport_expander_phy_control()
1491 phy->maximum_linkrate << 4; in _transport_expander_phy_control()
1498 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_expander_phy_control()
1524 (unsigned long long)phy->identify.sas_address, phy->number, in _transport_expander_phy_control()
1590 _transport_phy_reset(struct sas_phy *phy, int hard_reset) in _transport_phy_reset() argument
1592 struct MPT2SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_reset()
1599 phy->identify.sas_address) == NULL) { in _transport_phy_reset()
1606 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_reset()
1607 return _transport_expander_phy_control(ioc, phy, in _transport_phy_reset()
1616 mpi_request.PhyNum = phy->number; in _transport_phy_reset()
1627 phy->number, le16_to_cpu(mpi_reply.IOCStatus), in _transport_phy_reset()
1642 _transport_phy_enable(struct sas_phy *phy, int enable) in _transport_phy_enable() argument
1644 struct MPT2SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_enable()
1656 phy->identify.sas_address) == NULL) { in _transport_phy_enable()
1663 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_enable()
1664 return _transport_expander_phy_control(ioc, phy, in _transport_phy_enable()
1751 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1754 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1761 _transport_phy_reset(phy, 0); in _transport_phy_enable()
1778 _transport_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates) in _transport_phy_speed() argument
1780 struct MPT2SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_speed()
1792 phy->identify.sas_address) == NULL) { in _transport_phy_speed()
1799 rates->minimum_linkrate = phy->minimum_linkrate; in _transport_phy_speed()
1800 else if (rates->minimum_linkrate < phy->minimum_linkrate_hw) in _transport_phy_speed()
1801 rates->minimum_linkrate = phy->minimum_linkrate_hw; in _transport_phy_speed()
1804 rates->maximum_linkrate = phy->maximum_linkrate; in _transport_phy_speed()
1805 else if (rates->maximum_linkrate > phy->maximum_linkrate_hw) in _transport_phy_speed()
1806 rates->maximum_linkrate = phy->maximum_linkrate_hw; in _transport_phy_speed()
1809 if (phy->identify.sas_address != ioc->sas_hba.sas_address) { in _transport_phy_speed()
1810 phy->minimum_linkrate = rates->minimum_linkrate; in _transport_phy_speed()
1811 phy->maximum_linkrate = rates->maximum_linkrate; in _transport_phy_speed()
1812 return _transport_expander_phy_control(ioc, phy, in _transport_phy_speed()
1845 if (phy->number != i) { in _transport_phy_speed()
1847 (ioc->sas_hba.phy[i].phy->minimum_linkrate + in _transport_phy_speed()
1848 (ioc->sas_hba.phy[i].phy->maximum_linkrate << 4)); in _transport_phy_speed()
1865 _transport_phy_reset(phy, 0); in _transport_phy_speed()
1869 phy->number)) { in _transport_phy_speed()
1870 phy->minimum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1872 phy->maximum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1874 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()