Lines Matching refs:sas_ha
22 static void sas_host_smp_discover(struct sas_ha_struct *sas_ha, u8 *resp_data, in sas_host_smp_discover() argument
28 if (phy_id >= sas_ha->num_phys) { in sas_host_smp_discover()
34 phy = sas_ha->sas_phy[phy_id]->phy; in sas_host_smp_discover()
37 memcpy(resp_data + 16, sas_ha->sas_addr, SAS_ADDR_SIZE); in sas_host_smp_discover()
38 memcpy(resp_data + 24, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_host_smp_discover()
45 if (!sas_ha->sas_phy[phy_id]->port || in sas_host_smp_discover()
46 !sas_ha->sas_phy[phy_id]->port->port_dev) in sas_host_smp_discover()
49 rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy; in sas_host_smp_discover()
116 static int sas_host_smp_write_gpio(struct sas_ha_struct *sas_ha, u8 *resp_data, in sas_host_smp_write_gpio() argument
120 struct sas_internal *i = to_sas_internal(sas_ha->core.shost->transportt); in sas_host_smp_write_gpio()
128 written = i->dft->lldd_write_gpio(sas_ha, reg_type, reg_index, in sas_host_smp_write_gpio()
140 static void sas_report_phy_sata(struct sas_ha_struct *sas_ha, u8 *resp_data, in sas_report_phy_sata() argument
147 if (phy_id >= sas_ha->num_phys) { in sas_report_phy_sata()
154 if (!sas_ha->sas_phy[phy_id]->port) in sas_report_phy_sata()
157 rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy; in sas_report_phy_sata()
159 sas_ha->sas_phy[phy_id]->port->port_dev->frame_rcvd; in sas_report_phy_sata()
165 memcpy(resp_data + 16, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_report_phy_sata()
175 &sas_ha->sas_phy[phy_id]->port->port_dev->frame_rcvd[i]; in sas_report_phy_sata()
183 static void sas_phy_control(struct sas_ha_struct *sas_ha, u8 phy_id, in sas_phy_control() argument
188 to_sas_internal(sas_ha->core.shost->transportt); in sas_phy_control()
192 if (phy_id >= sas_ha->num_phys) { in sas_phy_control()
197 asd_phy = sas_ha->sas_phy[phy_id]; in sas_phy_control()
232 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost); in sas_smp_host_handler() local
280 resp_data[9] = sas_ha->num_phys; in sas_smp_host_handler()
305 sas_host_smp_discover(sas_ha, resp_data, req_data[9]); in sas_smp_host_handler()
321 sas_report_phy_sata(sas_ha, resp_data, req_data[9]); in sas_smp_host_handler()
339 to_write = sas_host_smp_write_gpio(sas_ha, resp_data, req_data[2], in sas_smp_host_handler()
358 sas_phy_control(sas_ha, req_data[9], req_data[10], in sas_smp_host_handler()