diff mbox series

[net-next] net: ethernet: ti: davinci_cpdma: revert "drop frame padding"

Message ID 20210806142809.15069-1-grygorii.strashko@ti.com (mailing list archive)
State Accepted
Commit 35ba6abb73e4d2ba21a566d3671618f4a5503c27
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ethernet: ti: davinci_cpdma: revert "drop frame padding" | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 21 maintainers not CCed: gustavoars@kernel.org john.fastabend@gmail.com toke@redhat.com yangyingliang@huawei.com kpsingh@kernel.org arnd@arndb.de michael@walle.cc ast@kernel.org ilias.apalodimas@linaro.org andrii@kernel.org colin.king@canonical.com daniel@iogearbox.net bpf@vger.kernel.org songliubraving@fb.com ecree.xilinx@gmail.com jgg@ziepe.ca bjorn@kernel.org yhs@fb.com lorenzo@kernel.org kafai@fb.com jesse.brandeburg@intel.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Grygorii Strashko Aug. 6, 2021, 2:28 p.m. UTC
This reverts commit 9ffc513f95ee ("net: ethernet: ti: davinci_cpdma: drop
frame padding") which has depndency from not yet merged patch [1] and so
breaks cpsw_new driver.

[1] https://patchwork.kernel.org/project/netdevbpf/patch/20210805145511.12016-1-grygorii.strashko@ti.com/
Fixes: 9ffc513f95ee ("net: ethernet: ti: davinci_cpdma: drop frame padding")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/cpsw_priv.c     | 1 +
 drivers/net/ethernet/ti/davinci_cpdma.c | 5 +++++
 drivers/net/ethernet/ti/davinci_cpdma.h | 1 +
 drivers/net/ethernet/ti/davinci_emac.c  | 1 +
 4 files changed, 8 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Aug. 6, 2021, 11:30 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 6 Aug 2021 17:28:09 +0300 you wrote:
> This reverts commit 9ffc513f95ee ("net: ethernet: ti: davinci_cpdma: drop
> frame padding") which has depndency from not yet merged patch [1] and so
> breaks cpsw_new driver.
> 
> [1] https://patchwork.kernel.org/project/netdevbpf/patch/20210805145511.12016-1-grygorii.strashko@ti.com/
> Fixes: 9ffc513f95ee ("net: ethernet: ti: davinci_cpdma: drop frame padding")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: ethernet: ti: davinci_cpdma: revert "drop frame padding"
    https://git.kernel.org/netdev/net-next/c/35ba6abb73e4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c
index d97a72c9ec53..ecc2a6b7e28f 100644
--- a/drivers/net/ethernet/ti/cpsw_priv.c
+++ b/drivers/net/ethernet/ti/cpsw_priv.c
@@ -518,6 +518,7 @@  int cpsw_init_common(struct cpsw_common *cpsw, void __iomem *ss_regs,
 
 	dma_params.num_chan		= data->channels;
 	dma_params.has_soft_reset	= true;
+	dma_params.min_packet_size	= CPSW_MIN_PACKET_SIZE;
 	dma_params.desc_mem_size	= data->bd_ram_size;
 	dma_params.desc_align		= 16;
 	dma_params.has_ext_regs		= true;
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index 753d94c9915a..d2eab5cd1e0c 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -1034,6 +1034,11 @@  static int cpdma_chan_submit_si(struct submit_info *si)
 		return -ENOMEM;
 	}
 
+	if (len < ctlr->params.min_packet_size) {
+		len = ctlr->params.min_packet_size;
+		chan->stats.runt_transmit_buff++;
+	}
+
 	mode = CPDMA_DESC_OWNER | CPDMA_DESC_SOP | CPDMA_DESC_EOP;
 	cpdma_desc_to_port(chan, mode, si->directed);
 
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h
index 62151f13c7ce..d3cfe234d16a 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.h
+++ b/drivers/net/ethernet/ti/davinci_cpdma.h
@@ -26,6 +26,7 @@  struct cpdma_params {
 	void __iomem		*rxthresh, *rxfree;
 	int			num_chan;
 	bool			has_soft_reset;
+	int			min_packet_size;
 	dma_addr_t		desc_mem_phys;
 	dma_addr_t		desc_hw_addr;
 	int			desc_mem_size;
diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
index cd2ef0282f38..b1c5cbe7478b 100644
--- a/drivers/net/ethernet/ti/davinci_emac.c
+++ b/drivers/net/ethernet/ti/davinci_emac.c
@@ -1850,6 +1850,7 @@  static int davinci_emac_probe(struct platform_device *pdev)
 	dma_params.txcp			= priv->emac_base + 0x640;
 	dma_params.rxcp			= priv->emac_base + 0x660;
 	dma_params.num_chan		= EMAC_MAX_TXRX_CHANNELS;
+	dma_params.min_packet_size	= EMAC_DEF_MIN_ETHPKTSIZE;
 	dma_params.desc_hw_addr		= hw_ram_addr;
 	dma_params.desc_mem_size	= pdata->ctrl_ram_size;
 	dma_params.desc_align		= 16;