Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649186

[PATCH v3 0/5] net-next: stmmac: rework the speed selection

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 0/5] net-next: stmmac: rework the speed selection
Date 2017-05-24 09:30 +0200
Message-ID <tKyU2-7Df-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello

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 serie is tested on cubieboard2 (dwmac1000) and opipc (dwmac-sun8i).

Regards

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

Corentin Labbe (5):
  net: stmmac: Convert new_state to bool
  net: stmmac: Remove unnecessary parenthesis
  net: stmmac: use SPEED_xxx instead of raw value
  net: stmmac: Convert old_link to bool
  net: stmmac: rework the speed selection

 drivers/net/ethernet/stmicro/stmmac/common.h       |  8 ++--
 .../net/ethernet/stmicro/stmmac/dwmac1000_core.c   | 26 +++++++-----
 .../net/ethernet/stmicro/stmmac/dwmac100_core.c    |  6 ++-
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c  | 26 +++++++-----
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |  2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 47 ++++++++--------------
 6 files changed, 57 insertions(+), 58 deletions(-)

-- 
2.13.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] net-next: stmmac: rework the speed selection Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 1/5] net-next: stmmac: Convert new_state to bool Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 3/5] net-next: stmmac: use SPEED_xxx instead of raw value Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 4/5] net-next: stmmac: Convert old_link to bool Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200

csiph-web