The patch for r8169 with 4GB RAM

Hi All,
We have a customize board with 4GB RAM.
In the topic below, jachen said a patch must be applied, otherwise the network may fail to work.
https://devtalk.nvidia.com/default/topic/724211/jetson-tk1/jetson-tk1-ram-specification-clarification/post/4752894/#4752894

May I know where I can find this patch?

Many Thanks.

Hi FrankPCP,

I can’t tell if that patch still required since we posted the 4G support topic, see [url]https://devtalk.nvidia.com/default/topic/924464/jetson-tk1/4gb-support-on-jetson-tk1/post/4836941/#4836941[/url]

Have you follow the step to confirm whether ethernet ca work or not?
And, what’s the BSP you’re using?

Thanks

Hi kayccc,
Yes, I have followed the instructions in [url]https://devtalk.nvidia.com/default/topic/924464/jetson-tk1/4gb-support-on-jetson-tk1/post/4836941/#4836941[/url].
But I meet a mc-err error now. Please see the topic below.
[url]https://devtalk.nvidia.com/default/topic/1032816/jetson-tk1/how-to-fix-mc-err-error-/[/url]
I find the mc-err messages are accompanied with many network related message.
So I suspect if this mc-err error is casued by rt8169.
I would like to try the patch of rt8169 to see if this can fix my mc-err error.

The BSP we currently using is r21.6.

Many Thanks.

Please try this patch.

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index e9b3721..fd2b82b 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6979,12 +6979,12 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
              tp->cp_cmd = RxChkSum;
 
               if ((sizeof(dma_addr_t) > 4) &&
-                  !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
+                 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
                             tp->cp_cmd |= PCIDAC;
                             dev->features |= NETIF_F_HIGHDMA;
              } else {
-                             if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) < 0) &&
-                                            (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) < 0) {
+                            if ((pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) < 0) &&
+                                           (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) < 0) {
                                            netif_err(tp, probe, dev, "DMA configuration failed\n");
                                            goto err_out_free_res_3;
                             }

Hi FrankPCP,

Have you tried that patch? Can it work and no more mc-err messages showed up?
Any result can be shared?

Thanks

Hi kayccc,
I have applied this patch but it didn’t work.
Do you know what does these mc-err messages mean?

Many Thanks,
Frank