Page MenuHomeFreeBSD

D4872.id12174.diff
No OneTemporary

D4872.id12174.diff

Index: head/sys/dev/sfxge/common/efx_vpd.c
===================================================================
--- head/sys/dev/sfxge/common/efx_vpd.c
+++ head/sys/dev/sfxge/common/efx_vpd.c
@@ -91,22 +91,22 @@
#endif /* EFSYS_OPT_SIENA */
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
-static efx_vpd_ops_t __efx_vpd_hunt_ops = {
- hunt_vpd_init, /* evpdo_init */
- hunt_vpd_size, /* evpdo_size */
- hunt_vpd_read, /* evpdo_read */
- hunt_vpd_verify, /* evpdo_verify */
- hunt_vpd_reinit, /* evpdo_reinit */
- hunt_vpd_get, /* evpdo_get */
- hunt_vpd_set, /* evpdo_set */
- hunt_vpd_next, /* evpdo_next */
- hunt_vpd_write, /* evpdo_write */
- hunt_vpd_fini, /* evpdo_fini */
+static efx_vpd_ops_t __efx_vpd_ef10_ops = {
+ ef10_vpd_init, /* evpdo_init */
+ ef10_vpd_size, /* evpdo_size */
+ ef10_vpd_read, /* evpdo_read */
+ ef10_vpd_verify, /* evpdo_verify */
+ ef10_vpd_reinit, /* evpdo_reinit */
+ ef10_vpd_get, /* evpdo_get */
+ ef10_vpd_set, /* evpdo_set */
+ ef10_vpd_next, /* evpdo_next */
+ ef10_vpd_write, /* evpdo_write */
+ ef10_vpd_fini, /* evpdo_fini */
};
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
__checkReturn efx_rc_t
efx_vpd_init(
@@ -134,10 +134,16 @@
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
- evpdop = (efx_vpd_ops_t *)&__efx_vpd_hunt_ops;
+ evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
+#if EFSYS_OPT_MEDFORD
+ case EFX_FAMILY_MEDFORD:
+ evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
+ break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;
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
@@ -758,48 +758,48 @@
#if EFSYS_OPT_VPD
extern __checkReturn efx_rc_t
-hunt_vpd_init(
+ef10_vpd_init(
__in efx_nic_t *enp);
extern __checkReturn efx_rc_t
-hunt_vpd_size(
+ef10_vpd_size(
__in efx_nic_t *enp,
__out size_t *sizep);
extern __checkReturn efx_rc_t
-hunt_vpd_read(
+ef10_vpd_read(
__in efx_nic_t *enp,
__out_bcount(size) caddr_t data,
__in size_t size);
extern __checkReturn efx_rc_t
-hunt_vpd_verify(
+ef10_vpd_verify(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size);
extern __checkReturn efx_rc_t
-hunt_vpd_reinit(
+ef10_vpd_reinit(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size);
extern __checkReturn efx_rc_t
-hunt_vpd_get(
+ef10_vpd_get(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
__inout efx_vpd_value_t *evvp);
extern __checkReturn efx_rc_t
-hunt_vpd_set(
+ef10_vpd_set(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
__in efx_vpd_value_t *evvp);
extern __checkReturn efx_rc_t
-hunt_vpd_next(
+ef10_vpd_next(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
@@ -807,13 +807,13 @@
__inout unsigned int *contp);
extern __checkReturn efx_rc_t
-hunt_vpd_write(
+ef10_vpd_write(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size);
extern void
-hunt_vpd_fini(
+ef10_vpd_fini(
__in efx_nic_t *enp);
#endif /* EFSYS_OPT_VPD */
Index: head/sys/dev/sfxge/common/hunt_vpd.c
===================================================================
--- head/sys/dev/sfxge/common/hunt_vpd.c
+++ head/sys/dev/sfxge/common/hunt_vpd.c
@@ -45,7 +45,7 @@
#include "ef10_tlv_layout.h"
__checkReturn efx_rc_t
-hunt_vpd_init(
+ef10_vpd_init(
__in efx_nic_t *enp)
{
caddr_t svpd;
@@ -54,7 +54,8 @@
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
pci_pf = enp->en_nic_cfg.enc_pf;
/*
@@ -98,13 +99,14 @@
}
__checkReturn efx_rc_t
-hunt_vpd_size(
+ef10_vpd_size(
__in efx_nic_t *enp,
__out size_t *sizep)
{
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
/*
* This function returns the total size the user should allocate
@@ -125,7 +127,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_read(
+ef10_vpd_read(
__in efx_nic_t *enp,
__out_bcount(size) caddr_t data,
__in size_t size)
@@ -135,7 +137,8 @@
uint32_t pci_pf;
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
pci_pf = enp->en_nic_cfg.enc_pf;
@@ -169,7 +172,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_verify(
+ef10_vpd_verify(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size)
@@ -182,12 +185,13 @@
unsigned int dcont;
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
/*
* Strictly you could take the view that dynamic vpd is optional.
* Instead, to conform more closely to the read/verify/reinit()
- * paradigm, we require dynamic vpd. hunt_vpd_reinit() will
+ * paradigm, we require dynamic vpd. ef10_vpd_reinit() will
* reinitialize it as required.
*/
if ((rc = efx_vpd_hunk_verify(data, size, NULL)) != 0)
@@ -243,7 +247,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_reinit(
+ef10_vpd_reinit(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size)
@@ -285,7 +289,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_get(
+ef10_vpd_get(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
@@ -295,7 +299,8 @@
uint8_t length;
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
/* Attempt to satisfy the request from svpd first */
if (enp->en_arch.ef10.ena_svpd_length > 0) {
@@ -329,7 +334,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_set(
+ef10_vpd_set(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
@@ -337,7 +342,8 @@
{
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
/* If the provided (tag,keyword) exists in svpd, then it is readonly */
if (enp->en_arch.ef10.ena_svpd_length > 0) {
@@ -366,7 +372,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_next(
+ef10_vpd_next(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size,
@@ -379,7 +385,7 @@
}
__checkReturn efx_rc_t
-hunt_vpd_write(
+ef10_vpd_write(
__in efx_nic_t *enp,
__in_bcount(size) caddr_t data,
__in size_t size)
@@ -388,7 +394,8 @@
uint32_t pci_pf;
efx_rc_t rc;
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
pci_pf = enp->en_nic_cfg.enc_pf;
@@ -416,10 +423,11 @@
}
void
-hunt_vpd_fini(
+ef10_vpd_fini(
__in efx_nic_t *enp)
{
- EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
+ EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
+ enp->en_family == EFX_FAMILY_MEDFORD);
if (enp->en_arch.ef10.ena_svpd_length > 0) {
EFSYS_KMEM_FREE(enp->en_esip, enp->en_arch.ef10.ena_svpd_length,

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 18, 1:13 AM (5 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29865768
Default Alt Text
D4872.id12174.diff (7 KB)

Event Timeline