ef10_nvram.c (293814) | ef10_nvram.c (293817) |
---|---|
1/*- 2 * Copyright (c) 2012-2015 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-2015 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/hunt_nvram.c 293814 2016-01-13 07:25:51Z arybchik $"); | 32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_nvram.c 293817 2016-01-13 07:46:21Z arybchik $"); |
33 34#include "efx.h" 35#include "efx_impl.h" 36 37#if EFSYS_OPT_HUNTINGTON 38 39#if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM 40 --- 194 unchanged lines hidden (view full) --- 235fail1: 236 EFSYS_PROBE1(fail1, efx_rc_t, rc); 237 238 return (rc); 239} 240 241static efx_rc_t 242tlv_init_cursor( | 33 34#include "efx.h" 35#include "efx_impl.h" 36 37#if EFSYS_OPT_HUNTINGTON 38 39#if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM 40 --- 194 unchanged lines hidden (view full) --- 235fail1: 236 EFSYS_PROBE1(fail1, efx_rc_t, rc); 237 238 return (rc); 239} 240 241static efx_rc_t 242tlv_init_cursor( |
243 __in tlv_cursor_t *cursor, | 243 __out tlv_cursor_t *cursor, |
244 __in uint32_t *block, 245 __in uint32_t *limit) 246{ 247 cursor->block = block; 248 cursor->limit = limit; 249 250 cursor->current = cursor->block; 251 cursor->end = NULL; 252 253 return (tlv_validate_state(cursor)); 254} 255 256static efx_rc_t 257tlv_init_cursor_from_size( | 244 __in uint32_t *block, 245 __in uint32_t *limit) 246{ 247 cursor->block = block; 248 cursor->limit = limit; 249 250 cursor->current = cursor->block; 251 cursor->end = NULL; 252 253 return (tlv_validate_state(cursor)); 254} 255 256static efx_rc_t 257tlv_init_cursor_from_size( |
258 __in tlv_cursor_t *cursor, | 258 __out tlv_cursor_t *cursor, |
259 __in uint8_t *block, 260 __in size_t size) 261{ 262 uint32_t *limit; 263 limit = (uint32_t *)(block + size - sizeof (uint32_t)); 264 return (tlv_init_cursor(cursor, (uint32_t *)block, limit)); 265} 266 --- 1653 unchanged lines hidden --- | 259 __in uint8_t *block, 260 __in size_t size) 261{ 262 uint32_t *limit; 263 limit = (uint32_t *)(block + size - sizeof (uint32_t)); 264 return (tlv_init_cursor(cursor, (uint32_t *)block, limit)); 265} 266 --- 1653 unchanged lines hidden --- |