Lines Matching refs:resp_data

19 static void sas_host_smp_discover(struct sas_ha_struct *sas_ha, u8 *resp_data,  in sas_host_smp_discover()  argument
26 resp_data[2] = SMP_RESP_NO_PHY; in sas_host_smp_discover()
29 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_host_smp_discover()
32 resp_data[9] = phy_id; in sas_host_smp_discover()
33 resp_data[13] = phy->negotiated_linkrate; in sas_host_smp_discover()
34 memcpy(resp_data + 16, sas_ha->sas_addr, SAS_ADDR_SIZE); in sas_host_smp_discover()
35 memcpy(resp_data + 24, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_host_smp_discover()
37 resp_data[40] = (phy->minimum_linkrate << 4) | in sas_host_smp_discover()
39 resp_data[41] = (phy->maximum_linkrate << 4) | in sas_host_smp_discover()
47 resp_data[12] = rphy->identify.device_type << 4; in sas_host_smp_discover()
48 resp_data[14] = rphy->identify.initiator_port_protocols; in sas_host_smp_discover()
49 resp_data[15] = rphy->identify.target_port_protocols; in sas_host_smp_discover()
113 static int sas_host_smp_write_gpio(struct sas_ha_struct *sas_ha, u8 *resp_data, in sas_host_smp_write_gpio() argument
121 resp_data[2] = SMP_RESP_FUNC_UNK; in sas_host_smp_write_gpio()
129 resp_data[2] = SMP_RESP_FUNC_FAILED; in sas_host_smp_write_gpio()
132 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_host_smp_write_gpio()
137 static void sas_report_phy_sata(struct sas_ha_struct *sas_ha, u8 *resp_data, in sas_report_phy_sata() argument
145 resp_data[2] = SMP_RESP_NO_PHY; in sas_report_phy_sata()
149 resp_data[2] = SMP_RESP_PHY_NO_SATA; in sas_report_phy_sata()
160 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_report_phy_sata()
161 resp_data[9] = phy_id; in sas_report_phy_sata()
162 memcpy(resp_data + 16, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_report_phy_sata()
171 u8 *dst = resp_data + 24 + i, *src = in sas_report_phy_sata()
182 enum sas_linkrate max, u8 *resp_data) in sas_phy_control() argument
190 resp_data[2] = SMP_RESP_NO_PHY; in sas_phy_control()
206 resp_data[2] = SMP_RESP_PHY_UNK_OP; in sas_phy_control()
215 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_phy_control()
220 resp_data[2] = SMP_RESP_FUNC_FAILED; in sas_phy_control()
222 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_phy_control()
228 u8 *req_data, *resp_data; in sas_smp_host_handler() local
247 resp_data = kzalloc(max(job->reply_payload.payload_len, 128U), in sas_smp_host_handler()
249 if (!resp_data) in sas_smp_host_handler()
257 resp_data[0] = SMP_RESPONSE; in sas_smp_host_handler()
258 resp_data[1] = req_data[1]; in sas_smp_host_handler()
259 resp_data[2] = SMP_RESP_FUNC_UNK; in sas_smp_host_handler()
263 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_smp_host_handler()
264 resp_data[9] = sas_ha->num_phys; in sas_smp_host_handler()
269 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_smp_host_handler()
270 memcpy(resp_data + 12, shost->hostt->name, in sas_smp_host_handler()
272 memcpy(resp_data + 20, "libsas virt phy", in sas_smp_host_handler()
284 sas_host_smp_discover(sas_ha, resp_data, req_data[9]); in sas_smp_host_handler()
296 sas_report_phy_sata(sas_ha, resp_data, req_data[9]); in sas_smp_host_handler()
311 resp_data[2] = SMP_RESP_INV_FRM_LEN; in sas_smp_host_handler()
315 to_write = sas_host_smp_write_gpio(sas_ha, resp_data, req_data[2], in sas_smp_host_handler()
330 resp_data); in sas_smp_host_handler()
344 job->reply_payload.sg_cnt, resp_data, in sas_smp_host_handler()
349 kfree(resp_data); in sas_smp_host_handler()