.. | .. |
---|
49 | 49 | #include "hw.h" |
---|
50 | 50 | #include "reg.h" |
---|
51 | 51 | |
---|
52 | | -const char alx_drv_name[] = "alx"; |
---|
| 52 | +static const char alx_drv_name[] = "alx"; |
---|
53 | 53 | |
---|
54 | 54 | static void alx_free_txbuf(struct alx_tx_queue *txq, int entry) |
---|
55 | 55 | { |
---|
.. | .. |
---|
660 | 660 | alx->num_txq + |
---|
661 | 661 | sizeof(struct alx_rrd) * alx->rx_ringsz + |
---|
662 | 662 | sizeof(struct alx_rfd) * alx->rx_ringsz; |
---|
663 | | - alx->descmem.virt = dma_zalloc_coherent(&alx->hw.pdev->dev, |
---|
664 | | - alx->descmem.size, |
---|
665 | | - &alx->descmem.dma, |
---|
666 | | - GFP_KERNEL); |
---|
| 663 | + alx->descmem.virt = dma_alloc_coherent(&alx->hw.pdev->dev, |
---|
| 664 | + alx->descmem.size, |
---|
| 665 | + &alx->descmem.dma, GFP_KERNEL); |
---|
667 | 666 | if (!alx->descmem.virt) |
---|
668 | 667 | return -ENOMEM; |
---|
669 | 668 | |
---|
.. | .. |
---|
1421 | 1420 | 0, IPPROTO_TCP, 0); |
---|
1422 | 1421 | first->word1 |= 1 << TPD_IPV4_SHIFT; |
---|
1423 | 1422 | } else if (skb_is_gso_v6(skb)) { |
---|
1424 | | - ipv6_hdr(skb)->payload_len = 0; |
---|
1425 | | - tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
---|
1426 | | - &ipv6_hdr(skb)->daddr, |
---|
1427 | | - 0, IPPROTO_TCP, 0); |
---|
| 1423 | + tcp_v6_gso_csum_prep(skb); |
---|
1428 | 1424 | /* LSOv2: the first TPD only provides the packet length */ |
---|
1429 | 1425 | first->adrl.l.pkt_len = skb->len; |
---|
1430 | 1426 | first->word1 |= 1 << TPD_LSO_V2_SHIFT; |
---|
.. | .. |
---|
1470 | 1466 | tpd->len = cpu_to_le16(maplen); |
---|
1471 | 1467 | |
---|
1472 | 1468 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
---|
1473 | | - struct skb_frag_struct *frag; |
---|
1474 | | - |
---|
1475 | | - frag = &skb_shinfo(skb)->frags[f]; |
---|
| 1469 | + skb_frag_t *frag = &skb_shinfo(skb)->frags[f]; |
---|
1476 | 1470 | |
---|
1477 | 1471 | if (++txq->write_idx == txq->count) |
---|
1478 | 1472 | txq->write_idx = 0; |
---|
.. | .. |
---|
1560 | 1554 | return alx_start_xmit_ring(skb, alx_tx_queue_mapping(alx, skb)); |
---|
1561 | 1555 | } |
---|
1562 | 1556 | |
---|
1563 | | -static void alx_tx_timeout(struct net_device *dev) |
---|
| 1557 | +static void alx_tx_timeout(struct net_device *dev, unsigned int txqueue) |
---|
1564 | 1558 | { |
---|
1565 | 1559 | struct alx_priv *alx = netdev_priv(dev); |
---|
1566 | 1560 | |
---|
.. | .. |
---|
1882 | 1876 | #ifdef CONFIG_PM_SLEEP |
---|
1883 | 1877 | static int alx_suspend(struct device *dev) |
---|
1884 | 1878 | { |
---|
1885 | | - struct pci_dev *pdev = to_pci_dev(dev); |
---|
1886 | | - struct alx_priv *alx = pci_get_drvdata(pdev); |
---|
| 1879 | + struct alx_priv *alx = dev_get_drvdata(dev); |
---|
1887 | 1880 | |
---|
1888 | 1881 | if (!netif_running(alx->dev)) |
---|
1889 | 1882 | return 0; |
---|
.. | .. |
---|
1894 | 1887 | |
---|
1895 | 1888 | static int alx_resume(struct device *dev) |
---|
1896 | 1889 | { |
---|
1897 | | - struct pci_dev *pdev = to_pci_dev(dev); |
---|
1898 | | - struct alx_priv *alx = pci_get_drvdata(pdev); |
---|
| 1890 | + struct alx_priv *alx = dev_get_drvdata(dev); |
---|
1899 | 1891 | struct alx_hw *hw = &alx->hw; |
---|
1900 | 1892 | int err; |
---|
1901 | 1893 | |
---|
.. | .. |
---|
1969 | 1961 | if (!alx_reset_mac(hw)) |
---|
1970 | 1962 | rc = PCI_ERS_RESULT_RECOVERED; |
---|
1971 | 1963 | out: |
---|
1972 | | - pci_cleanup_aer_uncorrect_error_status(pdev); |
---|
1973 | | - |
---|
1974 | 1964 | rtnl_unlock(); |
---|
1975 | 1965 | |
---|
1976 | 1966 | return rc; |
---|