mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sfxge(4): fix GET_RXDP_CONFIG usage for multi-PF on Medford
On Medford, using MC_CMD_GET_RXDP_CONFIG to query the RX end padding setting is in the ADMIN group, and so fails for unprivileged functions. In that case, assume the largest size supported by Medford hardware (256bytes) to prevent overrun. Submitted by: Andy Moreton <amoreton at solarflare.com> Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8933
This commit is contained in:
parent
5081d55d40
commit
ab72be51e2
1 changed files with 7 additions and 2 deletions
|
|
@ -289,8 +289,13 @@ medford_board_cfg(
|
|||
encp->enc_rx_buf_align_start = 1;
|
||||
|
||||
/* Get the RX DMA end padding alignment configuration */
|
||||
if ((rc = efx_mcdi_get_rxdp_config(enp, &end_padding)) != 0)
|
||||
goto fail11;
|
||||
if ((rc = efx_mcdi_get_rxdp_config(enp, &end_padding)) != 0) {
|
||||
if (rc != EACCES)
|
||||
goto fail11;
|
||||
|
||||
/* Assume largest tail padding size supported by hardware */
|
||||
end_padding = 256;
|
||||
}
|
||||
encp->enc_rx_buf_align_end = end_padding;
|
||||
|
||||
/* Alignment for WPTR updates */
|
||||
|
|
|
|||
Loading…
Reference in a new issue