* [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers
@ 2013-12-07 8:10 Srikanth Thokala
2013-12-07 8:10 ` [PATCH v2 2/2] net: emaclite: add barriers to support Xilinx Zynq platform Srikanth Thokala
2013-12-10 2:02 ` [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Srikanth Thokala @ 2013-12-07 8:10 UTC (permalink / raw)
To: linux-arm-kernel
There are no specific interrupts for the PONG buffer on both
transmit and receive side, same interrupt is valid for both
buffers. So, this patch removes this code.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Reviewed-by: Michal Simek <monstr@monstr.eu>
---
Changes in v2:
rebased on v3.13.0-rc3.
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 38 -------------------------
1 file changed, 38 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 74234a5..b2850fd 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -163,26 +163,9 @@ static void xemaclite_enable_interrupts(struct net_local *drvdata)
__raw_writel(reg_data | XEL_TSR_XMIT_IE_MASK,
drvdata->base_addr + XEL_TSR_OFFSET);
- /* Enable the Tx interrupts for the second Buffer if
- * configured in HW */
- if (drvdata->tx_ping_pong != 0) {
- reg_data = __raw_readl(drvdata->base_addr +
- XEL_BUFFER_OFFSET + XEL_TSR_OFFSET);
- __raw_writel(reg_data | XEL_TSR_XMIT_IE_MASK,
- drvdata->base_addr + XEL_BUFFER_OFFSET +
- XEL_TSR_OFFSET);
- }
-
/* Enable the Rx interrupts for the first buffer */
__raw_writel(XEL_RSR_RECV_IE_MASK, drvdata->base_addr + XEL_RSR_OFFSET);
- /* Enable the Rx interrupts for the second Buffer if
- * configured in HW */
- if (drvdata->rx_ping_pong != 0) {
- __raw_writel(XEL_RSR_RECV_IE_MASK, drvdata->base_addr +
- XEL_BUFFER_OFFSET + XEL_RSR_OFFSET);
- }
-
/* Enable the Global Interrupt Enable */
__raw_writel(XEL_GIER_GIE_MASK, drvdata->base_addr + XEL_GIER_OFFSET);
}
@@ -206,31 +189,10 @@ static void xemaclite_disable_interrupts(struct net_local *drvdata)
__raw_writel(reg_data & (~XEL_TSR_XMIT_IE_MASK),
drvdata->base_addr + XEL_TSR_OFFSET);
- /* Disable the Tx interrupts for the second Buffer
- * if configured in HW */
- if (drvdata->tx_ping_pong != 0) {
- reg_data = __raw_readl(drvdata->base_addr + XEL_BUFFER_OFFSET +
- XEL_TSR_OFFSET);
- __raw_writel(reg_data & (~XEL_TSR_XMIT_IE_MASK),
- drvdata->base_addr + XEL_BUFFER_OFFSET +
- XEL_TSR_OFFSET);
- }
-
/* Disable the Rx interrupts for the first buffer */
reg_data = __raw_readl(drvdata->base_addr + XEL_RSR_OFFSET);
__raw_writel(reg_data & (~XEL_RSR_RECV_IE_MASK),
drvdata->base_addr + XEL_RSR_OFFSET);
-
- /* Disable the Rx interrupts for the second buffer
- * if configured in HW */
- if (drvdata->rx_ping_pong != 0) {
-
- reg_data = __raw_readl(drvdata->base_addr + XEL_BUFFER_OFFSET +
- XEL_RSR_OFFSET);
- __raw_writel(reg_data & (~XEL_RSR_RECV_IE_MASK),
- drvdata->base_addr + XEL_BUFFER_OFFSET +
- XEL_RSR_OFFSET);
- }
}
/**
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] net: emaclite: add barriers to support Xilinx Zynq platform
2013-12-07 8:10 [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers Srikanth Thokala
@ 2013-12-07 8:10 ` Srikanth Thokala
2013-12-10 2:02 ` David Miller
2013-12-10 2:02 ` [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Srikanth Thokala @ 2013-12-07 8:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds barriers at appropriate places to ensure the driver
works on Xilinx Zynq ARM-based SoC platform.
Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
---
Changes in v2:
rebased on v3.13.0-rc3.
added comments for memory barrier.
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index b2850fd..fefb8cd 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -220,6 +220,13 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
*to_u16_ptr++ = *from_u16_ptr++;
*to_u16_ptr++ = *from_u16_ptr++;
+ /* This barrier resolves occasional issues seen around
+ * cases where the data is not properly flushed out
+ * from the processor store buffers to the destination
+ * memory locations.
+ */
+ wmb();
+
/* Output a word */
*to_u32_ptr++ = align_buffer;
}
@@ -235,6 +242,12 @@ static void xemaclite_aligned_write(void *src_ptr, u32 *dest_ptr,
for (; length > 0; length--)
*to_u8_ptr++ = *from_u8_ptr++;
+ /* This barrier resolves occasional issues seen around
+ * cases where the data is not properly flushed out
+ * from the processor store buffers to the destination
+ * memory locations.
+ */
+ wmb();
*to_u32_ptr = align_buffer;
}
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers
2013-12-07 8:10 [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers Srikanth Thokala
2013-12-07 8:10 ` [PATCH v2 2/2] net: emaclite: add barriers to support Xilinx Zynq platform Srikanth Thokala
@ 2013-12-10 2:02 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-12-10 2:02 UTC (permalink / raw)
To: linux-arm-kernel
From: Srikanth Thokala <sthokal@xilinx.com>
Date: Sat, 7 Dec 2013 13:40:48 +0530
> There are no specific interrupts for the PONG buffer on both
> transmit and receive side, same interrupt is valid for both
> buffers. So, this patch removes this code.
>
> Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
> Reviewed-by: Michal Simek <monstr@monstr.eu>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-10 2:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 8:10 [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers Srikanth Thokala
2013-12-07 8:10 ` [PATCH v2 2/2] net: emaclite: add barriers to support Xilinx Zynq platform Srikanth Thokala
2013-12-10 2:02 ` David Miller
2013-12-10 2:02 ` [PATCH v2 1/2] net: emaclite: Remove unnecessary code that enables/disables interrupts on PONG buffers David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).