From 05b29aa0cb6875e1d91eec5ba1949e8d0c1f2618 Mon Sep 17 00:00:00 2001 From: Madalin Bucur Date: Fri, 18 Aug 2017 11:35:24 +0300 Subject: net: phy: realtek: fix enabling of the TX-delay for RTL8211F The old logic always enabled the TX-delay when the phy-mode was set to PHY_INTERFACE_MODE_RGMII. With this patch we enable the TX delay for PHY_INTERFACE_MODE_RGMII_ID and PHY_INTERFACE_MODE_RGMII_TXID and disable it for PHY_INTERFACE_MODE_RGMII. Based on a similar change made in the Linux Realtek PHY driver by Martin Blumenstingl . Signed-off-by: Madalin Bucur Acked-by: Joe Hershberger Acked-by: York Sun --- drivers/net/phy/realtek.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 635acf5844..6d917f86f4 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -95,17 +95,21 @@ static int rtl8211f_config(struct phy_device *phydev) phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET); - if (phydev->interface == PHY_INTERFACE_MODE_RGMII) { - /* enable TXDLY */ - phy_write(phydev, MDIO_DEVAD_NONE, - MIIM_RTL8211F_PAGE_SELECT, 0xd08); - reg = phy_read(phydev, MDIO_DEVAD_NONE, 0x11); + phy_write(phydev, MDIO_DEVAD_NONE, + MIIM_RTL8211F_PAGE_SELECT, 0xd08); + reg = phy_read(phydev, MDIO_DEVAD_NONE, 0x11); + + /* enable TX-delay for rgmii-id and rgmii-txid, otherwise disable it */ + if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID || + phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) reg |= MIIM_RTL8211F_TX_DELAY; - phy_write(phydev, MDIO_DEVAD_NONE, 0x11, reg); - /* restore to default page 0 */ - phy_write(phydev, MDIO_DEVAD_NONE, - MIIM_RTL8211F_PAGE_SELECT, 0x0); - } + else + reg &= ~MIIM_RTL8211F_TX_DELAY; + + phy_write(phydev, MDIO_DEVAD_NONE, 0x11, reg); + /* restore to default page 0 */ + phy_write(phydev, MDIO_DEVAD_NONE, + MIIM_RTL8211F_PAGE_SELECT, 0x0); /* Set green LED for Link, yellow LED for Active */ phy_write(phydev, MDIO_DEVAD_NONE, -- cgit v1.2.3 From 0b1e58067202316680423a6aafa73a9828ee07cc Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 20 Aug 2017 22:40:01 -0400 Subject: net: nfs: Drop CONFIG_NFS_READ_SIZE In the general case, CONFIG_NFS_READ_SIZE is unchanged from the default of 1024. There are in fact no in-tree users that increase this size. Adjust the comment to reflect what could be done in the future in conjunction with CONFIG_IP_DEFRAG. Cc: Joe Hershberger Signed-off-by: Tom Rini Acked-by: Joe Hershberger --- net/nfs.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/net/nfs.h b/net/nfs.h index 70a1a6d554..1aa06e8fb9 100644 --- a/net/nfs.h +++ b/net/nfs.h @@ -36,16 +36,13 @@ #define NFSERR_ISDIR 21 #define NFSERR_INVAL 22 -/* Block size used for NFS read accesses. A RPC reply packet (including all +/* + * Block size used for NFS read accesses. A RPC reply packet (including all * headers) must fit within a single Ethernet frame to avoid fragmentation. - * However, if CONFIG_IP_DEFRAG is set, the config file may want to use a - * bigger value. In any case, most NFS servers are optimized for a power of 2. + * However, if CONFIG_IP_DEFRAG is set, a bigger value could be used. In any + * case, most NFS servers are optimized for a power of 2. */ -#ifdef CONFIG_NFS_READ_SIZE -#define NFS_READ_SIZE CONFIG_NFS_READ_SIZE -#else -#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */ -#endif +#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */ /* Values for Accept State flag on RPC answers (See: rfc1831) */ enum rpc_accept_stat { -- cgit v1.2.3 From 10710b4ec5f3fbe5857564d835bf5f3be34d5ccc Mon Sep 17 00:00:00 2001 From: Madalin Bucur Date: Fri, 18 Aug 2017 11:37:20 +0300 Subject: armv8: ls1043/ls1046aqds: add support for RGMII_TXID Signed-off-by: Madalin Bucur Acked-by: Joe Hershberger Acked-by: York Sun --- board/freescale/ls1043aqds/eth.c | 1 + board/freescale/ls1046aqds/eth.c | 1 + 2 files changed, 2 insertions(+) diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c index bf263761f1..3411bed276 100644 --- a/board/freescale/ls1043aqds/eth.c +++ b/board/freescale/ls1043aqds/eth.c @@ -476,6 +476,7 @@ int board_eth_init(bd_t *bis) } break; case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_TXID: if (i == FM1_DTSEC3) mdio_mux[i] = EMI1_RGMII1; else if (i == FM1_DTSEC4) diff --git a/board/freescale/ls1046aqds/eth.c b/board/freescale/ls1046aqds/eth.c index 046db11261..95be02a1b2 100644 --- a/board/freescale/ls1046aqds/eth.c +++ b/board/freescale/ls1046aqds/eth.c @@ -397,6 +397,7 @@ int board_eth_init(bd_t *bis) } break; case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_TXID: if (i == FM1_DTSEC3) mdio_mux[i] = EMI1_RGMII1; else if (i == FM1_DTSEC4) -- cgit v1.2.3 From e4691564ccd366618934e70b7f621df7e1c5d70b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 29 Aug 2017 18:44:37 +0200 Subject: net: fix typos %s/Desriptor/Descriptor/g Signed-off-by: Heinrich Schuchardt Acked-by: Joe Hershberger --- drivers/net/fsl_mcdmafec.c | 2 +- drivers/net/mcffec.c | 2 +- drivers/net/mvneta.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c index 26c714cc04..2d89cea4a3 100644 --- a/drivers/net/fsl_mcdmafec.c +++ b/drivers/net/fsl_mcdmafec.c @@ -391,7 +391,7 @@ static int fec_init(struct eth_device *dev, bd_t * bd) /* Set Opcode/Pause Duration Register */ fecp->opd = 0x00010020; - /* Setup Buffers and Buffer Desriptors */ + /* Setup Buffers and Buffer Descriptors */ info->rxIdx = 0; info->txIdx = 0; diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 39a6747320..ebcbed941a 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -465,7 +465,7 @@ int fec_init(struct eth_device *dev, bd_t * bd) fecp->emrbr = PKT_MAXBLR_SIZE; /* - * Setup Buffers and Buffer Desriptors + * Setup Buffers and Buffer Descriptors */ info->rxIdx = 0; info->txIdx = 0; diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 50577d7f07..f1be9521a9 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -540,7 +540,7 @@ static void mvneta_txq_pend_desc_add(struct mvneta_port *pp, u32 val; /* Only 255 descriptors can be added at once ; Assume caller - * process TX desriptors in quanta less than 256 + * process TX descriptors in quanta less than 256 */ val = pend_desc; mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); -- cgit v1.2.3