Lines Matching refs:phy_no
148 int phy_no; in hisi_sas_stop_phys() local
150 for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) in hisi_sas_stop_phys()
151 hisi_sas_phy_enable(hisi_hba, phy_no, 0); in hisi_sas_stop_phys()
602 static void hisi_sas_bytes_dmaed(struct hisi_hba *hisi_hba, int phy_no, in hisi_sas_bytes_dmaed() argument
605 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_bytes_dmaed()
784 int phy_no; in hisi_sas_dev_found() local
786 phy_no = sas_find_attached_phy_id(&parent_dev->ex_dev, device); in hisi_sas_dev_found()
787 if (phy_no < 0) { in hisi_sas_dev_found()
792 rc = phy_no; in hisi_sas_dev_found()
850 int phy_no = sas_phy->id; in hisi_sas_phyup_work_common() local
854 hisi_hba->hw->sl_notify_ssp(hisi_hba, phy_no); in hisi_sas_phyup_work_common()
855 hisi_sas_bytes_dmaed(hisi_hba, phy_no, GFP_KERNEL); in hisi_sas_phyup_work_common()
906 int phy_no = phy->sas_phy.id; in hisi_sas_wait_phyup_timedout() local
908 dev_warn(dev, "phy%d wait phyup timeout, issuing link reset\n", phy_no); in hisi_sas_wait_phyup_timedout()
914 void hisi_sas_phy_oob_ready(struct hisi_hba *hisi_hba, int phy_no) in hisi_sas_phy_oob_ready() argument
916 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_phy_oob_ready()
920 dev_dbg(dev, "phy%d OOB ready\n", phy_no); in hisi_sas_phy_oob_ready()
938 phy_no, phy->wait_phyup_cnt); in hisi_sas_phy_oob_ready()
946 static void hisi_sas_phy_init(struct hisi_hba *hisi_hba, int phy_no) in hisi_sas_phy_init() argument
948 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_phy_init()
956 sas_phy->enabled = (phy_no < hisi_hba->n_phy) ? 1 : 0; in hisi_sas_phy_init()
964 sas_phy->id = phy_no; in hisi_sas_phy_init()
979 void hisi_sas_phy_enable(struct hisi_hba *hisi_hba, int phy_no, int enable) in hisi_sas_phy_enable() argument
981 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_phy_enable()
992 hisi_hba->hw->phy_start(hisi_hba, phy_no); in hisi_sas_phy_enable()
995 hisi_hba->hw->phy_disable(hisi_hba, phy_no); in hisi_sas_phy_enable()
1133 static int hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no, in hisi_sas_phy_set_linkrate() argument
1138 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_phy_set_linkrate()
1160 hisi_sas_phy_enable(hisi_hba, phy_no, 0); in hisi_sas_phy_set_linkrate()
1162 hisi_hba->hw->phy_set_linkrate(hisi_hba, phy_no, &_r); in hisi_sas_phy_set_linkrate()
1163 hisi_sas_phy_enable(hisi_hba, phy_no, 1); in hisi_sas_phy_set_linkrate()
1177 int phy_no = sas_phy->id; in hisi_sas_control_phy() local
1186 hisi_hba->hw->phy_hard_reset(hisi_hba, phy_no); in hisi_sas_control_phy()
1190 hisi_sas_phy_enable(hisi_hba, phy_no, 0); in hisi_sas_control_phy()
1192 hisi_sas_phy_enable(hisi_hba, phy_no, 1); in hisi_sas_control_phy()
1196 hisi_sas_phy_enable(hisi_hba, phy_no, 0); in hisi_sas_control_phy()
1200 ret = hisi_sas_phy_set_linkrate(hisi_hba, phy_no, funcdata); in hisi_sas_control_phy()
1205 hisi_hba->hw->get_events(hisi_hba, phy_no); in hisi_sas_control_phy()
1218 phy_no, func); in hisi_sas_control_phy()
1327 int phy_no; in hisi_sas_rescan_topology() local
1329 for (phy_no = 0; phy_no < hisi_hba->n_phy; phy_no++) { in hisi_sas_rescan_topology()
1330 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_rescan_topology()
1339 if (state & BIT(phy_no)) { in hisi_sas_rescan_topology()
1351 hisi_sas_phy_down(hisi_hba, phy_no, 0, GFP_KERNEL); in hisi_sas_rescan_topology()
1945 void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy, in hisi_sas_phy_down() argument
1948 struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no]; in hisi_sas_phy_down()
1954 hisi_sas_bytes_dmaed(hisi_hba, phy_no, gfp_flags); in hisi_sas_phy_down()
1961 dev_info(dev, "ignore flutter phy%d down\n", phy_no); in hisi_sas_phy_down()