Lines Matching refs:rc

19 static inline void zpci_err_clp(unsigned int rsp, int rc)  in zpci_err_clp()  argument
23 int rc; in zpci_err_clp() member
24 } __packed data = {rsp, rc}; in zpci_err_clp()
81 int rc; in clp_query_pci_fngrp() local
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()
98 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_query_pci_fngrp()
99 rc = -EIO; in clp_query_pci_fngrp()
102 return rc; in clp_query_pci_fngrp()
134 int rc; in clp_query_pci_fn() local
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()
149 if (rc) 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()
156 rc = -EIO; in clp_query_pci_fn()
160 return rc; in clp_query_pci_fn()
166 int rc; in clp_add_pci_device() local
177 rc = clp_query_pci_fn(zdev, fh); in clp_add_pci_device()
178 if (rc) in clp_add_pci_device()
186 rc = zpci_create_device(zdev); in clp_add_pci_device()
187 if (rc) in clp_add_pci_device()
193 return rc; in clp_add_pci_device()
202 int rc, retries = 100; in clp_set_pci_fn() local
217 rc = clp_instr(rrb); in clp_set_pci_fn()
226 if (!rc && rrb->response.hdr.rsp == CLP_RC_OK) in clp_set_pci_fn()
230 zpci_err_clp(rrb->response.hdr.rsp, rc); in clp_set_pci_fn()
231 rc = -EIO; in clp_set_pci_fn()
234 return rc; in clp_set_pci_fn()
240 int rc; in clp_enable_fh() local
242 rc = clp_set_pci_fn(&fh, nr_dma_as, CLP_SET_ENABLE_PCI_FN); in clp_enable_fh()
243 if (!rc) in clp_enable_fh()
247 zpci_dbg(3, "ena fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc); in clp_enable_fh()
248 return rc; in clp_enable_fh()
254 int rc; in clp_disable_fh() local
259 rc = clp_set_pci_fn(&fh, 0, CLP_SET_DISABLE_PCI_FN); in clp_disable_fh()
260 if (!rc) in clp_disable_fh()
264 zpci_dbg(3, "dis fid:%x, fh:%x, rc:%d\n", zdev->fid, zdev->fh, rc); in clp_disable_fh()
265 return rc; in clp_disable_fh()
272 int entries, i, rc; in clp_list_pci() local
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()
287 rc = -EIO; in clp_list_pci()
302 return rc; in clp_list_pci()
353 int rc; in clp_scan_pci_devices() local
359 rc = clp_list_pci(rrb, __clp_add); in clp_scan_pci_devices()
362 return rc; in clp_scan_pci_devices()
368 int rc; in clp_rescan_pci_devices() local
374 rc = clp_list_pci(rrb, __clp_rescan); in clp_rescan_pci_devices()
377 return rc; in clp_rescan_pci_devices()
383 int rc; in clp_rescan_pci_devices_simple() local
389 rc = clp_list_pci(rrb, __clp_update); in clp_rescan_pci_devices_simple()
392 return rc; in clp_rescan_pci_devices_simple()