Lines Matching refs:phy
504 dev_printk(KERN_INFO, &mpt3sas_phy->phy->dev, in _transport_delete_phy()
510 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_delete_phy()
528 dev_printk(KERN_INFO, &mpt3sas_phy->phy->dev, in _transport_add_phy()
534 sas_port_add_phy(mpt3sas_port->port, mpt3sas_phy->phy); in _transport_add_phy()
624 if (sas_node->phy[i].remote_identify.sas_address != sas_address) in _transport_sanity_check()
626 if (sas_node->phy[i].phy_belongs_to_port == 1) in _transport_sanity_check()
628 &sas_node->phy[i]); in _transport_sanity_check()
693 if (sas_node->phy[i].remote_identify.sas_address != in mpt3sas_transport_port_add()
696 list_add_tail(&sas_node->phy[i].port_siblings, in mpt3sas_transport_port_add()
722 sas_port_add_phy(port, mpt3sas_phy->phy); in mpt3sas_transport_port_add()
811 if (sas_node->phy[i].remote_identify.sas_address == sas_address) in mpt3sas_transport_port_remove()
812 memset(&sas_node->phy[i].remote_identify, 0 , in mpt3sas_transport_port_remove()
827 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in mpt3sas_transport_port_remove()
847 struct sas_phy *phy; in mpt3sas_transport_add_host_phy() local
852 phy = sas_phy_alloc(parent_dev, phy_index); in mpt3sas_transport_add_host_phy()
853 if (!phy) { in mpt3sas_transport_add_host_phy()
862 sas_phy_free(phy); in mpt3sas_transport_add_host_phy()
865 phy->identify = mpt3sas_phy->identify; in mpt3sas_transport_add_host_phy()
870 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_host_phy()
871 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
873 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
875 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
877 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
879 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
882 if ((sas_phy_add(phy))) { in mpt3sas_transport_add_host_phy()
885 sas_phy_free(phy); in mpt3sas_transport_add_host_phy()
889 dev_printk(KERN_INFO, &phy->dev, in mpt3sas_transport_add_host_phy()
897 mpt3sas_phy->phy = phy; in mpt3sas_transport_add_host_phy()
916 struct sas_phy *phy; in mpt3sas_transport_add_expander_phy() local
920 phy = sas_phy_alloc(parent_dev, phy_index); in mpt3sas_transport_add_expander_phy()
921 if (!phy) { in mpt3sas_transport_add_expander_phy()
930 sas_phy_free(phy); in mpt3sas_transport_add_expander_phy()
933 phy->identify = mpt3sas_phy->identify; in mpt3sas_transport_add_expander_phy()
939 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_expander_phy()
940 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
943 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
945 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
947 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
949 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
952 if ((sas_phy_add(phy))) { in mpt3sas_transport_add_expander_phy()
955 sas_phy_free(phy); in mpt3sas_transport_add_expander_phy()
959 dev_printk(KERN_INFO, &phy->dev, in mpt3sas_transport_add_expander_phy()
967 mpt3sas_phy->phy = phy; in mpt3sas_transport_add_expander_phy()
999 mpt3sas_phy = &sas_node->phy[phy_number]; in mpt3sas_transport_update_links()
1011 if (mpt3sas_phy->phy) in mpt3sas_transport_update_links()
1012 mpt3sas_phy->phy->negotiated_linkrate = in mpt3sas_transport_update_links()
1016 dev_printk(KERN_INFO, &mpt3sas_phy->phy->dev, in mpt3sas_transport_update_links()
1026 phy_to_ioc(struct sas_phy *phy) in phy_to_ioc() argument
1028 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in phy_to_ioc()
1076 struct sas_phy *phy) in _transport_get_expander_phy_error_log() argument
1158 phy_error_log_request->phy_identifier = phy->number; in _transport_get_expander_phy_error_log()
1165 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_get_expander_phy_error_log()
1177 ioc->name, (unsigned long long)phy->identify.sas_address, in _transport_get_expander_phy_error_log()
1178 phy->number)); in _transport_get_expander_phy_error_log()
1216 phy->invalid_dword_count = in _transport_get_expander_phy_error_log()
1218 phy->running_disparity_error_count = in _transport_get_expander_phy_error_log()
1220 phy->loss_of_dword_sync_count = in _transport_get_expander_phy_error_log()
1222 phy->phy_reset_problem_count = in _transport_get_expander_phy_error_log()
1250 _transport_get_linkerrors(struct sas_phy *phy) in _transport_get_linkerrors() argument
1252 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_get_linkerrors()
1259 phy->identify.sas_address) == NULL) { in _transport_get_linkerrors()
1265 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_get_linkerrors()
1266 return _transport_get_expander_phy_error_log(ioc, phy); in _transport_get_linkerrors()
1270 phy->number))) { in _transport_get_linkerrors()
1279 ioc->name, phy->number, in _transport_get_linkerrors()
1283 phy->invalid_dword_count = le32_to_cpu(phy_pg1.InvalidDwordCount); in _transport_get_linkerrors()
1284 phy->running_disparity_error_count = in _transport_get_linkerrors()
1286 phy->loss_of_dword_sync_count = in _transport_get_linkerrors()
1288 phy->phy_reset_problem_count = in _transport_get_linkerrors()
1386 struct sas_phy *phy, u8 phy_operation) in _transport_expander_phy_control() argument
1469 phy_control_request->phy_identifier = phy->number; in _transport_expander_phy_control()
1472 phy->minimum_linkrate << 4; in _transport_expander_phy_control()
1474 phy->maximum_linkrate << 4; in _transport_expander_phy_control()
1481 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_expander_phy_control()
1507 ioc->name, (unsigned long long)phy->identify.sas_address, in _transport_expander_phy_control()
1508 phy->number, phy_operation)); in _transport_expander_phy_control()
1572 _transport_phy_reset(struct sas_phy *phy, int hard_reset) in _transport_phy_reset() argument
1574 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_reset()
1581 phy->identify.sas_address) == NULL) { in _transport_phy_reset()
1588 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_reset()
1589 return _transport_expander_phy_control(ioc, phy, in _transport_phy_reset()
1598 mpi_request.PhyNum = phy->number; in _transport_phy_reset()
1609 ioc->name, phy->number, le16_to_cpu(mpi_reply.IOCStatus), in _transport_phy_reset()
1624 _transport_phy_enable(struct sas_phy *phy, int enable) in _transport_phy_enable() argument
1626 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_enable()
1638 phy->identify.sas_address) == NULL) { in _transport_phy_enable()
1645 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_enable()
1646 return _transport_expander_phy_control(ioc, phy, in _transport_phy_enable()
1735 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1738 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1745 _transport_phy_reset(phy, 0); in _transport_phy_enable()
1762 _transport_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates) in _transport_phy_speed() argument
1764 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_speed()
1776 phy->identify.sas_address) == NULL) { in _transport_phy_speed()
1783 rates->minimum_linkrate = phy->minimum_linkrate; in _transport_phy_speed()
1784 else if (rates->minimum_linkrate < phy->minimum_linkrate_hw) in _transport_phy_speed()
1785 rates->minimum_linkrate = phy->minimum_linkrate_hw; in _transport_phy_speed()
1788 rates->maximum_linkrate = phy->maximum_linkrate; in _transport_phy_speed()
1789 else if (rates->maximum_linkrate > phy->maximum_linkrate_hw) in _transport_phy_speed()
1790 rates->maximum_linkrate = phy->maximum_linkrate_hw; in _transport_phy_speed()
1793 if (phy->identify.sas_address != ioc->sas_hba.sas_address) { in _transport_phy_speed()
1794 phy->minimum_linkrate = rates->minimum_linkrate; in _transport_phy_speed()
1795 phy->maximum_linkrate = rates->maximum_linkrate; in _transport_phy_speed()
1796 return _transport_expander_phy_control(ioc, phy, in _transport_phy_speed()
1829 if (phy->number != i) { in _transport_phy_speed()
1831 (ioc->sas_hba.phy[i].phy->minimum_linkrate + in _transport_phy_speed()
1832 (ioc->sas_hba.phy[i].phy->maximum_linkrate << 4)); in _transport_phy_speed()
1849 _transport_phy_reset(phy, 0); in _transport_phy_speed()
1853 phy->number)) { in _transport_phy_speed()
1854 phy->minimum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1856 phy->maximum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1858 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()