Lines Matching refs:phy

82 	struct asd_sas_phy *phy;  in mvs_find_dev_mvi()  local
86 phy = container_of(sha->sas_port[i]->phy_list.next, in mvs_find_dev_mvi()
90 if (sha->sas_phy[j] == phy) in mvs_find_dev_mvi()
114 struct asd_sas_phy *phy; in mvs_find_dev_phyno() local
115 list_for_each_entry(phy, in mvs_find_dev_phyno()
119 if (sha->sas_phy[j] == phy) in mvs_find_dev_phyno()
237 struct mvs_phy *phy = &mvi->phy[i]; in mvs_bytes_dmaed() local
238 struct asd_sas_phy *sas_phy = &phy->sas_phy; in mvs_bytes_dmaed()
240 if (!phy->phy_attached) in mvs_bytes_dmaed()
243 if (!(phy->att_dev_info & PORT_DEV_TRGT_MASK) in mvs_bytes_dmaed()
244 && phy->phy_type & PORT_TYPE_SAS) { in mvs_bytes_dmaed()
251 if (sas_phy->phy) { in mvs_bytes_dmaed()
252 struct sas_phy *sphy = sas_phy->phy; in mvs_bytes_dmaed()
255 sphy->minimum_linkrate = phy->minimum_linkrate; in mvs_bytes_dmaed()
257 sphy->maximum_linkrate = phy->maximum_linkrate; in mvs_bytes_dmaed()
261 if (phy->phy_type & PORT_TYPE_SAS) { in mvs_bytes_dmaed()
264 id = (struct sas_identify_frame *)phy->frame_rcvd; in mvs_bytes_dmaed()
265 id->dev_type = phy->identify.device_type; in mvs_bytes_dmaed()
267 id->target_bits = phy->identify.target_port_protocols; in mvs_bytes_dmaed()
270 if (phy->att_dev_info & PORT_SSP_TRGT_MASK) { in mvs_bytes_dmaed()
274 } else if (phy->phy_type & PORT_TYPE_SATA) { in mvs_bytes_dmaed()
279 sas_phy->frame_rcvd_size = phy->frame_rcvd_size; in mvs_bytes_dmaed()
324 struct sas_phy *sphy = dev->phy; in mvs_task_prep_smp()
929 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_update_wideport() local
930 struct mvs_port *port = phy->port; in mvs_update_wideport()
951 struct mvs_phy *phy = &mvi->phy[i]; in mvs_is_phy_ready() local
952 struct mvs_port *port = phy->port; in mvs_is_phy_ready()
955 if ((tmp & PHY_READY_MASK) && !(phy->irq_status & PHYEV_POOF)) { in mvs_is_phy_ready()
957 phy->phy_attached = 1; in mvs_is_phy_ready()
962 if (phy->phy_type & PORT_TYPE_SAS) { in mvs_is_phy_ready()
967 } else if (phy->phy_type & PORT_TYPE_SATA) in mvs_is_phy_ready()
969 phy->port = NULL; in mvs_is_phy_ready()
970 phy->phy_attached = 0; in mvs_is_phy_ready()
971 phy->phy_type &= ~(PORT_TYPE_SAS | PORT_TYPE_SATA); in mvs_is_phy_ready()
1006 static void mvs_sig_remove_timer(struct mvs_phy *phy) in mvs_sig_remove_timer() argument
1008 if (phy->timer.function) in mvs_sig_remove_timer()
1009 del_timer(&phy->timer); in mvs_sig_remove_timer()
1010 phy->timer.function = NULL; in mvs_sig_remove_timer()
1015 struct mvs_phy *phy = &mvi->phy[i]; in mvs_update_phyinfo() local
1018 id = (struct sas_identify_frame *)phy->frame_rcvd; in mvs_update_phyinfo()
1021 phy->irq_status = MVS_CHIP_DISP->read_port_irq_stat(mvi, i); in mvs_update_phyinfo()
1022 phy->phy_status = mvs_is_phy_ready(mvi, i); in mvs_update_phyinfo()
1025 if (phy->phy_status) { in mvs_update_phyinfo()
1027 struct asd_sas_phy *sas_phy = &mvi->phy[i].sas_phy; in mvs_update_phyinfo()
1032 if (phy->phy_type & PORT_TYPE_SATA) { in mvs_update_phyinfo()
1033 phy->identify.target_port_protocols = SAS_PROTOCOL_STP; in mvs_update_phyinfo()
1034 if (mvs_is_sig_fis_received(phy->irq_status)) { in mvs_update_phyinfo()
1035 mvs_sig_remove_timer(phy); in mvs_update_phyinfo()
1036 phy->phy_attached = 1; in mvs_update_phyinfo()
1037 phy->att_dev_sas_addr = in mvs_update_phyinfo()
1041 phy->frame_rcvd_size = in mvs_update_phyinfo()
1051 phy->phy_attached = 0; in mvs_update_phyinfo()
1052 phy->phy_type &= ~PORT_TYPE_SATA; in mvs_update_phyinfo()
1055 } else if (phy->phy_type & PORT_TYPE_SAS in mvs_update_phyinfo()
1056 || phy->att_dev_info & PORT_SSP_INIT_MASK) { in mvs_update_phyinfo()
1057 phy->phy_attached = 1; in mvs_update_phyinfo()
1058 phy->identify.device_type = in mvs_update_phyinfo()
1059 phy->att_dev_info & PORT_DEV_TYPE_MASK; in mvs_update_phyinfo()
1061 if (phy->identify.device_type == SAS_END_DEVICE) in mvs_update_phyinfo()
1062 phy->identify.target_port_protocols = in mvs_update_phyinfo()
1064 else if (phy->identify.device_type != SAS_PHY_UNUSED) in mvs_update_phyinfo()
1065 phy->identify.target_port_protocols = in mvs_update_phyinfo()
1069 phy->frame_rcvd_size = in mvs_update_phyinfo()
1073 &phy->att_dev_sas_addr, SAS_ADDR_SIZE); in mvs_update_phyinfo()
1079 i + mvi->id * mvi->chip->n_phy, phy->att_dev_info); in mvs_update_phyinfo()
1081 i + mvi->id * mvi->chip->n_phy, phy->att_dev_sas_addr); in mvs_update_phyinfo()
1084 MVS_CHIP_DISP->write_port_irq_stat(mvi, i, phy->irq_status); in mvs_update_phyinfo()
1091 struct mvs_phy *phy = sas_phy->lldd_phy; in mvs_port_notify_formed() local
1112 phy->port = port; in mvs_port_notify_formed()
1114 if (phy->phy_type & PORT_TYPE_SAS) { in mvs_port_notify_formed()
1120 if (phy->att_dev_info & PORT_SSP_TRGT_MASK) { in mvs_port_notify_formed()
1132 struct mvs_phy *phy = sas_phy->lldd_phy; in mvs_port_notify_deformed() local
1133 struct mvs_info *mvi = phy->mvi; in mvs_port_notify_deformed()
1137 while (phy != &mvi->phy[phy_no]) { in mvs_port_notify_deformed()
1143 mvs_do_release_task(phy->mvi, phy_no, dev); in mvs_port_notify_deformed()
1211 struct ex_phy *phy; in mvs_dev_found_notify() local
1213 phy = &parent_dev->ex_dev.ex_phy[phy_id]; in mvs_dev_found_notify()
1214 if (SAS_ADDR(phy->attached_sas_addr) == in mvs_dev_found_notify()
1385 struct sas_phy *phy = sas_get_local_phy(dev); in mvs_debug_I_T_nexus_reset() local
1388 rc = sas_phy_reset(phy, reset_type); in mvs_debug_I_T_nexus_reset()
1389 sas_put_local_phy(phy); in mvs_debug_I_T_nexus_reset()
1843 struct mvs_phy *phy; in mvs_do_release_task() local
1847 phy = &mvi->phy[phy_no]; in mvs_do_release_task()
1848 port = phy->port; in mvs_do_release_task()
1881 static void mvs_phy_disconnected(struct mvs_phy *phy) in mvs_phy_disconnected() argument
1883 phy->phy_attached = 0; in mvs_phy_disconnected()
1884 phy->att_dev_info = 0; in mvs_phy_disconnected()
1885 phy->att_dev_sas_addr = 0; in mvs_phy_disconnected()
1896 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_work_queue() local
1897 struct asd_sas_phy *sas_phy = &phy->sas_phy; in mvs_work_queue()
1902 if (phy->phy_event & PHY_PLUG_OUT) { in mvs_work_queue()
1905 id = (struct sas_identify_frame *)phy->frame_rcvd; in mvs_work_queue()
1907 phy->phy_event &= ~PHY_PLUG_OUT; in mvs_work_queue()
1910 mvs_phy_disconnected(phy); in mvs_work_queue()
1923 phy->phy_event &= ~EXP_BRCT_CHG; in mvs_work_queue()
1954 struct mvs_phy *phy = (struct mvs_phy *)tphy; in mvs_sig_time_out() local
1955 struct mvs_info *mvi = phy->mvi; in mvs_sig_time_out()
1959 if (&mvi->phy[phy_no] == phy) { in mvs_sig_time_out()
1970 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_int_port() local
1972 phy->irq_status = MVS_CHIP_DISP->read_port_irq_stat(mvi, phy_no); in mvs_int_port()
1973 MVS_CHIP_DISP->write_port_irq_stat(mvi, phy_no, phy->irq_status); in mvs_int_port()
1977 phy->irq_status); in mvs_int_port()
1984 if (phy->irq_status & PHYEV_DCDR_ERR) { in mvs_int_port()
1989 if (phy->irq_status & PHYEV_POOF) { in mvs_int_port()
1991 if (!(phy->phy_event & PHY_PLUG_OUT)) { in mvs_int_port()
1992 int dev_sata = phy->phy_type & PORT_TYPE_SATA; in mvs_int_port()
1995 phy->phy_event |= PHY_PLUG_OUT; in mvs_int_port()
2013 if (phy->irq_status & PHYEV_COMWAKE) { in mvs_int_port()
2017 if (phy->timer.function == NULL) { in mvs_int_port()
2018 phy->timer.data = (unsigned long)phy; in mvs_int_port()
2019 phy->timer.function = mvs_sig_time_out; in mvs_int_port()
2020 phy->timer.expires = jiffies + 5*HZ; in mvs_int_port()
2021 add_timer(&phy->timer); in mvs_int_port()
2024 if (phy->irq_status & (PHYEV_SIG_FIS | PHYEV_ID_DONE)) { in mvs_int_port()
2025 phy->phy_status = mvs_is_phy_ready(mvi, phy_no); in mvs_int_port()
2027 if (phy->phy_status) { in mvs_int_port()
2030 if (phy->phy_type & PORT_TYPE_SATA) { in mvs_int_port()
2038 if (phy->phy_type & PORT_TYPE_SAS) { in mvs_int_port()
2045 if (phy->phy_event & PHY_PLUG_OUT) { in mvs_int_port()
2046 mvs_port_notify_formed(&phy->sas_phy, 0); in mvs_int_port()
2047 phy->phy_event &= ~PHY_PLUG_OUT; in mvs_int_port()
2053 } else if (phy->irq_status & PHYEV_BROAD_CH) { in mvs_int_port()