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()
694 if (sas_node->phy[i].remote_identify.sas_address != in mpt3sas_transport_port_add()
697 list_add_tail(&sas_node->phy[i].port_siblings, in mpt3sas_transport_port_add()
723 sas_port_add_phy(port, mpt3sas_phy->phy); in mpt3sas_transport_port_add()
831 if (sas_node->phy[i].remote_identify.sas_address == sas_address) in mpt3sas_transport_port_remove()
832 memset(&sas_node->phy[i].remote_identify, 0 , in mpt3sas_transport_port_remove()
847 sas_port_delete_phy(mpt3sas_port->port, mpt3sas_phy->phy); in mpt3sas_transport_port_remove()
867 struct sas_phy *phy; in mpt3sas_transport_add_host_phy() local
872 phy = sas_phy_alloc(parent_dev, phy_index); in mpt3sas_transport_add_host_phy()
873 if (!phy) { in mpt3sas_transport_add_host_phy()
882 sas_phy_free(phy); in mpt3sas_transport_add_host_phy()
885 phy->identify = mpt3sas_phy->identify; in mpt3sas_transport_add_host_phy()
890 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_host_phy()
891 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
893 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
895 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
897 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
899 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_host_phy()
902 if ((sas_phy_add(phy))) { in mpt3sas_transport_add_host_phy()
905 sas_phy_free(phy); in mpt3sas_transport_add_host_phy()
909 dev_printk(KERN_INFO, &phy->dev, in mpt3sas_transport_add_host_phy()
917 mpt3sas_phy->phy = phy; in mpt3sas_transport_add_host_phy()
936 struct sas_phy *phy; in mpt3sas_transport_add_expander_phy() local
940 phy = sas_phy_alloc(parent_dev, phy_index); in mpt3sas_transport_add_expander_phy()
941 if (!phy) { in mpt3sas_transport_add_expander_phy()
950 sas_phy_free(phy); in mpt3sas_transport_add_expander_phy()
953 phy->identify = mpt3sas_phy->identify; in mpt3sas_transport_add_expander_phy()
959 phy->identify.phy_identifier = mpt3sas_phy->phy_id; in mpt3sas_transport_add_expander_phy()
960 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
963 phy->minimum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
965 phy->maximum_linkrate_hw = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
967 phy->minimum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
969 phy->maximum_linkrate = _transport_convert_phy_link_rate( in mpt3sas_transport_add_expander_phy()
972 if ((sas_phy_add(phy))) { in mpt3sas_transport_add_expander_phy()
975 sas_phy_free(phy); in mpt3sas_transport_add_expander_phy()
979 dev_printk(KERN_INFO, &phy->dev, in mpt3sas_transport_add_expander_phy()
987 mpt3sas_phy->phy = phy; in mpt3sas_transport_add_expander_phy()
1019 mpt3sas_phy = &sas_node->phy[phy_number]; in mpt3sas_transport_update_links()
1031 if (mpt3sas_phy->phy) in mpt3sas_transport_update_links()
1032 mpt3sas_phy->phy->negotiated_linkrate = in mpt3sas_transport_update_links()
1036 dev_printk(KERN_INFO, &mpt3sas_phy->phy->dev, in mpt3sas_transport_update_links()
1046 phy_to_ioc(struct sas_phy *phy) in phy_to_ioc() argument
1048 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in phy_to_ioc()
1096 struct sas_phy *phy) in _transport_get_expander_phy_error_log() argument
1178 phy_error_log_request->phy_identifier = phy->number; in _transport_get_expander_phy_error_log()
1185 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_get_expander_phy_error_log()
1197 ioc->name, (unsigned long long)phy->identify.sas_address, in _transport_get_expander_phy_error_log()
1198 phy->number)); in _transport_get_expander_phy_error_log()
1236 phy->invalid_dword_count = in _transport_get_expander_phy_error_log()
1238 phy->running_disparity_error_count = in _transport_get_expander_phy_error_log()
1240 phy->loss_of_dword_sync_count = in _transport_get_expander_phy_error_log()
1242 phy->phy_reset_problem_count = in _transport_get_expander_phy_error_log()
1270 _transport_get_linkerrors(struct sas_phy *phy) in _transport_get_linkerrors() argument
1272 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_get_linkerrors()
1279 phy->identify.sas_address) == NULL) { in _transport_get_linkerrors()
1285 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_get_linkerrors()
1286 return _transport_get_expander_phy_error_log(ioc, phy); in _transport_get_linkerrors()
1290 phy->number))) { in _transport_get_linkerrors()
1299 ioc->name, phy->number, in _transport_get_linkerrors()
1303 phy->invalid_dword_count = le32_to_cpu(phy_pg1.InvalidDwordCount); in _transport_get_linkerrors()
1304 phy->running_disparity_error_count = in _transport_get_linkerrors()
1306 phy->loss_of_dword_sync_count = in _transport_get_linkerrors()
1308 phy->phy_reset_problem_count = in _transport_get_linkerrors()
1410 struct sas_phy *phy, u8 phy_operation) in _transport_expander_phy_control() argument
1493 phy_control_request->phy_identifier = phy->number; in _transport_expander_phy_control()
1496 phy->minimum_linkrate << 4; in _transport_expander_phy_control()
1498 phy->maximum_linkrate << 4; in _transport_expander_phy_control()
1505 mpi_request->SASAddress = cpu_to_le64(phy->identify.sas_address); in _transport_expander_phy_control()
1531 ioc->name, (unsigned long long)phy->identify.sas_address, in _transport_expander_phy_control()
1532 phy->number, phy_operation)); in _transport_expander_phy_control()
1596 _transport_phy_reset(struct sas_phy *phy, int hard_reset) in _transport_phy_reset() argument
1598 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_reset()
1605 phy->identify.sas_address) == NULL) { in _transport_phy_reset()
1612 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_reset()
1613 return _transport_expander_phy_control(ioc, phy, in _transport_phy_reset()
1622 mpi_request.PhyNum = phy->number; in _transport_phy_reset()
1633 ioc->name, phy->number, le16_to_cpu(mpi_reply.IOCStatus), in _transport_phy_reset()
1648 _transport_phy_enable(struct sas_phy *phy, int enable) in _transport_phy_enable() argument
1650 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_enable()
1662 phy->identify.sas_address) == NULL) { in _transport_phy_enable()
1669 if (phy->identify.sas_address != ioc->sas_hba.sas_address) in _transport_phy_enable()
1670 return _transport_expander_phy_control(ioc, phy, in _transport_phy_enable()
1759 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1762 sas_iounit_pg1->PhyData[phy->number].PhyFlags in _transport_phy_enable()
1769 _transport_phy_reset(phy, 0); in _transport_phy_enable()
1786 _transport_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates) in _transport_phy_speed() argument
1788 struct MPT3SAS_ADAPTER *ioc = phy_to_ioc(phy); in _transport_phy_speed()
1800 phy->identify.sas_address) == NULL) { in _transport_phy_speed()
1807 rates->minimum_linkrate = phy->minimum_linkrate; in _transport_phy_speed()
1808 else if (rates->minimum_linkrate < phy->minimum_linkrate_hw) in _transport_phy_speed()
1809 rates->minimum_linkrate = phy->minimum_linkrate_hw; in _transport_phy_speed()
1812 rates->maximum_linkrate = phy->maximum_linkrate; in _transport_phy_speed()
1813 else if (rates->maximum_linkrate > phy->maximum_linkrate_hw) in _transport_phy_speed()
1814 rates->maximum_linkrate = phy->maximum_linkrate_hw; in _transport_phy_speed()
1817 if (phy->identify.sas_address != ioc->sas_hba.sas_address) { in _transport_phy_speed()
1818 phy->minimum_linkrate = rates->minimum_linkrate; in _transport_phy_speed()
1819 phy->maximum_linkrate = rates->maximum_linkrate; in _transport_phy_speed()
1820 return _transport_expander_phy_control(ioc, phy, in _transport_phy_speed()
1853 if (phy->number != i) { in _transport_phy_speed()
1855 (ioc->sas_hba.phy[i].phy->minimum_linkrate + in _transport_phy_speed()
1856 (ioc->sas_hba.phy[i].phy->maximum_linkrate << 4)); in _transport_phy_speed()
1873 _transport_phy_reset(phy, 0); in _transport_phy_speed()
1877 phy->number)) { in _transport_phy_speed()
1878 phy->minimum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1880 phy->maximum_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()
1882 phy->negotiated_linkrate = _transport_convert_phy_link_rate( in _transport_phy_speed()