• Home
  • Raw
  • Download

Lines Matching refs:rrb

80 	struct clp_req_rsp_query_pci_grp *rrb;  in clp_query_pci_fngrp()  local
83 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fngrp()
84 if (!rrb) in clp_query_pci_fngrp()
87 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fngrp()
88 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fngrp()
89 rrb->request.hdr.cmd = CLP_QUERY_PCI_FNGRP; in clp_query_pci_fngrp()
90 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fngrp()
91 rrb->request.pfgid = pfgid; in clp_query_pci_fngrp()
93 rc = clp_instr(rrb); in clp_query_pci_fngrp()
94 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_query_pci_fngrp()
95 clp_store_query_pci_fngrp(zdev, &rrb->response); in clp_query_pci_fngrp()
98 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fngrp()
101 clp_free_block(rrb); in clp_query_pci_fngrp()
133 struct clp_req_rsp_query_pci *rrb; in clp_query_pci_fn() local
136 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fn()
137 if (!rrb) in clp_query_pci_fn()
140 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fn()
141 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fn()
142 rrb->request.hdr.cmd = CLP_QUERY_PCI_FN; in clp_query_pci_fn()
143 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fn()
144 rrb->request.fh = fh; in clp_query_pci_fn()
146 rc = clp_instr(rrb); in clp_query_pci_fn()
147 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_query_pci_fn()
148 rc = clp_store_query_pci_fn(zdev, &rrb->response); in clp_query_pci_fn()
151 if (rrb->response.pfgid) in clp_query_pci_fn()
152 rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid); in clp_query_pci_fn()
155 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fn()
159 clp_free_block(rrb); in clp_query_pci_fn()
201 struct clp_req_rsp_set_pci *rrb; in clp_set_pci_fn() local
204 rrb = clp_alloc_block(GFP_KERNEL); in clp_set_pci_fn()
205 if (!rrb) in clp_set_pci_fn()
209 memset(rrb, 0, sizeof(*rrb)); in clp_set_pci_fn()
210 rrb->request.hdr.len = sizeof(rrb->request); in clp_set_pci_fn()
211 rrb->request.hdr.cmd = CLP_SET_PCI_FN; in clp_set_pci_fn()
212 rrb->response.hdr.len = sizeof(rrb->response); in clp_set_pci_fn()
213 rrb->request.fh = *fh; in clp_set_pci_fn()
214 rrb->request.oc = command; in clp_set_pci_fn()
215 rrb->request.ndas = nr_dma_as; in clp_set_pci_fn()
217 rc = clp_instr(rrb); in clp_set_pci_fn()
218 if (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY) { in clp_set_pci_fn()
224 } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY); in clp_set_pci_fn()
226 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_set_pci_fn()
227 *fh = rrb->response.fh; in clp_set_pci_fn()
230 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_set_pci_fn()
233 clp_free_block(rrb); in clp_set_pci_fn()
268 static int clp_list_pci(struct clp_req_rsp_list_pci *rrb, in clp_list_pci() argument
275 memset(rrb, 0, sizeof(*rrb)); in clp_list_pci()
276 rrb->request.hdr.len = sizeof(rrb->request); in clp_list_pci()
277 rrb->request.hdr.cmd = CLP_LIST_PCI; in clp_list_pci()
279 rrb->response.hdr.len = CLP_BLK_SIZE - LIST_PCI_HDR_LEN; in clp_list_pci()
280 rrb->request.resume_token = resume_token; in clp_list_pci()
283 rc = clp_instr(rrb); in clp_list_pci()
284 if (rc || rrb->response.hdr.rsp != CLP_RC_OK) { in clp_list_pci()
286 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_list_pci()
291 WARN_ON_ONCE(rrb->response.entry_size != in clp_list_pci()
294 entries = (rrb->response.hdr.len - LIST_PCI_HDR_LEN) / in clp_list_pci()
295 rrb->response.entry_size; in clp_list_pci()
297 resume_token = rrb->response.resume_token; in clp_list_pci()
299 cb(&rrb->response.fh_list[i]); in clp_list_pci()
352 struct clp_req_rsp_list_pci *rrb; in clp_scan_pci_devices() local
355 rrb = clp_alloc_block(GFP_KERNEL); in clp_scan_pci_devices()
356 if (!rrb) in clp_scan_pci_devices()
359 rc = clp_list_pci(rrb, __clp_add); in clp_scan_pci_devices()
361 clp_free_block(rrb); in clp_scan_pci_devices()
367 struct clp_req_rsp_list_pci *rrb; in clp_rescan_pci_devices() local
370 rrb = clp_alloc_block(GFP_KERNEL); in clp_rescan_pci_devices()
371 if (!rrb) in clp_rescan_pci_devices()
374 rc = clp_list_pci(rrb, __clp_rescan); in clp_rescan_pci_devices()
376 clp_free_block(rrb); in clp_rescan_pci_devices()
382 struct clp_req_rsp_list_pci *rrb; in clp_rescan_pci_devices_simple() local
385 rrb = clp_alloc_block(GFP_NOWAIT); in clp_rescan_pci_devices_simple()
386 if (!rrb) in clp_rescan_pci_devices_simple()
389 rc = clp_list_pci(rrb, __clp_update); in clp_rescan_pci_devices_simple()
391 clp_free_block(rrb); in clp_rescan_pci_devices_simple()