Lines Matching refs:resp_data

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