]> git.baikalelectronics.ru Git - kernel.git/commit
net-next: stmmac: rework the speed selection
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Wed, 24 May 2017 07:16:47 +0000 (09:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:08:35 +0000 (13:08 -0400)
commit93091a847e22821873c735d1af9bfb8ed02aeeca
treef93b8455ab7626c43d9e266ade6bf907fa733045
parentfc600e8235610ffcdc84db0a3b2f36e1021619d8
net-next: stmmac: rework the speed selection

The current stmmac_adjust_link() part which handle speed have
some if (has_platform) code and my dwmac-sun8i will add more of them.

So we need to handle better speed selection.
Moreover the struct link member speed and port are hard to guess their
purpose. And their unique usage are to be combined for writing speed.

So this patch replace speed/port by simpler
speed10/speed100/speed1000/speed_mask variables.

In dwmac4_core_init and dwmac1000_core_init, port/speed value was used
directly without using the struct link. This patch convert also their
usage to speedxxx.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c