Lines Matching refs:rrb

124 	struct clp_req_rsp_query_pci_grp *rrb;  in clp_query_pci_fngrp()  local
127 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fngrp()
128 if (!rrb) in clp_query_pci_fngrp()
131 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fngrp()
132 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fngrp()
133 rrb->request.hdr.cmd = CLP_QUERY_PCI_FNGRP; in clp_query_pci_fngrp()
134 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fngrp()
135 rrb->request.pfgid = pfgid; in clp_query_pci_fngrp()
137 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fngrp()
138 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_query_pci_fngrp()
139 clp_store_query_pci_fngrp(zdev, &rrb->response); in clp_query_pci_fngrp()
142 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fngrp()
145 clp_free_block(rrb); in clp_query_pci_fngrp()
191 struct clp_req_rsp_query_pci *rrb; in clp_query_pci_fn() local
194 rrb = clp_alloc_block(GFP_KERNEL); in clp_query_pci_fn()
195 if (!rrb) in clp_query_pci_fn()
198 memset(rrb, 0, sizeof(*rrb)); in clp_query_pci_fn()
199 rrb->request.hdr.len = sizeof(rrb->request); in clp_query_pci_fn()
200 rrb->request.hdr.cmd = CLP_QUERY_PCI_FN; in clp_query_pci_fn()
201 rrb->response.hdr.len = sizeof(rrb->response); in clp_query_pci_fn()
202 rrb->request.fh = zdev->fh; in clp_query_pci_fn()
204 rc = clp_req(rrb, CLP_LPS_PCI); in clp_query_pci_fn()
205 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_query_pci_fn()
206 rc = clp_store_query_pci_fn(zdev, &rrb->response); in clp_query_pci_fn()
209 rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid); in clp_query_pci_fn()
212 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fn()
216 clp_free_block(rrb); in clp_query_pci_fn()
232 struct clp_req_rsp_set_pci *rrb; in clp_set_pci_fn() local
237 rrb = clp_alloc_block(GFP_KERNEL); in clp_set_pci_fn()
238 if (!rrb) in clp_set_pci_fn()
245 memset(rrb, 0, sizeof(*rrb)); in clp_set_pci_fn()
246 rrb->request.hdr.len = sizeof(rrb->request); in clp_set_pci_fn()
247 rrb->request.hdr.cmd = CLP_SET_PCI_FN; in clp_set_pci_fn()
248 rrb->response.hdr.len = sizeof(rrb->response); in clp_set_pci_fn()
249 rrb->request.fh = zdev->fh; in clp_set_pci_fn()
250 rrb->request.oc = command; in clp_set_pci_fn()
251 rrb->request.ndas = nr_dma_as; in clp_set_pci_fn()
252 rrb->request.gisa = gisa; in clp_set_pci_fn()
254 rc = clp_req(rrb, CLP_LPS_PCI); in clp_set_pci_fn()
255 if (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY) { in clp_set_pci_fn()
261 } while (rrb->response.hdr.rsp == CLP_RC_SETPCIFN_BUSY); in clp_set_pci_fn()
263 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_set_pci_fn()
264 *fh = rrb->response.fh; in clp_set_pci_fn()
267 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_set_pci_fn()
269 rc = rrb->response.hdr.rsp; in clp_set_pci_fn()
271 clp_free_block(rrb); in clp_set_pci_fn()
277 struct clp_req_rsp_slpc_pci *rrb; in clp_setup_writeback_mio() local
281 rrb = clp_alloc_block(GFP_KERNEL); in clp_setup_writeback_mio()
282 if (!rrb) in clp_setup_writeback_mio()
285 memset(rrb, 0, sizeof(*rrb)); in clp_setup_writeback_mio()
286 rrb->request.hdr.len = sizeof(rrb->request); in clp_setup_writeback_mio()
287 rrb->request.hdr.cmd = CLP_SLPC; in clp_setup_writeback_mio()
288 rrb->response.hdr.len = sizeof(rrb->response); in clp_setup_writeback_mio()
290 rc = clp_req(rrb, CLP_LPS_PCI); in clp_setup_writeback_mio()
291 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) { in clp_setup_writeback_mio()
292 if (rrb->response.vwb) { in clp_setup_writeback_mio()
293 wb_bit_pos = rrb->response.mio_wb; in clp_setup_writeback_mio()
302 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_setup_writeback_mio()
305 clp_free_block(rrb); in clp_setup_writeback_mio()
337 static int clp_list_pci_req(struct clp_req_rsp_list_pci *rrb, in clp_list_pci_req() argument
342 memset(rrb, 0, sizeof(*rrb)); in clp_list_pci_req()
343 rrb->request.hdr.len = sizeof(rrb->request); in clp_list_pci_req()
344 rrb->request.hdr.cmd = CLP_LIST_PCI; in clp_list_pci_req()
346 rrb->response.hdr.len = CLP_BLK_SIZE - LIST_PCI_HDR_LEN; in clp_list_pci_req()
347 rrb->request.resume_token = *resume_token; in clp_list_pci_req()
350 rc = clp_req(rrb, CLP_LPS_PCI); in clp_list_pci_req()
351 if (rc || rrb->response.hdr.rsp != CLP_RC_OK) { in clp_list_pci_req()
353 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_list_pci_req()
357 update_uid_checking(rrb->response.uid_checking); in clp_list_pci_req()
358 WARN_ON_ONCE(rrb->response.entry_size != in clp_list_pci_req()
361 *nentries = (rrb->response.hdr.len - LIST_PCI_HDR_LEN) / in clp_list_pci_req()
362 rrb->response.entry_size; in clp_list_pci_req()
363 *resume_token = rrb->response.resume_token; in clp_list_pci_req()
368 static int clp_list_pci(struct clp_req_rsp_list_pci *rrb, void *data, in clp_list_pci() argument
375 rc = clp_list_pci_req(rrb, &resume_token, &nentries); in clp_list_pci()
379 cb(&rrb->response.fh_list[i], data); in clp_list_pci()
385 static int clp_find_pci(struct clp_req_rsp_list_pci *rrb, u32 fid, in clp_find_pci() argument
393 rc = clp_list_pci_req(rrb, &resume_token, &nentries); in clp_find_pci()
396 fh_list = rrb->response.fh_list; in clp_find_pci()
425 struct clp_req_rsp_list_pci *rrb; in clp_scan_pci_devices() local
428 rrb = clp_alloc_block(GFP_KERNEL); in clp_scan_pci_devices()
429 if (!rrb) in clp_scan_pci_devices()
432 rc = clp_list_pci(rrb, NULL, __clp_add); in clp_scan_pci_devices()
434 clp_free_block(rrb); in clp_scan_pci_devices()
443 struct clp_req_rsp_list_pci *rrb; in clp_refresh_fh() local
447 rrb = clp_alloc_block(GFP_NOWAIT); in clp_refresh_fh()
448 if (!rrb) in clp_refresh_fh()
451 rc = clp_find_pci(rrb, fid, &entry); in clp_refresh_fh()
455 clp_free_block(rrb); in clp_refresh_fh()
461 struct clp_req_rsp_list_pci *rrb; in clp_get_state() local
465 rrb = clp_alloc_block(GFP_ATOMIC); in clp_get_state()
466 if (!rrb) in clp_get_state()
469 rc = clp_find_pci(rrb, fid, &entry); in clp_get_state()
477 clp_free_block(rrb); in clp_get_state()