[PATCH] net: netcp: fix unused interface rx buffer size configuration

2015-08-04 Thread WingMan Kwok
a non-zero rx queue depth dts binding of the corresponding interface). This patch removes the rx buffer size configuration capability. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp.h |1 - drivers/net/ethernet/ti/netcp_core.c | 35

[PATCH 2/2] net: netcp: Allocate RX packet buffers using __GFP_DMA

2015-07-29 Thread WingMan Kwok
The Keystone II DMA hardware can only access addresses in the lower 2 GiB of SDRAM. This patch makes sure the RX buffers are allocated using the __GFP_DMA flag so they meet this requirement. Signed-off-by: WingMan Kwok w-kw...@ti.com Signed-off-by: Reece R. Pollack x0183...@ti.com --- drivers

[PATCH 1/2] net: Export __netdev_alloc_frag() to allow gfp_mask flags

2015-07-29 Thread WingMan Kwok
This patch makes the function __netdev_alloc_frag() non-static and exports it so that drivers that need to specify additional flags, such as __GFP_DMA, can use it. The currently exported function, netdev_alloc_frag() doesn't allow passing in gfp_mask flags. Signed-off-by: WingMan Kwok w-kw

[net-next PATCH] net: netcp: Fixes efuse mac addr swap on k2e and k2l

2015-07-28 Thread WingMan Kwok
proper action. The flag can be enabled in the corresponding netcp interface dts binding as efuse-mac = 2 under the corresponding netcp interface node. Signed-off-by: WingMan Kwok w-kw...@ti.com --- .../devicetree/bindings/net/keystone-netcp.txt |6 +- drivers/net/ethernet/ti/netcp_core.c

[PATCH] net: netcp: Fixes SGMII reset on network interface shutdown

2015-07-24 Thread WingMan Kwok
-by: WingMan Kwok w-kw...@ti.com --- This patch depends on the patch set Subject: [net-next PATCH v1 0/6] net: netcp: Bug fixes of CPSW statistics collection submitted earlier. drivers/net/ethernet/ti/netcp.h |1 + drivers/net/ethernet/ti/netcp_ethss.c | 18 ++ drivers/net

[net-next PATCH v0 0/6] net: netcp: Bug fixes of CPSW statistics collection

2015-07-23 Thread WingMan Kwok
This patch set contains bug fixes and enhencements of hw ethernet statistics processing on TI's Keystone2 CPSW ethernet switches. WingMan Kwok (6): net: netcp: Fixes the use of spin_lock_bh in timer function net: netcp: Fixes hw statistics module base setting error net: netcp: Fixes error

[net-next PATCH v0 5/6] net: netcp: Fixes to CPSW statistics collection

2015-07-23 Thread WingMan Kwok
In certain applications it's beneficial to allow the CPSW h/w stats counters to continue to increment even while the kernel polls them. This patch implements this behavior for both 1G and 10G ethernet subsystem modules. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti

[net-next PATCH v0 4/6] net: netcp: Consolidates statistics collection code

2015-07-23 Thread WingMan Kwok
Different Keystone2 platforms have different number and layouts of hw statistics modules. This patch consolidates the statistics processing of different Keystone2 platforms for easy maintenance. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 99

[net-next PATCH v0 3/6] net: netcp: Fixes error in oversized memory allocation for statistics storage

2015-07-23 Thread WingMan Kwok
of the the whole hw statistics modules, instead of the size of statistics-entries-interested-in (i.e. et_stats), for internal storage. This patch fixes that. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 42 - 1 file changed, 21

[net-next PATCH v0 6/6] net: netcp: Adds missing statistics for K2L and K2E

2015-07-23 Thread WingMan Kwok
This patch adds the missing statistics for the host and slave ports of the CPSW on K2L and K2E platforms. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 177 - 1 file changed, 174 insertions(+), 3 deletions(-) diff --git

[net-next PATCH v0 1/6] net: netcp: Fixes the use of spin_lock_bh in timer function

2015-07-23 Thread WingMan Kwok
This patch fixes a bug in which the timer routine synchronized against the ethtool-triggered statistics updates with spin_lock_bh(). A timer function is itself a bottom-half, so this should be spin_lock(). Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c

[net-next PATCH v0 2/6] net: netcp: Fixes hw statistics module base setting error

2015-07-23 Thread WingMan Kwok
to one base, while modules 1 and 3 should point to the other. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti

[net-next PATCH v1 5/6] net: netcp: Fixes to CPSW statistics collection

2015-07-23 Thread WingMan Kwok
In certain applications it's beneficial to allow the CPSW h/w stats counters to continue to increment even while the kernel polls them. This patch implements this behavior for both 1G and 10G ethernet subsystem modules. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti

[net-next PATCH v1 4/6] net: netcp: Consolidates statistics collection code

2015-07-23 Thread WingMan Kwok
Different Keystone2 platforms have different number and layouts of hw statistics modules. This patch consolidates the statistics processing of different Keystone2 platforms for easy maintenance. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 99

[net-next PATCH v1 3/6] net: netcp: Fixes error in oversized memory allocation for statistics storage

2015-07-23 Thread WingMan Kwok
of the the whole hw statistics modules, instead of the size of statistics-entries-interested-in (i.e. et_stats), for internal storage. This patch fixes that. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 46 +++-- 1 file changed, 21

[net-next PATCH v1 1/6] net: netcp: Fixes the use of spin_lock_bh in timer function

2015-07-23 Thread WingMan Kwok
This patch fixes a bug in which the timer routine synchronized against the ethtool-triggered statistics updates with spin_lock_bh(). A timer function is itself a bottom-half, so this should be spin_lock(). Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c

[net-next PATCH v1 2/6] net: netcp: Fixes hw statistics module base setting error

2015-07-23 Thread WingMan Kwok
to one base, while modules 1 and 3 should point to the other. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti

[net-next PATCH v1 6/6] net: netcp: Adds missing statistics for K2L and K2E

2015-07-23 Thread WingMan Kwok
This patch adds the missing statistics for the host and slave ports of the CPSW on K2L and K2E platforms. Signed-off-by: WingMan Kwok w-kw...@ti.com --- drivers/net/ethernet/ti/netcp_ethss.c | 177 - 1 file changed, 174 insertions(+), 3 deletions(-) diff --git

[net-next PATCH v1 0/6] net: netcp: Bug fixes of CPSW statistics collection

2015-07-23 Thread WingMan Kwok
This patch set contains bug fixes and enhencements of hw ethernet statistics processing on TI's Keystone2 CPSW ethernet switches. v1: Removes unused defines in PATCH 3/6 based on reviewer's comment WingMan Kwok (6): net: netcp: Fixes the use of spin_lock_bh in timer function net: netcp