Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159357712
D4910.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D4910.diff
View Options
Index: head/sys/dev/sfxge/common/efx_impl.h
===================================================================
--- head/sys/dev/sfxge/common/efx_impl.h
+++ head/sys/dev/sfxge/common/efx_impl.h
@@ -480,7 +480,6 @@
#if EFSYS_OPT_DIAG
efx_rc_t (*envo_test)(efx_nic_t *);
#endif /* EFSYS_OPT_DIAG */
- efx_rc_t (*envo_size)(efx_nic_t *, efx_nvram_type_t, size_t *);
efx_rc_t (*envo_get_version)(efx_nic_t *, efx_nvram_type_t,
uint32_t *, uint16_t *);
efx_rc_t (*envo_rw_start)(efx_nic_t *, efx_nvram_type_t, size_t *);
@@ -495,6 +494,7 @@
efx_rc_t (*envo_type_to_partn)(efx_nic_t *, efx_nvram_type_t,
uint32_t *);
+ efx_rc_t (*envo_partn_size)(efx_nic_t *, uint32_t, size_t *);
} efx_nvram_ops_t;
#endif /* EFSYS_OPT_NVRAM */
Index: head/sys/dev/sfxge/common/efx_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c
+++ head/sys/dev/sfxge/common/efx_nvram.c
@@ -42,7 +42,6 @@
#if EFSYS_OPT_DIAG
falcon_nvram_test, /* envo_test */
#endif /* EFSYS_OPT_DIAG */
- falcon_nvram_size, /* envo_size */
falcon_nvram_get_version, /* envo_get_version */
falcon_nvram_rw_start, /* envo_rw_start */
falcon_nvram_read_chunk, /* envo_read_chunk */
@@ -51,6 +50,7 @@
falcon_nvram_rw_finish, /* envo_rw_finish */
falcon_nvram_set_version, /* envo_set_version */
falcon_nvram_type_to_partn, /* envo_type_to_partn */
+ falcon_nvram_partn_size, /* envo_partn_size */
};
#endif /* EFSYS_OPT_FALCON */
@@ -61,7 +61,6 @@
#if EFSYS_OPT_DIAG
siena_nvram_test, /* envo_test */
#endif /* EFSYS_OPT_DIAG */
- siena_nvram_size, /* envo_size */
siena_nvram_get_version, /* envo_get_version */
siena_nvram_rw_start, /* envo_rw_start */
siena_nvram_read_chunk, /* envo_read_chunk */
@@ -70,6 +69,7 @@
siena_nvram_rw_finish, /* envo_rw_finish */
siena_nvram_set_version, /* envo_set_version */
siena_nvram_type_to_partn, /* envo_type_to_partn */
+ siena_nvram_partn_size, /* envo_partn_size */
};
#endif /* EFSYS_OPT_SIENA */
@@ -80,7 +80,6 @@
#if EFSYS_OPT_DIAG
ef10_nvram_test, /* envo_test */
#endif /* EFSYS_OPT_DIAG */
- ef10_nvram_size, /* envo_size */
ef10_nvram_get_version, /* envo_get_version */
ef10_nvram_rw_start, /* envo_rw_start */
ef10_nvram_read_chunk, /* envo_read_chunk */
@@ -89,6 +88,7 @@
ef10_nvram_rw_finish, /* envo_rw_finish */
ef10_nvram_set_version, /* envo_set_version */
ef10_nvram_type_to_partn, /* envo_type_to_partn */
+ ef10_nvram_partn_size, /* envo_partn_size */
};
#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -178,6 +178,7 @@
__out size_t *sizep)
{
efx_nvram_ops_t *envop = enp->en_envop;
+ uint32_t partn;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -185,13 +186,19 @@
EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- if ((rc = envop->envo_size(enp, type, sizep)) != 0)
+ if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
+ if ((rc = envop->envo_partn_size(enp, partn, sizep)) != 0)
+ goto fail2;
+
return (0);
+fail2:
+ EFSYS_PROBE(fail2);
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ *sizep = 0;
return (rc);
}
Index: head/sys/dev/sfxge/common/hunt_impl.h
===================================================================
--- head/sys/dev/sfxge/common/hunt_impl.h
+++ head/sys/dev/sfxge/common/hunt_impl.h
@@ -370,12 +370,6 @@
__in boolean_t all_segments);
extern __checkReturn efx_rc_t
-ef10_nvram_partn_size(
- __in efx_nic_t *enp,
- __in uint32_t partn,
- __out size_t *sizep);
-
-extern __checkReturn efx_rc_t
ef10_nvram_partn_lock(
__in efx_nic_t *enp,
__in uint32_t partn);
@@ -421,12 +415,6 @@
#endif /* EFSYS_OPT_DIAG */
extern __checkReturn efx_rc_t
-ef10_nvram_size(
- __in efx_nic_t *enp,
- __in efx_nvram_type_t type,
- __out size_t *sizep);
-
-extern __checkReturn efx_rc_t
ef10_nvram_get_version(
__in efx_nic_t *enp,
__in efx_nvram_type_t type,
@@ -483,6 +471,12 @@
__in efx_nvram_type_t type,
__out uint32_t *partnp);
+extern __checkReturn efx_rc_t
+ef10_nvram_partn_size(
+ __in efx_nic_t *enp,
+ __in uint32_t partn,
+ __out size_t *sizep);
+
#endif /* EFSYS_OPT_NVRAM */
Index: head/sys/dev/sfxge/common/hunt_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_nvram.c
+++ head/sys/dev/sfxge/common/hunt_nvram.c
@@ -1709,33 +1709,6 @@
#endif /* EFSYS_OPT_DIAG */
__checkReturn efx_rc_t
-ef10_nvram_size(
- __in efx_nic_t *enp,
- __in efx_nvram_type_t type,
- __out size_t *sizep)
-{
- uint32_t partn;
- efx_rc_t rc;
-
- if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0)
- goto fail1;
-
- if ((rc = ef10_nvram_partn_size(enp, partn, sizep)) != 0)
- goto fail2;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- *sizep = 0;
-
- return (rc);
-}
-
- __checkReturn efx_rc_t
ef10_nvram_get_version(
__in efx_nic_t *enp,
__in efx_nvram_type_t type,
Index: head/sys/dev/sfxge/common/siena_impl.h
===================================================================
--- head/sys/dev/sfxge/common/siena_impl.h
+++ head/sys/dev/sfxge/common/siena_impl.h
@@ -156,12 +156,6 @@
#if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
extern __checkReturn efx_rc_t
-siena_nvram_partn_size(
- __in efx_nic_t *enp,
- __in uint32_t partn,
- __out size_t *sizep);
-
-extern __checkReturn efx_rc_t
siena_nvram_partn_lock(
__in efx_nic_t *enp,
__in uint32_t partn);
@@ -215,12 +209,6 @@
#endif /* EFSYS_OPT_DIAG */
extern __checkReturn efx_rc_t
-siena_nvram_size(
- __in efx_nic_t *enp,
- __in efx_nvram_type_t type,
- __out size_t *sizep);
-
-extern __checkReturn efx_rc_t
siena_nvram_get_subtype(
__in efx_nic_t *enp,
__in uint32_t partn,
@@ -277,6 +265,12 @@
__in efx_nvram_type_t type,
__out uint32_t *partnp);
+extern __checkReturn efx_rc_t
+siena_nvram_partn_size(
+ __in efx_nic_t *enp,
+ __in uint32_t partn,
+ __out size_t *sizep);
+
#endif /* EFSYS_OPT_NVRAM */
#if EFSYS_OPT_VPD
Index: head/sys/dev/sfxge/common/siena_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c
+++ head/sys/dev/sfxge/common/siena_nvram.c
@@ -291,32 +291,6 @@
#endif /* EFSYS_OPT_DIAG */
- __checkReturn efx_rc_t
-siena_nvram_size(
- __in efx_nic_t *enp,
- __in efx_nvram_type_t type,
- __out size_t *sizep)
-{
- uint32_t partn;
- efx_rc_t rc;
-
- if ((rc = siena_nvram_type_to_partn(enp, type, &partn)) != 0)
- goto fail1;
-
- if ((rc = siena_nvram_partn_size(enp, partn, sizep)) != 0)
- goto fail2;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- *sizep = 0;
-
- return (rc);
-}
#define SIENA_DYNAMIC_CFG_SIZE(_nitems) \
(sizeof (siena_mc_dynamic_config_hdr_t) + ((_nitems) * \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 6:11 AM (14 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33943666
Default Alt Text
D4910.diff (6 KB)
Attached To
Mode
D4910: sfxge: convert nvram size method to use partition id
Attached
Detach File
Event Timeline
Log In to Comment