Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/sfxge/common/efx_sram.c
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | efx_sram_buf_tbl_set( | ||||
efsys_dma_addr_t addr; | efsys_dma_addr_t addr; | ||||
efx_oword_t oword; | efx_oword_t oword; | ||||
unsigned int count; | unsigned int count; | ||||
efx_rc_t rc; | efx_rc_t rc; | ||||
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | ||||
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); | EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); | ||||
#if EFSYS_OPT_HUNTINGTON | #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD | ||||
if (enp->en_family == EFX_FAMILY_HUNTINGTON) { | if (enp->en_family == EFX_FAMILY_HUNTINGTON || | ||||
enp->en_family == EFX_FAMILY_MEDFORD) { | |||||
/* | /* | ||||
* FIXME: the efx_sram_buf_tbl_*() functionality needs to be | * FIXME: the efx_sram_buf_tbl_*() functionality needs to be | ||||
* pulled inside the Falcon/Siena queue create/destroy code, | * pulled inside the Falcon/Siena queue create/destroy code, | ||||
* and then the original functions can be removed (see bug30834 | * and then the original functions can be removed (see bug30834 | ||||
* comment #1). But, for now, we just ensure that they are | * comment #1). But, for now, we just ensure that they are | ||||
* no-ops for Huntington, to allow bringing up existing drivers | * no-ops for EF10, to allow bringing up existing drivers | ||||
* without modification. | * without modification. | ||||
*/ | */ | ||||
return (0); | return (0); | ||||
} | } | ||||
#endif /* EFSYS_OPT_HUNTINGTON */ | #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ | ||||
if (stop >= EFX_BUF_TBL_SIZE) { | if (stop >= EFX_BUF_TBL_SIZE) { | ||||
rc = EFBIG; | rc = EFBIG; | ||||
goto fail1; | goto fail1; | ||||
} | } | ||||
/* Add the entries into the buffer table */ | /* Add the entries into the buffer table */ | ||||
addr = EFSYS_MEM_ADDR(esmp); | addr = EFSYS_MEM_ADDR(esmp); | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
efx_oword_t oword; | efx_oword_t oword; | ||||
uint32_t start = id; | uint32_t start = id; | ||||
uint32_t stop = start + n; | uint32_t stop = start + n; | ||||
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); | ||||
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); | EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); | ||||
#if EFSYS_OPT_HUNTINGTON | #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD | ||||
if (enp->en_family == EFX_FAMILY_HUNTINGTON) { | if (enp->en_family == EFX_FAMILY_HUNTINGTON || | ||||
enp->en_family == EFX_FAMILY_MEDFORD) { | |||||
/* | /* | ||||
* FIXME: the efx_sram_buf_tbl_*() functionality needs to be | * FIXME: the efx_sram_buf_tbl_*() functionality needs to be | ||||
* pulled inside the Falcon/Siena queue create/destroy code, | * pulled inside the Falcon/Siena queue create/destroy code, | ||||
* and then the original functions can be removed (see bug30834 | * and then the original functions can be removed (see bug30834 | ||||
* comment #1). But, for now, we just ensure that they are | * comment #1). But, for now, we just ensure that they are | ||||
* no-ops for Huntington, to allow bringing up existing drivers | * no-ops for EF10, to allow bringing up existing drivers | ||||
* without modification. | * without modification. | ||||
*/ | */ | ||||
return; | return; | ||||
} | } | ||||
#endif /* EFSYS_OPT_HUNTINGTON */ | #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ | ||||
EFSYS_ASSERT3U(stop, <, EFX_BUF_TBL_SIZE); | EFSYS_ASSERT3U(stop, <, EFX_BUF_TBL_SIZE); | ||||
EFSYS_PROBE2(buf, uint32_t, start, uint32_t, stop - 1); | EFSYS_PROBE2(buf, uint32_t, start, uint32_t, stop - 1); | ||||
EFX_POPULATE_OWORD_4(oword, FRF_AZ_BUF_UPD_CMD, 0, | EFX_POPULATE_OWORD_4(oword, FRF_AZ_BUF_UPD_CMD, 0, | ||||
FRF_AZ_BUF_CLR_CMD, 1, FRF_AZ_BUF_CLR_END_ID, stop - 1, | FRF_AZ_BUF_CLR_CMD, 1, FRF_AZ_BUF_CLR_END_ID, stop - 1, | ||||
FRF_AZ_BUF_CLR_START_ID, start); | FRF_AZ_BUF_CLR_START_ID, start); | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |