Lines Matching refs:resp_data

22 static void sas_host_smp_discover(struct sas_ha_struct *sas_ha, u8 *resp_data,  in sas_host_smp_discover()  argument
29 resp_data[2] = SMP_RESP_NO_PHY; in sas_host_smp_discover()
32 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_host_smp_discover()
35 resp_data[9] = phy_id; in sas_host_smp_discover()
36 resp_data[13] = phy->negotiated_linkrate; 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()
40 resp_data[40] = (phy->minimum_linkrate << 4) | in sas_host_smp_discover()
42 resp_data[41] = (phy->maximum_linkrate << 4) | in sas_host_smp_discover()
50 resp_data[12] = rphy->identify.device_type << 4; in sas_host_smp_discover()
51 resp_data[14] = rphy->identify.initiator_port_protocols; in sas_host_smp_discover()
52 resp_data[15] = rphy->identify.target_port_protocols; 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
124 resp_data[2] = SMP_RESP_FUNC_UNK; in sas_host_smp_write_gpio()
132 resp_data[2] = SMP_RESP_FUNC_FAILED; in sas_host_smp_write_gpio()
135 resp_data[2] = SMP_RESP_FUNC_ACC; 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
148 resp_data[2] = SMP_RESP_NO_PHY; in sas_report_phy_sata()
152 resp_data[2] = SMP_RESP_PHY_NO_SATA; in sas_report_phy_sata()
163 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_report_phy_sata()
164 resp_data[9] = phy_id; in sas_report_phy_sata()
165 memcpy(resp_data + 16, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_report_phy_sata()
174 u8 *dst = resp_data + 24 + i, *src = in sas_report_phy_sata()
185 enum sas_linkrate max, u8 *resp_data) in sas_phy_control() argument
193 resp_data[2] = SMP_RESP_NO_PHY; in sas_phy_control()
209 resp_data[2] = SMP_RESP_PHY_UNK_OP; in sas_phy_control()
218 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_phy_control()
223 resp_data[2] = SMP_RESP_FUNC_FAILED; in sas_phy_control()
225 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_phy_control()
231 u8 *req_data = NULL, *resp_data = NULL, *buf; in sas_smp_host_handler() local
250 resp_data = kzalloc(max(blk_rq_bytes(rsp), 128U), GFP_KERNEL); in sas_smp_host_handler()
252 if (!req_data || !resp_data) { in sas_smp_host_handler()
271 resp_data[0] = SMP_RESPONSE; in sas_smp_host_handler()
272 resp_data[1] = req_data[1]; in sas_smp_host_handler()
273 resp_data[2] = SMP_RESP_FUNC_UNK; in sas_smp_host_handler()
279 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_smp_host_handler()
280 resp_data[9] = sas_ha->num_phys; in sas_smp_host_handler()
286 resp_data[2] = SMP_RESP_FUNC_ACC; in sas_smp_host_handler()
287 memcpy(resp_data + 12, shost->hostt->name, in sas_smp_host_handler()
289 memcpy(resp_data + 20, "libsas virt phy", 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()
335 resp_data[2] = SMP_RESP_INV_FRM_LEN; 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()
360 resp_data); in sas_smp_host_handler()
374 memcpy(buf, resp_data, blk_rq_bytes(rsp)); in sas_smp_host_handler()
381 kfree(resp_data); in sas_smp_host_handler()