Lines Matching refs:rrb
118 struct clp_req_rsp_query_pci_grp *rrb; in clp_query_pci_fngrp() local
121 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fngrp()
122 if (!rrb) in clp_query_pci_fngrp()
125 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fngrp()
126 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fngrp()
127 rrb->request.hdr.cmd = CLP_QUERY_PCI_FNGRP; in clp_query_pci_fngrp()
128 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fngrp()
129 rrb->request.pfgid = pfgid; in clp_query_pci_fngrp()
131 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fngrp()
132 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_query_pci_fngrp()
133 clp_store_query_pci_fngrp(zdev, &rrb->response); in clp_query_pci_fngrp()
136 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fngrp()
139 clp_free_block(rrb); in clp_query_pci_fngrp()
179 struct clp_req_rsp_query_pci *rrb; in clp_query_pci_fn() local
182 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fn()
183 if (!rrb) in clp_query_pci_fn()
186 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fn()
187 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fn()
188 rrb->request.hdr.cmd = CLP_QUERY_PCI_FN; in clp_query_pci_fn()
189 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fn()
190 rrb->request.fh = fh; in clp_query_pci_fn()
192 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fn()
193 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_query_pci_fn()
194 rc = clp_store_query_pci_fn(zdev, &rrb->response); in clp_query_pci_fn()
197 rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid); in clp_query_pci_fn()
200 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fn()
204 clp_free_block(rrb); in clp_query_pci_fn()
247 struct clp_req_rsp_set_pci *rrb; in clp_set_pci_fn() local
250 rrb = clp_alloc_block(GFP_KERNEL); in clp_set_pci_fn()
251 if (!rrb) in clp_set_pci_fn()
255 memset(rrb, 0, sizeof(*rrb)); in clp_set_pci_fn()
256 rrb->request.hdr.len = sizeof(rrb->request); in clp_set_pci_fn()
257 rrb->request.hdr.cmd = CLP_SET_PCI_FN; in clp_set_pci_fn()
258 rrb->response.hdr.len = sizeof(rrb->response); in clp_set_pci_fn()
259 rrb->request.fh = *fh; in clp_set_pci_fn()
260 rrb->request.oc = command; in clp_set_pci_fn()
261 rrb->request.ndas = nr_dma_as; in clp_set_pci_fn()
263 rc = clp_req(rrb, CLP_LPS_PCI); in clp_set_pci_fn()
264 if (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY) { in clp_set_pci_fn()
270 } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY); in clp_set_pci_fn()
272 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_set_pci_fn()
273 *fh = rrb->response.fh; in clp_set_pci_fn()
276 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_set_pci_fn()
279 clp_free_block(rrb); in clp_set_pci_fn()
320 static int clp_list_pci(struct clp_req_rsp_list_pci *rrb, void *data, in clp_list_pci() argument
327 memset(rrb, 0, sizeof(*rrb)); in clp_list_pci()
328 rrb->request.hdr.len = sizeof(rrb->request); in clp_list_pci()
329 rrb->request.hdr.cmd = CLP_LIST_PCI; in clp_list_pci()
331 rrb->response.hdr.len = CLP_BLK_SIZE - LIST_PCI_HDR_LEN; in clp_list_pci()
332 rrb->request.resume_token = resume_token; in clp_list_pci()
335 rc = clp_req(rrb, CLP_LPS_PCI); in clp_list_pci()
336 if (rc || rrb->response.hdr.rsp != CLP_RC_OK) { in clp_list_pci()
338 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_list_pci()
343 update_uid_checking(rrb->response.uid_checking); in clp_list_pci()
344 WARN_ON_ONCE(rrb->response.entry_size != in clp_list_pci()
347 entries = (rrb->response.hdr.len - LIST_PCI_HDR_LEN) / in clp_list_pci()
348 rrb->response.entry_size; in clp_list_pci()
350 resume_token = rrb->response.resume_token; in clp_list_pci()
352 cb(&rrb->response.fh_list[i], data); in clp_list_pci()
386 struct clp_req_rsp_list_pci *rrb; in clp_scan_pci_devices() local
389 rrb = clp_alloc_block(GFP_KERNEL); in clp_scan_pci_devices()
390 if (!rrb) in clp_scan_pci_devices()
393 rc = clp_list_pci(rrb, NULL, __clp_add); in clp_scan_pci_devices()
395 clp_free_block(rrb); in clp_scan_pci_devices()
401 struct clp_req_rsp_list_pci *rrb; in clp_rescan_pci_devices() local
406 rrb = clp_alloc_block(GFP_KERNEL); in clp_rescan_pci_devices()
407 if (!rrb) in clp_rescan_pci_devices()
410 rc = clp_list_pci(rrb, NULL, __clp_add); in clp_rescan_pci_devices()
412 clp_free_block(rrb); in clp_rescan_pci_devices()
418 struct clp_req_rsp_list_pci *rrb; in clp_rescan_pci_devices_simple() local
421 rrb = clp_alloc_block(GFP_NOWAIT); in clp_rescan_pci_devices_simple()
422 if (!rrb) in clp_rescan_pci_devices_simple()
425 rc = clp_list_pci(rrb, NULL, __clp_update); in clp_rescan_pci_devices_simple()
427 clp_free_block(rrb); in clp_rescan_pci_devices_simple()
448 struct clp_req_rsp_list_pci *rrb; in clp_get_state() local
452 rrb = clp_alloc_block(GFP_ATOMIC); in clp_get_state()
453 if (!rrb) in clp_get_state()
456 rc = clp_list_pci(rrb, &sd, __clp_get_state); in clp_get_state()
460 clp_free_block(rrb); in clp_get_state()