aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros/alx/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/atheros/alx/main.c')
-rw-r--r--drivers/net/ethernet/atheros/alx/main.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index e92ffd6e1c15..380d24922049 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1248,19 +1248,13 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1248 * shared register for the high 32 bits, so only a single, aligned, 1248 * shared register for the high 32 bits, so only a single, aligned,
1249 * 4 GB physical address range can be used for descriptors. 1249 * 4 GB physical address range can be used for descriptors.
1250 */ 1250 */
1251 if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) && 1251 if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
1252 !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
1253 dev_dbg(&pdev->dev, "DMA to 64-BIT addresses\n"); 1252 dev_dbg(&pdev->dev, "DMA to 64-BIT addresses\n");
1254 } else { 1253 } else {
1255 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); 1254 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1256 if (err) { 1255 if (err) {
1257 err = dma_set_coherent_mask(&pdev->dev, 1256 dev_err(&pdev->dev, "No usable DMA config, aborting\n");
1258 DMA_BIT_MASK(32)); 1257 goto out_pci_disable;
1259 if (err) {
1260 dev_err(&pdev->dev,
1261 "No usable DMA config, aborting\n");
1262 goto out_pci_disable;
1263 }
1264 } 1258 }
1265 } 1259 }
1266 1260
@@ -1292,6 +1286,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1292 alx = netdev_priv(netdev); 1286 alx = netdev_priv(netdev);
1293 spin_lock_init(&alx->hw.mdio_lock); 1287 spin_lock_init(&alx->hw.mdio_lock);
1294 spin_lock_init(&alx->irq_lock); 1288 spin_lock_init(&alx->irq_lock);
1289 spin_lock_init(&alx->stats_lock);
1295 alx->dev = netdev; 1290 alx->dev = netdev;
1296 alx->hw.pdev = pdev; 1291 alx->hw.pdev = pdev;
1297 alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP | 1292 alx->msg_enable = NETIF_MSG_LINK | NETIF_MSG_HW | NETIF_MSG_IFUP |