forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
....@@ -429,7 +429,6 @@
429429 struct adapter *adapter = dev->ml_priv;
430430
431431 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
432
- strlcpy(info->version, DRV_VERSION, sizeof(info->version));
433432 strlcpy(info->bus_info, pci_name(adapter->pdev),
434433 sizeof(info->bus_info));
435434 }
....@@ -794,6 +793,9 @@
794793 }
795794
796795 static const struct ethtool_ops t1_ethtool_ops = {
796
+ .supported_coalesce_params = ETHTOOL_COALESCE_RX_USECS |
797
+ ETHTOOL_COALESCE_USE_ADAPTIVE_RX |
798
+ ETHTOOL_COALESCE_RATE_SAMPLE_INTERVAL,
797799 .get_drvinfo = get_drvinfo,
798800 .get_msglevel = get_msglevel,
799801 .set_msglevel = set_msglevel,
....@@ -984,8 +986,6 @@
984986 struct adapter *adapter = NULL;
985987 struct port_info *pi;
986988
987
- pr_info_once("%s - version %s\n", DRV_DESCRIPTION, DRV_VERSION);
988
-
989989 err = pci_enable_device(pdev);
990990 if (err)
991991 return err;
....@@ -997,17 +997,17 @@
997997 goto out_disable_pdev;
998998 }
999999
1000
- if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1000
+ if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
10011001 pci_using_dac = 1;
10021002
1003
- if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
1004
- pr_err("%s: unable to obtain 64-bit DMA for "
1005
- "consistent allocations\n", pci_name(pdev));
1003
+ if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
1004
+ pr_err("%s: unable to obtain 64-bit DMA for coherent allocations\n",
1005
+ pci_name(pdev));
10061006 err = -ENODEV;
10071007 goto out_disable_pdev;
10081008 }
10091009
1010
- } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
1010
+ } else if ((err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) != 0) {
10111011 pr_err("%s: no usable DMA configuration\n", pci_name(pdev));
10121012 goto out_disable_pdev;
10131013 }