kernel: bump 4.14 to 4.14.60 for 18.06
[openwrt/openwrt.git] / target / linux / apm821xx / patches-4.14 / 030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch
1 From 54e1b3004eb85f9317f6c4ceff2e097231c7f52a Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@gmail.com>
3 Date: Wed, 20 Dec 2017 22:11:22 +0100
4 Subject: [PATCH 1/3] net: ibm: emac: replace custom rgmii_mode_name with
5 phy_modes
6
7 The common phylib defines the same names (in lower-case).
8 Since rgmii_mode_name() is used only in one place and
9 for a "notice-level" printk, I think it can be replaced.
10
11 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
12 ---
13 drivers/net/ethernet/ibm/emac/rgmii.c | 20 +-------------------
14 1 file changed, 1 insertion(+), 19 deletions(-)
15
16 --- a/drivers/net/ethernet/ibm/emac/rgmii.c
17 +++ b/drivers/net/ethernet/ibm/emac/rgmii.c
18 @@ -59,24 +59,6 @@ static inline int rgmii_valid_mode(int p
19 phy_mode == PHY_MODE_RTBI;
20 }
21
22 -static inline const char *rgmii_mode_name(int mode)
23 -{
24 - switch (mode) {
25 - case PHY_MODE_RGMII:
26 - return "RGMII";
27 - case PHY_MODE_TBI:
28 - return "TBI";
29 - case PHY_MODE_GMII:
30 - return "GMII";
31 - case PHY_MODE_MII:
32 - return "MII";
33 - case PHY_MODE_RTBI:
34 - return "RTBI";
35 - default:
36 - BUG();
37 - }
38 -}
39 -
40 static inline u32 rgmii_mode_mask(int mode, int input)
41 {
42 switch (mode) {
43 @@ -115,7 +97,7 @@ int rgmii_attach(struct platform_device
44 out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input));
45
46 printk(KERN_NOTICE "%pOF: input %d in %s mode\n",
47 - ofdev->dev.of_node, input, rgmii_mode_name(mode));
48 + ofdev->dev.of_node, input, phy_modes(mode));
49
50 ++dev->users;
51