File tree 1 file changed +20
-0
lines changed
drivers/net/ethernet/microchip
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1743,6 +1743,16 @@ static int lan743x_tx_ring_init(struct lan743x_tx *tx)
1743
1743
ret = - EINVAL ;
1744
1744
goto cleanup ;
1745
1745
}
1746
+ if (dma_set_mask_and_coherent (& tx -> adapter -> pdev -> dev ,
1747
+ DMA_BIT_MASK (64 ))) {
1748
+ if (dma_set_mask_and_coherent (& tx -> adapter -> pdev -> dev ,
1749
+ DMA_BIT_MASK (32 ))) {
1750
+ dev_warn (& tx -> adapter -> pdev -> dev ,
1751
+ "lan743x_: No suitable DMA available\n" );
1752
+ ret = - ENOMEM ;
1753
+ goto cleanup ;
1754
+ }
1755
+ }
1746
1756
ring_allocation_size = ALIGN (tx -> ring_size *
1747
1757
sizeof (struct lan743x_tx_descriptor ),
1748
1758
PAGE_SIZE );
@@ -2291,6 +2301,16 @@ static int lan743x_rx_ring_init(struct lan743x_rx *rx)
2291
2301
ret = - EINVAL ;
2292
2302
goto cleanup ;
2293
2303
}
2304
+ if (dma_set_mask_and_coherent (& rx -> adapter -> pdev -> dev ,
2305
+ DMA_BIT_MASK (64 ))) {
2306
+ if (dma_set_mask_and_coherent (& rx -> adapter -> pdev -> dev ,
2307
+ DMA_BIT_MASK (32 ))) {
2308
+ dev_warn (& rx -> adapter -> pdev -> dev ,
2309
+ "lan743x_: No suitable DMA available\n" );
2310
+ ret = - ENOMEM ;
2311
+ goto cleanup ;
2312
+ }
2313
+ }
2294
2314
ring_allocation_size = ALIGN (rx -> ring_size *
2295
2315
sizeof (struct lan743x_rx_descriptor ),
2296
2316
PAGE_SIZE );
You can’t perform that action at this time.
0 commit comments