]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'stmmac-rework-speed-selection'
authorDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:08:36 +0000 (13:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:08:36 +0000 (13:08 -0400)
commit54d32f22d0985a6e883ecba163598c32b0e3f46e
treef93b8455ab7626c43d9e266ade6bf907fa733045
parent3b14a1315e2a7caad9d85d27b9cddc89da68d444
parent9a16b244172a81d4a525f8ccac07a21d51b2e563
Merge branch 'stmmac-rework-speed-selection'

Corentin Labbe says:

====================
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.

My first try was to create an adjust_link() in stmmac_ops but it duplicate some code

The current solution is to have direct value for 10/100/1000 and a mask for them.

The first 4 patchs fix some minor problem found in stmmac_adjust_link() and reported by Florian Fainelli in my previous serie.
The last patch is the real work.

This series is tested on cubieboard2 (dwmac1000) and opipc (dwmac-sun8i).

Changes since v3:
- Added the patch #4 "Convert old_link to bool" as suggested by Joe Perches
- Changed the speedmask

Changes since v2:
- Use true/false for new_state in patch #1
====================

Signed-off-by: David S. Miller <davem@davemloft.net>