Lines Matching refs:sas_phy
20 static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
624 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_bytes_dmaed() local
631 !sas_phy->suspended) { in hisi_sas_bytes_dmaed()
637 sas_ha->notify_phy_event(sas_phy, PHYE_OOB_DONE); in hisi_sas_bytes_dmaed()
639 if (sas_phy->phy) { in hisi_sas_bytes_dmaed()
640 struct sas_phy *sphy = sas_phy->phy; in hisi_sas_bytes_dmaed()
642 sphy->negotiated_linkrate = sas_phy->linkrate; in hisi_sas_bytes_dmaed()
664 sas_phy->frame_rcvd_size = phy->frame_rcvd_size; in hisi_sas_bytes_dmaed()
665 sas_ha->notify_port_event(sas_phy, PORTE_BYTES_DMAED); in hisi_sas_bytes_dmaed()
710 struct sas_phy *local_phy; in hisi_sas_init_device()
866 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phyup_work() local
867 int phy_no = sas_phy->id; in hisi_sas_phyup_work()
878 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_linkreset_work() local
880 hisi_sas_control_phy(sas_phy, PHY_FUNC_LINK_RESET, NULL); in hisi_sas_linkreset_work()
905 int phy_no = phy->sas_phy.id; in hisi_sas_wait_phyup_timedout()
930 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_init() local
937 sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0; in hisi_sas_phy_init()
938 sas_phy->class = SAS; in hisi_sas_phy_init()
939 sas_phy->iproto = SAS_PROTOCOL_ALL; in hisi_sas_phy_init()
940 sas_phy->tproto = 0; in hisi_sas_phy_init()
941 sas_phy->type = PHY_TYPE_PHYSICAL; in hisi_sas_phy_init()
942 sas_phy->role = PHY_ROLE_INITIATOR; in hisi_sas_phy_init()
943 sas_phy->oob_mode = OOB_NOT_CONNECTED; in hisi_sas_phy_init()
944 sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN; in hisi_sas_phy_init()
945 sas_phy->id = phy_no; in hisi_sas_phy_init()
946 sas_phy->sas_addr = &hisi_hba->sas_addr[0]; in hisi_sas_phy_init()
947 sas_phy->frame_rcvd = &phy->frame_rcvd[0]; in hisi_sas_phy_init()
948 sas_phy->ha = (struct sas_ha_struct *)hisi_hba->shost->hostdata; in hisi_sas_phy_init()
949 sas_phy->lldd_phy = phy; in hisi_sas_phy_init()
963 struct asd_sas_phy *aphy = &phy->sas_phy; in hisi_sas_phy_enable()
964 struct sas_phy *sphy = aphy->phy; in hisi_sas_phy_enable()
983 static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy) in hisi_sas_port_notify_formed() argument
985 struct sas_ha_struct *sas_ha = sas_phy->ha; in hisi_sas_port_notify_formed()
987 struct hisi_sas_phy *phy = sas_phy->lldd_phy; in hisi_sas_port_notify_formed()
988 struct asd_sas_port *sas_port = sas_phy->port; in hisi_sas_port_notify_formed()
1104 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_set_linkrate() local
1111 max = sas_phy->phy->maximum_linkrate; in hisi_sas_phy_set_linkrate()
1115 min = sas_phy->phy->minimum_linkrate; in hisi_sas_phy_set_linkrate()
1122 sas_phy->phy->maximum_linkrate = max; in hisi_sas_phy_set_linkrate()
1123 sas_phy->phy->minimum_linkrate = min; in hisi_sas_phy_set_linkrate()
1133 static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func, in hisi_sas_control_phy() argument
1136 struct sas_ha_struct *sas_ha = sas_phy->ha; in hisi_sas_control_phy()
1138 int phy_no = sas_phy->id; in hisi_sas_control_phy()
1390 struct asd_sas_phy *sas_phy; in hisi_sas_refresh_port_id() local
1399 list_for_each_entry(sas_phy, &sas_port->phy_list, port_phy_el) in hisi_sas_refresh_port_id()
1400 if (state & BIT(sas_phy->id)) { in hisi_sas_refresh_port_id()
1401 phy = sas_phy->lldd_phy; in hisi_sas_refresh_port_id()
1410 device->linkrate = phy->sas_phy.linkrate; in hisi_sas_refresh_port_id()
1426 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_rescan_topology() local
1427 struct asd_sas_port *sas_port = sas_phy->port; in hisi_sas_rescan_topology()
1430 if (!sas_phy->phy->enabled) in hisi_sas_rescan_topology()
1441 sas_ha->notify_port_event(sas_phy, in hisi_sas_rescan_topology()
1476 struct asd_sas_phy *sas_phy; in hisi_sas_send_ata_reset_each_phy() local
1482 list_for_each_entry(sas_phy, &sas_port->phy_list, port_phy_el) { in hisi_sas_send_ata_reset_each_phy()
1483 if (!(state & BIT(sas_phy->id))) in hisi_sas_send_ata_reset_each_phy()
1489 tmf_task.phy_id = sas_phy->id; in hisi_sas_send_ata_reset_each_phy()
1495 sas_phy->id, rc); in hisi_sas_send_ata_reset_each_phy()
1757 struct sas_phy *local_phy = sas_get_local_phy(device); in hisi_sas_debug_I_T_nexus_reset()
1770 struct asd_sas_phy *sas_phy = in hisi_sas_debug_I_T_nexus_reset() local
1771 sas_ha->sas_phy[local_phy->number]; in hisi_sas_debug_I_T_nexus_reset()
1773 container_of(sas_phy, struct hisi_sas_phy, sas_phy); in hisi_sas_debug_I_T_nexus_reset()
1785 struct asd_sas_phy *sas_phy = in hisi_sas_debug_I_T_nexus_reset() local
1786 sas_ha->sas_phy[local_phy->number]; in hisi_sas_debug_I_T_nexus_reset()
1788 container_of(sas_phy, struct hisi_sas_phy, sas_phy); in hisi_sas_debug_I_T_nexus_reset()
1799 hisi_sas_phy_down(hisi_hba, sas_phy->id, 0); in hisi_sas_debug_I_T_nexus_reset()
1857 struct sas_phy *phy; in hisi_sas_lu_reset()
2164 static void hisi_sas_port_formed(struct asd_sas_phy *sas_phy) in hisi_sas_port_formed() argument
2166 hisi_sas_port_notify_formed(sas_phy); in hisi_sas_port_formed()
2183 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_disconnected() local
2184 struct sas_phy *sphy = sas_phy->phy; in hisi_sas_phy_disconnected()
2202 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_down() local
2209 hisi_sas_port_notify_formed(sas_phy); in hisi_sas_phy_down()
2219 sas_ha->notify_phy_event(sas_phy, PHYE_LOSS_OF_SIGNAL); in hisi_sas_phy_down()
2220 sas_phy_disconnected(sas_phy); in hisi_sas_phy_down()
2651 sha->sas_phy = arr_phy; in hisi_sas_probe()
2676 sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy; in hisi_sas_probe()