Deleted Added
full compact
ef10_nvram.c (300607) ef10_nvram.c (300840)
1/*-
2 * Copyright (c) 2012-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 15 unchanged lines hidden (view full) ---

24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2012-2016 Solarflare Communications Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

--- 15 unchanged lines hidden (view full) ---

24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * The views and conclusions contained in the software and documentation are
27 * those of the authors and should not be interpreted as representing official
28 * policies, either expressed or implied, of the FreeBSD Project.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/ef10_nvram.c 300607 2016-05-24 12:16:57Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/ef10_nvram.c 300840 2016-05-27 11:44:40Z arybchik $");
33
34#include "efx.h"
35#include "efx_impl.h"
36
37#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
38
39#if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM
40

--- 857 unchanged lines hidden (view full) ---

898 __in uint32_t offset,
899 __out uint32_t *endp)
900{
901 // Read to end of partition
902 tlv_cursor_t cursor;
903 efx_rc_t rc;
904 uint32_t *segment_used;
905
33
34#include "efx.h"
35#include "efx_impl.h"
36
37#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
38
39#if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM
40

--- 857 unchanged lines hidden (view full) ---

898 __in uint32_t offset,
899 __out uint32_t *endp)
900{
901 // Read to end of partition
902 tlv_cursor_t cursor;
903 efx_rc_t rc;
904 uint32_t *segment_used;
905
906 _NOTE(ARGUNUSED(offset))
907
906 if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)bufferp,
907 buffer_size)) != 0) {
908 rc = EFAULT;
909 goto fail1;
910 }
911
912 segment_used = cursor.block;
913

--- 159 unchanged lines hidden (view full) ---

1073 __in size_t buffer_size,
1074 __in uint32_t offset,
1075 __in uint32_t length,
1076 __in uint32_t end)
1077{
1078 efx_rc_t rc;
1079 tlv_cursor_t cursor;
1080
908 if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)bufferp,
909 buffer_size)) != 0) {
910 rc = EFAULT;
911 goto fail1;
912 }
913
914 segment_used = cursor.block;
915

--- 159 unchanged lines hidden (view full) ---

1075 __in size_t buffer_size,
1076 __in uint32_t offset,
1077 __in uint32_t length,
1078 __in uint32_t end)
1079{
1080 efx_rc_t rc;
1081 tlv_cursor_t cursor;
1082
1083 _NOTE(ARGUNUSED(length, end))
1084
1081 if ((rc = tlv_init_cursor_at_offset(&cursor, (uint8_t *)bufferp,
1082 buffer_size, offset)) != 0) {
1083 goto fail1;
1084 }
1085
1086 if ((rc = tlv_delete(&cursor)) != 0)
1087 goto fail2;
1088

--- 1267 unchanged lines hidden ---
1085 if ((rc = tlv_init_cursor_at_offset(&cursor, (uint8_t *)bufferp,
1086 buffer_size, offset)) != 0) {
1087 goto fail1;
1088 }
1089
1090 if ((rc = tlv_delete(&cursor)) != 0)
1091 goto fail2;
1092

--- 1267 unchanged lines hidden ---