Lines Matching refs:sas_phy
25 static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
511 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_bytes_dmaed() local
518 sas_ha->notify_phy_event(sas_phy, PHYE_OOB_DONE); in hisi_sas_bytes_dmaed()
520 if (sas_phy->phy) { in hisi_sas_bytes_dmaed()
521 struct sas_phy *sphy = sas_phy->phy; in hisi_sas_bytes_dmaed()
523 sphy->negotiated_linkrate = sas_phy->linkrate; in hisi_sas_bytes_dmaed()
545 sas_phy->frame_rcvd_size = phy->frame_rcvd_size; in hisi_sas_bytes_dmaed()
546 sas_ha->notify_port_event(sas_phy, PORTE_BYTES_DMAED); in hisi_sas_bytes_dmaed()
715 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phyup_work() local
716 int phy_no = sas_phy->id; in hisi_sas_phyup_work()
726 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_linkreset_work() local
728 hisi_sas_control_phy(sas_phy, PHY_FUNC_LINK_RESET, NULL); in hisi_sas_linkreset_work()
751 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_init() local
758 sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0; in hisi_sas_phy_init()
759 sas_phy->class = SAS; in hisi_sas_phy_init()
760 sas_phy->iproto = SAS_PROTOCOL_ALL; in hisi_sas_phy_init()
761 sas_phy->tproto = 0; in hisi_sas_phy_init()
762 sas_phy->type = PHY_TYPE_PHYSICAL; in hisi_sas_phy_init()
763 sas_phy->role = PHY_ROLE_INITIATOR; in hisi_sas_phy_init()
764 sas_phy->oob_mode = OOB_NOT_CONNECTED; in hisi_sas_phy_init()
765 sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN; in hisi_sas_phy_init()
766 sas_phy->id = phy_no; in hisi_sas_phy_init()
767 sas_phy->sas_addr = &hisi_hba->sas_addr[0]; in hisi_sas_phy_init()
768 sas_phy->frame_rcvd = &phy->frame_rcvd[0]; in hisi_sas_phy_init()
769 sas_phy->ha = (struct sas_ha_struct *)hisi_hba->shost->hostdata; in hisi_sas_phy_init()
770 sas_phy->lldd_phy = phy; in hisi_sas_phy_init()
778 static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy) in hisi_sas_port_notify_formed() argument
780 struct sas_ha_struct *sas_ha = sas_phy->ha; in hisi_sas_port_notify_formed()
782 struct hisi_sas_phy *phy = sas_phy->lldd_phy; in hisi_sas_port_notify_formed()
783 struct asd_sas_port *sas_port = sas_phy->port; in hisi_sas_port_notify_formed()
892 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_set_linkrate() local
896 max = sas_phy->phy->maximum_linkrate; in hisi_sas_phy_set_linkrate()
900 min = sas_phy->phy->minimum_linkrate; in hisi_sas_phy_set_linkrate()
913 static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func, in hisi_sas_control_phy() argument
916 struct sas_ha_struct *sas_ha = sas_phy->ha; in hisi_sas_control_phy()
918 int phy_no = sas_phy->id; in hisi_sas_control_phy()
1155 struct asd_sas_phy *sas_phy; in hisi_sas_refresh_port_id() local
1164 list_for_each_entry(sas_phy, &sas_port->phy_list, port_phy_el) in hisi_sas_refresh_port_id()
1165 if (state & BIT(sas_phy->id)) { in hisi_sas_refresh_port_id()
1166 phy = sas_phy->lldd_phy; in hisi_sas_refresh_port_id()
1175 device->linkrate = phy->sas_phy.linkrate; in hisi_sas_refresh_port_id()
1192 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_rescan_topology() local
1193 struct asd_sas_port *sas_port = sas_phy->port; in hisi_sas_rescan_topology()
1196 if (!sas_phy->phy->enabled) in hisi_sas_rescan_topology()
1207 sas_ha->notify_port_event(sas_phy, in hisi_sas_rescan_topology()
1243 struct asd_sas_phy *sas_phy; in hisi_sas_send_ata_reset_each_phy() local
1249 list_for_each_entry(sas_phy, &sas_port->phy_list, port_phy_el) { in hisi_sas_send_ata_reset_each_phy()
1250 if (!(state & BIT(sas_phy->id))) in hisi_sas_send_ata_reset_each_phy()
1256 tmf_task.phy_id = sas_phy->id; in hisi_sas_send_ata_reset_each_phy()
1262 sas_phy->id, rc); in hisi_sas_send_ata_reset_each_phy()
1505 struct sas_phy *local_phy = sas_get_local_phy(device); in hisi_sas_debug_I_T_nexus_reset()
1510 struct asd_sas_phy *sas_phy = sas_ha->sas_phy[local_phy->number]; in hisi_sas_debug_I_T_nexus_reset() local
1511 struct hisi_sas_phy *phy = container_of(sas_phy, in hisi_sas_debug_I_T_nexus_reset()
1512 struct hisi_sas_phy, sas_phy); in hisi_sas_debug_I_T_nexus_reset()
1534 hisi_sas_phy_down(hisi_hba, sas_phy->id, 0); in hisi_sas_debug_I_T_nexus_reset()
1577 struct sas_phy *phy; in hisi_sas_lu_reset()
1859 static void hisi_sas_port_formed(struct asd_sas_phy *sas_phy) in hisi_sas_port_formed() argument
1861 hisi_sas_port_notify_formed(sas_phy); in hisi_sas_port_formed()
1864 static void hisi_sas_port_deformed(struct asd_sas_phy *sas_phy) in hisi_sas_port_deformed() argument
1890 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phy_down() local
1897 hisi_sas_port_notify_formed(sas_phy); in hisi_sas_phy_down()
1907 sas_ha->notify_phy_event(sas_phy, PHYE_LOSS_OF_SIGNAL); in hisi_sas_phy_down()
1908 sas_phy_disconnected(sas_phy); in hisi_sas_phy_down()
2316 sha->sas_phy = arr_phy; in hisi_sas_probe()
2337 sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy; in hisi_sas_probe()