Lines Matching refs:rrb
122 struct clp_req_rsp_query_pci_grp *rrb; in clp_query_pci_fngrp() local
125 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fngrp()
126 if (!rrb) in clp_query_pci_fngrp()
129 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fngrp()
130 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fngrp()
131 rrb->request.hdr.cmd = CLP_QUERY_PCI_FNGRP; in clp_query_pci_fngrp()
132 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fngrp()
133 rrb->request.pfgid = pfgid; in clp_query_pci_fngrp()
135 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fngrp()
136 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_query_pci_fngrp()
137 clp_store_query_pci_fngrp(zdev, &rrb->response); in clp_query_pci_fngrp()
140 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fngrp()
143 clp_free_block(rrb); in clp_query_pci_fngrp()
189 struct clp_req_rsp_query_pci *rrb; in clp_query_pci_fn() local
192 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fn()
193 if (!rrb) in clp_query_pci_fn()
196 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fn()
197 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fn()
198 rrb->request.hdr.cmd = CLP_QUERY_PCI_FN; in clp_query_pci_fn()
199 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fn()
200 rrb->request.fh = zdev->fh; in clp_query_pci_fn()
202 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fn()
203 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_query_pci_fn()
204 rc = clp_store_query_pci_fn(zdev, &rrb->response); in clp_query_pci_fn()
207 rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid); in clp_query_pci_fn()
210 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fn()
214 clp_free_block(rrb); in clp_query_pci_fn()
230 struct clp_req_rsp_set_pci *rrb; in clp_set_pci_fn() local
234 rrb = clp_alloc_block(GFP_KERNEL); in clp_set_pci_fn()
235 if (!rrb) in clp_set_pci_fn()
239 memset(rrb, 0, sizeof(*rrb)); in clp_set_pci_fn()
240 rrb->request.hdr.len = sizeof(rrb->request); in clp_set_pci_fn()
241 rrb->request.hdr.cmd = CLP_SET_PCI_FN; in clp_set_pci_fn()
242 rrb->response.hdr.len = sizeof(rrb->response); in clp_set_pci_fn()
243 rrb->request.fh = zdev->fh; in clp_set_pci_fn()
244 rrb->request.oc = command; in clp_set_pci_fn()
245 rrb->request.ndas = nr_dma_as; in clp_set_pci_fn()
247 rc = clp_req(rrb, CLP_LPS_PCI); in clp_set_pci_fn()
248 if (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY) { in clp_set_pci_fn()
254 } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY); in clp_set_pci_fn()
256 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_set_pci_fn()
257 *fh = rrb->response.fh; in clp_set_pci_fn()
260 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_set_pci_fn()
262 rc = rrb->response.hdr.rsp; in clp_set_pci_fn()
264 clp_free_block(rrb); in clp_set_pci_fn()
270 struct clp_req_rsp_slpc_pci *rrb; in clp_setup_writeback_mio() local
274 rrb = clp_alloc_block(GFP_KERNEL); in clp_setup_writeback_mio()
275 if (!rrb) in clp_setup_writeback_mio()
278 memset(rrb, 0, sizeof(*rrb)); in clp_setup_writeback_mio()
279 rrb->request.hdr.len = sizeof(rrb->request); in clp_setup_writeback_mio()
280 rrb->request.hdr.cmd = CLP_SLPC; in clp_setup_writeback_mio()
281 rrb->response.hdr.len = sizeof(rrb->response); in clp_setup_writeback_mio()
283 rc = clp_req(rrb, CLP_LPS_PCI); in clp_setup_writeback_mio()
284 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_setup_writeback_mio()
285 if (rrb->response.vwb) { in clp_setup_writeback_mio()
286 wb_bit_pos = rrb->response.mio_wb; in clp_setup_writeback_mio()
295 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_setup_writeback_mio()
298 clp_free_block(rrb); in clp_setup_writeback_mio()
330 static int clp_list_pci_req(struct clp_req_rsp_list_pci *rrb, in clp_list_pci_req() argument
335 memset(rrb, 0, sizeof(*rrb)); in clp_list_pci_req()
336 rrb->request.hdr.len = sizeof(rrb->request); in clp_list_pci_req()
337 rrb->request.hdr.cmd = CLP_LIST_PCI; in clp_list_pci_req()
339 rrb->response.hdr.len = CLP_BLK_SIZE - LIST_PCI_HDR_LEN; in clp_list_pci_req()
340 rrb->request.resume_token = *resume_token; in clp_list_pci_req()
343 rc = clp_req(rrb, CLP_LPS_PCI); in clp_list_pci_req()
344 if (rc || rrb->response.hdr.rsp != CLP_RC_OK) { in clp_list_pci_req()
346 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_list_pci_req()
350 update_uid_checking(rrb->response.uid_checking); in clp_list_pci_req()
351 WARN_ON_ONCE(rrb->response.entry_size != in clp_list_pci_req()
354 *nentries = (rrb->response.hdr.len - LIST_PCI_HDR_LEN) / in clp_list_pci_req()
355 rrb->response.entry_size; in clp_list_pci_req()
356 *resume_token = rrb->response.resume_token; in clp_list_pci_req()
361 static int clp_list_pci(struct clp_req_rsp_list_pci *rrb, void *data, in clp_list_pci() argument
368 rc = clp_list_pci_req(rrb, &resume_token, &nentries); in clp_list_pci()
372 cb(&rrb->response.fh_list[i], data); in clp_list_pci()
378 static int clp_find_pci(struct clp_req_rsp_list_pci *rrb, u32 fid, in clp_find_pci() argument
386 rc = clp_list_pci_req(rrb, &resume_token, &nentries); in clp_find_pci()
389 fh_list = rrb->response.fh_list; in clp_find_pci()
418 struct clp_req_rsp_list_pci *rrb; in clp_scan_pci_devices() local
421 rrb = clp_alloc_block(GFP_KERNEL); in clp_scan_pci_devices()
422 if (!rrb) in clp_scan_pci_devices()
425 rc = clp_list_pci(rrb, NULL, __clp_add); in clp_scan_pci_devices()
427 clp_free_block(rrb); in clp_scan_pci_devices()
436 struct clp_req_rsp_list_pci *rrb; in clp_refresh_fh() local
440 rrb = clp_alloc_block(GFP_NOWAIT); in clp_refresh_fh()
441 if (!rrb) in clp_refresh_fh()
444 rc = clp_find_pci(rrb, fid, &entry); in clp_refresh_fh()
448 clp_free_block(rrb); in clp_refresh_fh()
454 struct clp_req_rsp_list_pci *rrb; in clp_get_state() local
458 rrb = clp_alloc_block(GFP_ATOMIC); in clp_get_state()
459 if (!rrb) in clp_get_state()
462 rc = clp_find_pci(rrb, fid, &entry); in clp_get_state()
470 clp_free_block(rrb); in clp_get_state()