[SRU][Zesty][Artful}[PATCH 0/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Zesty][Artful}[PATCH 0/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Joseph Salisbury-3
BugLink: http://bugs.launchpad.net/bugs/1693673

== SRU Justification ==
When rebooting the Mustang board (ARM64 based) running Tianocore 3.06.25 or 3.07.09,
an IOB Error is reported.  This bug is resolved by mainline commit 8aba8474181070a30f56ffd19359f5d80665175e.

Commit 8aba84741810 is in mainline, but not tagged for a specific release as of yet.

Xenial and Yakkety also needs this fix.  However, X and Y need two prereq comits,
so that SRU request will be sent separatly.



== Fix ==
commit 8aba8474181070a30f56ffd19359f5d80665175e
Author: Iyappan Subramanian <[hidden email]>
Date:   Wed May 10 13:45:10 2017 -0700

    drivers: net: xgene: Fix redundant prefetch buffer cleanup

== Regression Potential ==
Low since changes are specific to xgene.

== Test Case ==
A test kernel was built with this patch and tested by the original bug
reporter.  The bug reporter states the test kernel resolved the bug.

Iyappan Subramanian (1):
  drivers: net: xgene: Fix redundant prefetch buffer cleanup

 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c    | 21 ---------------------
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c  |  2 +-
 drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 20 --------------------
 drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 20 --------------------
 4 files changed, 1 insertion(+), 62 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Zesty][Artful}[PATCH 1/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Joseph Salisbury-3
From: Iyappan Subramanian <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1693673

Prefetch buffer cleanup code was called twice, causing EDAC to
report errors during reboot.

[ 1130.972475] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
error
[ 1130.979584] xgene-edac 78800000.edac: IOB BA write response error
[ 1130.985648] xgene-edac 78800000.edac: IOB BA write access at 0x00.00000000
()
[ 1130.993612] xgene-edac 78800000.edac: IOB BA requestor ID 0x00002400
[ 1131.000242] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
error
...

This patch fixes the errors by,

- removing the redundant prefetch buffer cleanup from port_ops->shutdown()
- moving port_ops->shutdown() after delete_rings()

Signed-off-by: Iyappan Subramanian <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 8aba8474181070a30f56ffd19359f5d80665175e)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_hw.c    | 21 ---------------------
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c  |  2 +-
 drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 20 --------------------
 drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 20 --------------------
 4 files changed, 1 insertion(+), 62 deletions(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index 06e6816..4492b89 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -732,27 +732,6 @@ static void xgene_enet_clear(struct xgene_enet_pdata *pdata,
 static void xgene_gport_shutdown(struct xgene_enet_pdata *pdata)
 {
  struct device *dev = &pdata->pdev->dev;
- struct xgene_enet_desc_ring *ring;
- u32 pb;
- int i;
-
- pb = 0;
- for (i = 0; i < pdata->rxq_cnt; i++) {
- ring = pdata->rx_ring[i]->buf_pool;
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
- ring = pdata->rx_ring[i]->page_pool;
- if (ring)
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
-
- }
- xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIFPRESET_ADDR, pb);
-
- pb = 0;
- for (i = 0; i < pdata->txq_cnt; i++) {
- ring = pdata->tx_ring[i];
- pb |= BIT(xgene_enet_ring_bufnum(ring->id));
- }
- xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIWQRESET_ADDR, pb);
 
  if (dev->of_node) {
  if (!IS_ERR(pdata->clk))
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index b3568c4..1e4051c 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -2112,8 +2112,8 @@ static int xgene_enet_remove(struct platform_device *pdev)
  xgene_enet_mdio_remove(pdata);
 
  unregister_netdev(ndev);
- pdata->port_ops->shutdown(pdata);
  xgene_enet_delete_desc_rings(pdata);
+ pdata->port_ops->shutdown(pdata);
  free_netdev(ndev);
 
  return 0;
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
index a8e063b..2062578 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
@@ -587,26 +587,6 @@ static void xgene_enet_clear(struct xgene_enet_pdata *pdata,
 static void xgene_enet_shutdown(struct xgene_enet_pdata *p)
 {
  struct device *dev = &p->pdev->dev;
- struct xgene_enet_desc_ring *ring;
- u32 pb;
- int i;
-
- pb = 0;
- for (i = 0; i < p->rxq_cnt; i++) {
- ring = p->rx_ring[i]->buf_pool;
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
- ring = p->rx_ring[i]->page_pool;
- if (ring)
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
- }
- xgene_enet_wr_ring_if(p, ENET_CFGSSQMIFPRESET_ADDR, pb);
-
- pb = 0;
- for (i = 0; i < p->txq_cnt; i++) {
- ring = p->tx_ring[i];
- pb |= BIT(xgene_enet_ring_bufnum(ring->id));
- }
- xgene_enet_wr_ring_if(p, ENET_CFGSSQMIWQRESET_ADDR, pb);
 
  if (dev->of_node) {
  if (!IS_ERR(p->clk))
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
index ece19e6..0a3666c 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
@@ -457,26 +457,6 @@ static void xgene_enet_xgcle_bypass(struct xgene_enet_pdata *pdata,
 static void xgene_enet_shutdown(struct xgene_enet_pdata *pdata)
 {
  struct device *dev = &pdata->pdev->dev;
- struct xgene_enet_desc_ring *ring;
- u32 pb;
- int i;
-
- pb = 0;
- for (i = 0; i < pdata->rxq_cnt; i++) {
- ring = pdata->rx_ring[i]->buf_pool;
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
- ring = pdata->rx_ring[i]->page_pool;
- if (ring)
- pb |= BIT(xgene_enet_get_fpsel(ring->id));
- }
- xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIFPRESET_ADDR, pb);
-
- pb = 0;
- for (i = 0; i < pdata->txq_cnt; i++) {
- ring = pdata->tx_ring[i];
- pb |= BIT(xgene_enet_ring_bufnum(ring->id));
- }
- xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIWQRESET_ADDR, pb);
 
  if (dev->of_node) {
  if (!IS_ERR(pdata->clk))
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/cmnt: [SRU][Zesty][Artful}[PATCH 1/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Stefan Bader-2
On 14.07.2017 22:28, Joseph Salisbury wrote:

> From: Iyappan Subramanian <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1693673
>
> Prefetch buffer cleanup code was called twice, causing EDAC to
> report errors during reboot.
>
> [ 1130.972475] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
> error
> [ 1130.979584] xgene-edac 78800000.edac: IOB BA write response error
> [ 1130.985648] xgene-edac 78800000.edac: IOB BA write access at 0x00.00000000
> ()
> [ 1130.993612] xgene-edac 78800000.edac: IOB BA requestor ID 0x00002400
> [ 1131.000242] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
> error
> ...
>
> This patch fixes the errors by,
>
> - removing the redundant prefetch buffer cleanup from port_ops->shutdown()
> - moving port_ops->shutdown() after delete_rings()
>
> Signed-off-by: Iyappan Subramanian <[hidden email]>
> Signed-off-by: David S. Miller <[hidden email]>
> (cherry picked from commit 8aba8474181070a30f56ffd19359f5d80665175e)
> Signed-off-by: Joseph Salisbury <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---

I think I need a "add justification button"... ;)

-Stefan

>  drivers/net/ethernet/apm/xgene/xgene_enet_hw.c    | 21 ---------------------
>  drivers/net/ethernet/apm/xgene/xgene_enet_main.c  |  2 +-
>  drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c | 20 --------------------
>  drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 20 --------------------
>  4 files changed, 1 insertion(+), 62 deletions(-)
>
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
> index 06e6816..4492b89 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
> @@ -732,27 +732,6 @@ static void xgene_enet_clear(struct xgene_enet_pdata *pdata,
>  static void xgene_gport_shutdown(struct xgene_enet_pdata *pdata)
>  {
>   struct device *dev = &pdata->pdev->dev;
> - struct xgene_enet_desc_ring *ring;
> - u32 pb;
> - int i;
> -
> - pb = 0;
> - for (i = 0; i < pdata->rxq_cnt; i++) {
> - ring = pdata->rx_ring[i]->buf_pool;
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> - ring = pdata->rx_ring[i]->page_pool;
> - if (ring)
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> -
> - }
> - xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIFPRESET_ADDR, pb);
> -
> - pb = 0;
> - for (i = 0; i < pdata->txq_cnt; i++) {
> - ring = pdata->tx_ring[i];
> - pb |= BIT(xgene_enet_ring_bufnum(ring->id));
> - }
> - xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIWQRESET_ADDR, pb);
>  
>   if (dev->of_node) {
>   if (!IS_ERR(pdata->clk))
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> index b3568c4..1e4051c 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
> @@ -2112,8 +2112,8 @@ static int xgene_enet_remove(struct platform_device *pdev)
>   xgene_enet_mdio_remove(pdata);
>  
>   unregister_netdev(ndev);
> - pdata->port_ops->shutdown(pdata);
>   xgene_enet_delete_desc_rings(pdata);
> + pdata->port_ops->shutdown(pdata);
>   free_netdev(ndev);
>  
>   return 0;
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
> index a8e063b..2062578 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c
> @@ -587,26 +587,6 @@ static void xgene_enet_clear(struct xgene_enet_pdata *pdata,
>  static void xgene_enet_shutdown(struct xgene_enet_pdata *p)
>  {
>   struct device *dev = &p->pdev->dev;
> - struct xgene_enet_desc_ring *ring;
> - u32 pb;
> - int i;
> -
> - pb = 0;
> - for (i = 0; i < p->rxq_cnt; i++) {
> - ring = p->rx_ring[i]->buf_pool;
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> - ring = p->rx_ring[i]->page_pool;
> - if (ring)
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> - }
> - xgene_enet_wr_ring_if(p, ENET_CFGSSQMIFPRESET_ADDR, pb);
> -
> - pb = 0;
> - for (i = 0; i < p->txq_cnt; i++) {
> - ring = p->tx_ring[i];
> - pb |= BIT(xgene_enet_ring_bufnum(ring->id));
> - }
> - xgene_enet_wr_ring_if(p, ENET_CFGSSQMIWQRESET_ADDR, pb);
>  
>   if (dev->of_node) {
>   if (!IS_ERR(p->clk))
> diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
> index ece19e6..0a3666c 100644
> --- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
> +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c
> @@ -457,26 +457,6 @@ static void xgene_enet_xgcle_bypass(struct xgene_enet_pdata *pdata,
>  static void xgene_enet_shutdown(struct xgene_enet_pdata *pdata)
>  {
>   struct device *dev = &pdata->pdev->dev;
> - struct xgene_enet_desc_ring *ring;
> - u32 pb;
> - int i;
> -
> - pb = 0;
> - for (i = 0; i < pdata->rxq_cnt; i++) {
> - ring = pdata->rx_ring[i]->buf_pool;
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> - ring = pdata->rx_ring[i]->page_pool;
> - if (ring)
> - pb |= BIT(xgene_enet_get_fpsel(ring->id));
> - }
> - xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIFPRESET_ADDR, pb);
> -
> - pb = 0;
> - for (i = 0; i < pdata->txq_cnt; i++) {
> - ring = pdata->tx_ring[i];
> - pb |= BIT(xgene_enet_ring_bufnum(ring->id));
> - }
> - xgene_enet_wr_ring_if(pdata, ENET_CFGSSQMIWQRESET_ADDR, pb);
>  
>   if (dev->of_node) {
>   if (!IS_ERR(pdata->clk))
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK / APPLIED[artful]: [SRU][Zesty][Artful}[PATCH 1/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Seth Forshee
In reply to this post by Joseph Salisbury-3
On Fri, Jul 14, 2017 at 04:28:59PM -0400, Joseph Salisbury wrote:

> From: Iyappan Subramanian <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1693673
>
> Prefetch buffer cleanup code was called twice, causing EDAC to
> report errors during reboot.
>
> [ 1130.972475] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
> error
> [ 1130.979584] xgene-edac 78800000.edac: IOB BA write response error
> [ 1130.985648] xgene-edac 78800000.edac: IOB BA write access at 0x00.00000000
> ()
> [ 1130.993612] xgene-edac 78800000.edac: IOB BA requestor ID 0x00002400
> [ 1131.000242] xgene-edac 78800000.edac: IOB bridge agent (BA) transaction
> error
> ...
>
> This patch fixes the errors by,
>
> - removing the redundant prefetch buffer cleanup from port_ops->shutdown()
> - moving port_ops->shutdown() after delete_rings()
>
> Signed-off-by: Iyappan Subramanian <[hidden email]>
> Signed-off-by: David S. Miller <[hidden email]>
> (cherry picked from commit 8aba8474181070a30f56ffd19359f5d80665175e)
> Signed-off-by: Joseph Salisbury <[hidden email]>
> ---

Acked-by: Seth Forshee <[hidden email]>

Applied to artful/master-next and unstable/master, thanks.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [SRU][Zesty][Artful}[PATCH 0/1] drivers: net: xgene: Fix redundant prefetch buffer cleanup

Thadeu Lima de Souza Cascardo-3
In reply to this post by Joseph Salisbury-3
Applied to zesty master-next branch.

Thanks.
Cascardo.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team