amd-xgbe: Fix Rx coalescing reporting
The Rx coalescing value is internally converted from usecs to a value that the hardware can use. When reporting the Rx coalescing value, this internal value is converted back to usecs. During the conversion from and back to usecs some rounding occurs. So, for example, when setting an Rx usec of 30, it will be reported as 29. Fix this reporting issue by keeping the original usec value and using that during reporting. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c635eaacbf
commit
4a57ebcc2c
@@ -702,6 +702,7 @@ void xgbe_init_rx_coalesce(struct xgbe_prv_data *pdata)
|
||||
DBGPR("-->xgbe_init_rx_coalesce\n");
|
||||
|
||||
pdata->rx_riwt = hw_if->usec_to_riwt(pdata, XGMAC_INIT_DMA_RX_USECS);
|
||||
pdata->rx_usecs = XGMAC_INIT_DMA_RX_USECS;
|
||||
pdata->rx_frames = XGMAC_INIT_DMA_RX_FRAMES;
|
||||
|
||||
hw_if->config_rx_coalesce(pdata);
|
||||
|
Reference in New Issue
Block a user