Lines Matching full:rc
89 int rc; in efx_bootcfg_sector_info() local
114 rc = EINVAL; in efx_bootcfg_sector_info()
128 rc = EINVAL; in efx_bootcfg_sector_info()
138 rc = ENOTSUP; in efx_bootcfg_sector_info()
159 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_bootcfg_sector_info()
160 return (rc); in efx_bootcfg_sector_info()
184 efx_rc_t rc; in efx_dhcp_verify() local
205 rc = ENOSPC; in efx_dhcp_verify()
212 rc = ENOSPC; in efx_dhcp_verify()
222 rc = EINVAL; in efx_dhcp_verify()
236 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_verify()
238 return (rc); in efx_dhcp_verify()
253 efx_rc_t rc = 0; in efx_dhcp_walk_tags() local
263 rc = efx_dhcp_walk_tags(tagpp, buffer_sizep, in efx_dhcp_walk_tags()
265 if (rc == 0) { in efx_dhcp_walk_tags()
275 while (rc == 0) { in efx_dhcp_walk_tags()
279 rc = ENOSPC; in efx_dhcp_walk_tags()
287 rc = ENOENT; in efx_dhcp_walk_tags()
293 rc = ENOSPC; in efx_dhcp_walk_tags()
302 rc = ENOSPC; in efx_dhcp_walk_tags()
311 rc = ENOENT; in efx_dhcp_walk_tags()
320 return (rc); in efx_dhcp_walk_tags()
327 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_walk_tags()
329 return (rc); in efx_dhcp_walk_tags()
345 efx_rc_t rc; in efx_dhcp_find_tag() local
349 rc = efx_dhcp_walk_tags(&tagp, &len, opt); in efx_dhcp_find_tag()
350 if (rc == 0) { in efx_dhcp_find_tag()
356 } else if (rc != ENOENT) { in efx_dhcp_find_tag()
360 return (rc); in efx_dhcp_find_tag()
363 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_find_tag()
365 return (rc); in efx_dhcp_find_tag()
380 efx_rc_t rc; in efx_dhcp_find_end() local
384 rc = efx_dhcp_walk_tags(&endp, &len, EFX_DHCP_END); in efx_dhcp_find_end()
385 if (rc == 0) in efx_dhcp_find_end()
387 else if (rc != ENOENT) in efx_dhcp_find_end()
390 return (rc); in efx_dhcp_find_end()
393 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_find_end()
395 return (rc); in efx_dhcp_find_end()
409 efx_rc_t rc; in efx_dhcp_delete_tag() local
419 rc = EINVAL; in efx_dhcp_delete_tag()
423 rc = efx_dhcp_walk_tags(&startp, &len, opt); in efx_dhcp_delete_tag()
424 if (rc != 0) in efx_dhcp_delete_tag()
435 rc = efx_dhcp_walk_tags(&encapp, &len, in efx_dhcp_delete_tag()
437 if (rc != 0) in efx_dhcp_delete_tag()
454 rc = EINVAL; in efx_dhcp_delete_tag()
459 rc = EINVAL; in efx_dhcp_delete_tag()
475 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_delete_tag()
477 return (rc); in efx_dhcp_delete_tag()
512 efx_rc_t rc; in efx_dhcp_add_tag() local
522 rc = EINVAL; in efx_dhcp_add_tag()
527 rc = EINVAL; in efx_dhcp_add_tag()
532 rc = EINVAL; in efx_dhcp_add_tag()
538 rc = efx_dhcp_walk_tags(&endp, &available_space, EFX_DHCP_END); in efx_dhcp_add_tag()
539 if (rc != 0) in efx_dhcp_add_tag()
545 rc = efx_dhcp_walk_tags(&searchp, &search_size, in efx_dhcp_add_tag()
547 if (rc == 0) { in efx_dhcp_add_tag()
552 rc = efx_dhcp_walk_tags(&searchp, &search_size, in efx_dhcp_add_tag()
554 if (rc != ENOENT) { in efx_dhcp_add_tag()
555 rc = EINVAL; in efx_dhcp_add_tag()
563 rc = E2BIG; in efx_dhcp_add_tag()
570 } else if (rc == ENOENT) { in efx_dhcp_add_tag()
577 rc = efx_dhcp_walk_tags(&searchp, &search_size, in efx_dhcp_add_tag()
579 if (rc != ENOENT) { in efx_dhcp_add_tag()
580 rc = EINVAL; in efx_dhcp_add_tag()
595 rc = ENOMEM; in efx_dhcp_add_tag()
634 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_add_tag()
636 return (rc); in efx_dhcp_add_tag()
652 efx_rc_t rc; in efx_dhcp_update_tag() local
659 rc = EINVAL; in efx_dhcp_update_tag()
664 rc = EINVAL; in efx_dhcp_update_tag()
669 rc = EINVAL; in efx_dhcp_update_tag()
679 rc = efx_dhcp_walk_tags(&endp, &available_space, in efx_dhcp_update_tag()
681 if (rc != 0) in efx_dhcp_update_tag()
685 rc = EINVAL; in efx_dhcp_update_tag()
695 rc = efx_dhcp_walk_tags(&encapp, &following_encap, in efx_dhcp_update_tag()
697 if (rc != 0) in efx_dhcp_update_tag()
706 rc = E2BIG; in efx_dhcp_update_tag()
744 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_dhcp_update_tag()
746 return (rc); in efx_dhcp_update_tag()
766 efx_rc_t rc; in efx_bootcfg_copy_sector() local
770 rc = ENOSPC; in efx_bootcfg_copy_sector()
775 rc = efx_dhcp_verify(sector, sector_length, in efx_bootcfg_copy_sector()
779 if (rc != 0) in efx_bootcfg_copy_sector()
785 rc = ENOENT; in efx_bootcfg_copy_sector()
791 if (rc != 0 || used_bytes == 0) { in efx_bootcfg_copy_sector()
819 rc = ENOSPC; in efx_bootcfg_copy_sector()
848 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_bootcfg_copy_sector()
850 return (rc); in efx_bootcfg_copy_sector()
864 efx_rc_t rc; in efx_bootcfg_read() local
869 rc = ENOSPC; in efx_bootcfg_read()
878 rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, &partn_length); in efx_bootcfg_read()
879 if (rc != 0) in efx_bootcfg_read()
883 rc = efx_bootcfg_sector_info(enp, sector_number, in efx_bootcfg_read()
885 if (rc != 0) in efx_bootcfg_read()
889 rc = EINVAL; in efx_bootcfg_read()
898 rc = EFBIG; in efx_bootcfg_read()
911 rc = ENOMEM; in efx_bootcfg_read()
917 if ((rc = efx_nvram_rw_start(enp, EFX_NVRAM_BOOTROM_CFG, NULL)) != 0) in efx_bootcfg_read()
920 if ((rc = efx_nvram_read_chunk(enp, EFX_NVRAM_BOOTROM_CFG, in efx_bootcfg_read()
926 if ((rc = efx_nvram_rw_finish(enp, EFX_NVRAM_BOOTROM_CFG, NULL)) != 0) in efx_bootcfg_read()
930 rc = efx_dhcp_verify(payload, sector_length, in efx_bootcfg_read()
932 if (rc != 0 || used_bytes == 0) { in efx_bootcfg_read()
961 rc = ENOSPC; in efx_bootcfg_read()
1006 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_bootcfg_read()
1008 return (rc); in efx_bootcfg_read()
1023 efx_rc_t rc; in efx_bootcfg_write() local
1032 rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, &partn_length); in efx_bootcfg_write()
1033 if (rc != 0) in efx_bootcfg_write()
1037 rc = efx_bootcfg_sector_info(enp, sector_number, in efx_bootcfg_write()
1039 if (rc != 0) in efx_bootcfg_write()
1047 rc = EFBIG; in efx_bootcfg_write()
1051 if ((rc = efx_dhcp_verify(data, size, &used_bytes)) != 0) in efx_bootcfg_write()
1061 rc = ENOENT; in efx_bootcfg_write()
1067 rc = ENOSPC; in efx_bootcfg_write()
1078 rc = ENOMEM; in efx_bootcfg_write()
1082 rc = efx_nvram_rw_start(enp, EFX_NVRAM_BOOTROM_CFG, NULL); in efx_bootcfg_write()
1083 if (rc != 0) in efx_bootcfg_write()
1087 rc = efx_nvram_read_chunk(enp, EFX_NVRAM_BOOTROM_CFG, 0, in efx_bootcfg_write()
1089 if (rc != 0) in efx_bootcfg_write()
1102 if ((rc = efx_nvram_erase(enp, EFX_NVRAM_BOOTROM_CFG)) != 0) in efx_bootcfg_write()
1105 if ((rc = efx_nvram_write_chunk(enp, EFX_NVRAM_BOOTROM_CFG, in efx_bootcfg_write()
1109 if ((rc = efx_nvram_rw_finish(enp, EFX_NVRAM_BOOTROM_CFG, NULL)) != 0) in efx_bootcfg_write()
1143 EFSYS_PROBE1(fail1, efx_rc_t, rc); in efx_bootcfg_write()
1145 return (rc); in efx_bootcfg_write()