]> git.baikalelectronics.ru Git - kernel.git/commit
amd-xgbe: Simplify calculation and setting of queue fifos
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 30 Sep 2015 13:53:03 +0000 (08:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 10:23:25 +0000 (03:23 -0700)
commit2a0b298a7c0b66ec0912a78ac9a129815f99416c
tree8f9850a37ebedf39dc6645eb3d9cf1d912bb388c
parent99a7e888fa2bd31a29d9b37ad2feb5efd14fb7fc
amd-xgbe: Simplify calculation and setting of queue fifos

The calculation of the Tx and Rx fifo sizes can be calculated rather
than hardcoded in a switch statement. Additionally, the per-queue fifo
sizes can be calculated rather than hardcoded using if/else if statements
that can possibly underutilize the available fifo area.

Change the code to calculate the fifo sizes and the per-queue fifo sizes
to simplify the code and make best use of the available fifo.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-dev.c
drivers/net/ethernet/amd/xgbe/xgbe.h