All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes
@ 2021-12-03  3:31 Jiasheng Jiang
  2021-12-03  3:36 ` Florian Fainelli
  2021-12-03 14:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jiasheng Jiang @ 2021-12-03  3:31 UTC (permalink / raw)
  To: rafal, bcm-kernel-feedback-list, davem, kuba
  Cc: netdev, linux-kernel, fw, Jiasheng Jiang

The return value of dma_set_coherent_mask() is not always 0.
To catch the exception in case that dma is not support the mask.

Fixes: 9d61d138ab30 ("net: broadcom: rename BCM4908 driver & update DT binding")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
Changelog
 
v2 -> v3
 
* Change 1. Modify the subject.
---
 drivers/net/ethernet/broadcom/bcm4908_enet.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index 02a569500234..376f81796a29 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -708,7 +708,9 @@ static int bcm4908_enet_probe(struct platform_device *pdev)
 
 	enet->irq_tx = platform_get_irq_byname(pdev, "tx");
 
-	dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+	err = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
+	if (err)
+		return err;
 
 	err = bcm4908_enet_dma_alloc(enet);
 	if (err)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes
  2021-12-03  3:31 [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes Jiasheng Jiang
@ 2021-12-03  3:36 ` Florian Fainelli
  2021-12-03 14:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2021-12-03  3:36 UTC (permalink / raw)
  To: Jiasheng Jiang, rafal, bcm-kernel-feedback-list, davem, kuba
  Cc: netdev, linux-kernel, fw



On 12/2/2021 7:31 PM, Jiasheng Jiang wrote:
> The return value of dma_set_coherent_mask() is not always 0.
> To catch the exception in case that dma is not support the mask.
> 
> Fixes: 9d61d138ab30 ("net: broadcom: rename BCM4908 driver & update DT binding")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

Thanks for the quick turnaround.
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes
  2021-12-03  3:31 [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes Jiasheng Jiang
  2021-12-03  3:36 ` Florian Fainelli
@ 2021-12-03 14:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-03 14:20 UTC (permalink / raw)
  To: Jiasheng Jiang
  Cc: rafal, bcm-kernel-feedback-list, davem, kuba, netdev, linux-kernel, fw

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  3 Dec 2021 11:31:06 +0800 you wrote:
> The return value of dma_set_coherent_mask() is not always 0.
> To catch the exception in case that dma is not support the mask.
> 
> Fixes: 9d61d138ab30 ("net: broadcom: rename BCM4908 driver & update DT binding")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> Changelog
> 
> [...]

Here is the summary with links:
  - [v3] net: bcm4908: Handle dma_set_coherent_mask error codes
    https://git.kernel.org/netdev/net/c/128f6ec95a28

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-03 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  3:31 [PATCH v3] net: bcm4908: Handle dma_set_coherent_mask error codes Jiasheng Jiang
2021-12-03  3:36 ` Florian Fainelli
2021-12-03 14:20 ` patchwork-bot+netdevbpf

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.