* [PATCH] r8169:Fill with zero Tx descriptors
@ 2015-08-05 10:46 Corcodel Marian
2015-08-05 12:57 ` Sergei Shtylyov
2015-08-05 13:42 ` Ivan Vecera
0 siblings, 2 replies; 3+ messages in thread
From: Corcodel Marian @ 2015-08-05 10:46 UTC (permalink / raw)
To: netdev; +Cc: Corcodel Marian
This patch fill with zero Tx descriptors before use.Is only
on part by more patches but is critical.(critical)
Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 3df51fa..bf78f94 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7589,7 +7589,7 @@ static int rtl_open(struct net_device *dev)
* Rx and Tx descriptors needs 256 bytes alignment.
* dma_alloc_coherent provides more.
*/
- tp->TxDescArray = dma_alloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
+ tp->TxDescArray = dma_zalloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
&tp->TxPhyAddr, GFP_KERNEL);
if (!tp->TxDescArray)
goto err_pm_runtime_put;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] r8169:Fill with zero Tx descriptors
2015-08-05 10:46 [PATCH] r8169:Fill with zero Tx descriptors Corcodel Marian
@ 2015-08-05 12:57 ` Sergei Shtylyov
2015-08-05 13:42 ` Ivan Vecera
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2015-08-05 12:57 UTC (permalink / raw)
To: Corcodel Marian, netdev
Hello.
On 8/5/2015 1:46 PM, Corcodel Marian wrote:
> This patch fill with zero Tx descriptors before use.Is only
> on part by more patches but is critical.(critical)
> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 3df51fa..bf78f94 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -7589,7 +7589,7 @@ static int rtl_open(struct net_device *dev)
> * Rx and Tx descriptors needs 256 bytes alignment.
> * dma_alloc_coherent provides more.
> */
> - tp->TxDescArray = dma_alloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
> + tp->TxDescArray = dma_zalloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
> &tp->TxPhyAddr, GFP_KERNEL);
Please re-align the continuation line.
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] r8169:Fill with zero Tx descriptors
2015-08-05 10:46 [PATCH] r8169:Fill with zero Tx descriptors Corcodel Marian
2015-08-05 12:57 ` Sergei Shtylyov
@ 2015-08-05 13:42 ` Ivan Vecera
1 sibling, 0 replies; 3+ messages in thread
From: Ivan Vecera @ 2015-08-05 13:42 UTC (permalink / raw)
To: Corcodel Marian, netdev
On 5.8.2015 12:46, Corcodel Marian wrote:
> This patch fill with zero Tx descriptors before use.Is only
> on part by more patches but is critical.(critical)
>
>
> Signed-off-by: Corcodel Marian <corcodel.marian@gmail.com>
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 3df51fa..bf78f94 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -7589,7 +7589,7 @@ static int rtl_open(struct net_device *dev)
> * Rx and Tx descriptors needs 256 bytes alignment.
> * dma_alloc_coherent provides more.
> */
> - tp->TxDescArray = dma_alloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
> + tp->TxDescArray = dma_zalloc_coherent(&pdev->dev, R8169_TX_RING_BYTES,
> &tp->TxPhyAddr, GFP_KERNEL);
> if (!tp->TxDescArray)
> goto err_pm_runtime_put;
>
Why? Why is zero-filling of tx-ring critical???
Ivan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-05 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 10:46 [PATCH] r8169:Fill with zero Tx descriptors Corcodel Marian
2015-08-05 12:57 ` Sergei Shtylyov
2015-08-05 13:42 ` Ivan Vecera
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).