All of lore.kernel.org
 help / color / mirror / Atom feed
From: Iyappan Subramanian <isubramanian@apm.com>
To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, patches@apm.com,
	linux@armlinux.org.uk, Iyappan Subramanian <isubramanian@apm.com>
Subject: [PATCH net-next 06/10] drivers: net: xgene: Change port init sequence
Date: Fri, 29 Jul 2016 17:33:59 -0700	[thread overview]
Message-ID: <1469838843-19943-7-git-send-email-isubramanian@apm.com> (raw)
In-Reply-To: <1469838843-19943-1-git-send-email-isubramanian@apm.com>

This patch rearranges the port initialization sequence as recommended by
hardware specification.  This patch also removes, mac_init() call from
xgene_enet_link_state(), as it was not required.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Tested-by: Fushen Chen <fchen@apm.com>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
index 9c6ad0d..d53c053 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
@@ -216,12 +216,12 @@ static void xgene_xgmac_init(struct xgene_enet_pdata *pdata)
 	data |= CFG_RSIF_FPBUFF_TIMEOUT_EN;
 	xgene_enet_wr_csr(pdata, XG_RSIF_CONFIG_REG_ADDR, data);
 
-	xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX);
-	xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0);
 	xgene_enet_rd_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, &data);
 	data |= BIT(12);
 	xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, data);
 	xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_1_ADDR, 0x82);
+	xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0);
+	xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX);
 }
 
 static void xgene_xgmac_rx_enable(struct xgene_enet_pdata *pdata)
@@ -366,7 +366,6 @@ static void xgene_enet_link_state(struct work_struct *work)
 	if (link_status) {
 		if (!netif_carrier_ok(ndev)) {
 			netif_carrier_on(ndev);
-			xgene_xgmac_init(pdata);
 			xgene_xgmac_rx_enable(pdata);
 			xgene_xgmac_tx_enable(pdata);
 			netdev_info(ndev, "Link is Up - 10Gbps\n");
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: isubramanian@apm.com (Iyappan Subramanian)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 06/10] drivers: net: xgene: Change port init sequence
Date: Fri, 29 Jul 2016 17:33:59 -0700	[thread overview]
Message-ID: <1469838843-19943-7-git-send-email-isubramanian@apm.com> (raw)
In-Reply-To: <1469838843-19943-1-git-send-email-isubramanian@apm.com>

This patch rearranges the port initialization sequence as recommended by
hardware specification.  This patch also removes, mac_init() call from
xgene_enet_link_state(), as it was not required.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Tested-by: Fushen Chen <fchen@apm.com>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
index 9c6ad0d..d53c053 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
@@ -216,12 +216,12 @@ static void xgene_xgmac_init(struct xgene_enet_pdata *pdata)
 	data |= CFG_RSIF_FPBUFF_TIMEOUT_EN;
 	xgene_enet_wr_csr(pdata, XG_RSIF_CONFIG_REG_ADDR, data);
 
-	xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX);
-	xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0);
 	xgene_enet_rd_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, &data);
 	data |= BIT(12);
 	xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, data);
 	xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_1_ADDR, 0x82);
+	xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0);
+	xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX);
 }
 
 static void xgene_xgmac_rx_enable(struct xgene_enet_pdata *pdata)
@@ -366,7 +366,6 @@ static void xgene_enet_link_state(struct work_struct *work)
 	if (link_status) {
 		if (!netif_carrier_ok(ndev)) {
 			netif_carrier_on(ndev);
-			xgene_xgmac_init(pdata);
 			xgene_xgmac_rx_enable(pdata);
 			xgene_xgmac_tx_enable(pdata);
 			netdev_info(ndev, "Link is Up - 10Gbps\n");
-- 
1.9.1

  parent reply	other threads:[~2016-07-30  0:33 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-30  0:33 [PATCH net-next 00/10] Fix warning and issues Iyappan Subramanian
2016-07-30  0:33 ` Iyappan Subramanian
     [not found] ` <1469838843-19943-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2016-07-30  0:33   ` [PATCH net-next 01/10] drivers: net: xgene: Fix kbuild warning Iyappan Subramanian
2016-07-30  0:33     ` Iyappan Subramanian
2016-07-30  9:13     ` Arnd Bergmann
2016-07-30  9:13       ` Arnd Bergmann
2016-07-30  0:33   ` [PATCH net-next 03/10] drivers: net: xgene: fix: Delete descriptor rings and buffer pools Iyappan Subramanian
2016-07-30  0:33     ` Iyappan Subramanian
2016-07-30  0:34   ` [PATCH net-next 08/10] drivers: net: xgene: Poll link status via GPIO Iyappan Subramanian
2016-07-30  0:34     ` Iyappan Subramanian
     [not found]     ` <1469838843-19943-9-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2016-07-30  1:56       ` kbuild test robot
2016-07-30  1:56         ` kbuild test robot
2016-07-30  1:56         ` kbuild test robot
2016-07-30  4:32     ` kbuild test robot
2016-07-30  4:32       ` kbuild test robot
2016-07-30  4:32       ` kbuild test robot
2016-07-30  5:42     ` kbuild test robot
2016-07-30  5:42       ` kbuild test robot
2016-07-30  5:42       ` kbuild test robot
2016-08-01  5:39     ` Quan Nguyen
2016-08-01  5:39       ` Quan Nguyen
2016-07-30  0:34   ` [PATCH net-next 10/10] Documentation: dtb: xgene: Add rxlos GPIO mapping Iyappan Subramanian
2016-07-30  0:34     ` Iyappan Subramanian
2016-08-01 16:35     ` Rob Herring
2016-08-01 16:35       ` Rob Herring
2016-08-02  6:03       ` Quan Nguyen
2016-08-02  6:03         ` Quan Nguyen
2016-07-30  3:12   ` [PATCH net-next 00/10] Fix warning and issues David Miller
2016-07-30  3:12     ` David Miller
2016-07-30  0:33 ` [PATCH net-next 02/10] drivers: net: xgene: fix: Add dma_unmap_single Iyappan Subramanian
2016-07-30  0:33   ` Iyappan Subramanian
2016-07-30  0:33 ` [PATCH net-next 04/10] drivers: net: xgene: Fix error deconstruction path Iyappan Subramanian
2016-07-30  0:33   ` Iyappan Subramanian
2016-07-30  0:33 ` [PATCH net-next 05/10] drivers: net: xgene: Fix RSS indirection table fields Iyappan Subramanian
2016-07-30  0:33   ` Iyappan Subramanian
2016-07-30  0:33 ` Iyappan Subramanian [this message]
2016-07-30  0:33   ` [PATCH net-next 06/10] drivers: net: xgene: Change port init sequence Iyappan Subramanian
2016-07-30  0:34 ` [PATCH net-next 07/10] drivers: net: xgene: XFI PCS reset when link is down Iyappan Subramanian
2016-07-30  0:34   ` Iyappan Subramanian
2016-07-30  0:34 ` [PATCH net-next 09/10] dtb: xgene: Add rxlos-gpios property Iyappan Subramanian
2016-07-30  0:34   ` Iyappan Subramanian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1469838843-19943-7-git-send-email-isubramanian@apm.com \
    --to=isubramanian@apm.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=patches@apm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.