diff options
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index d6c7ac68f6ea..8ce58c4c7dd3 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -45,10 +45,6 @@ MODULE_DESCRIPTION("NIU ethernet driver"); | |||
45 | MODULE_LICENSE("GPL"); | 45 | MODULE_LICENSE("GPL"); |
46 | MODULE_VERSION(DRV_MODULE_VERSION); | 46 | MODULE_VERSION(DRV_MODULE_VERSION); |
47 | 47 | ||
48 | #ifndef DMA_44BIT_MASK | ||
49 | #define DMA_44BIT_MASK 0x00000fffffffffffULL | ||
50 | #endif | ||
51 | |||
52 | #ifndef readq | 48 | #ifndef readq |
53 | static u64 readq(void __iomem *reg) | 49 | static u64 readq(void __iomem *reg) |
54 | { | 50 | { |
@@ -7855,10 +7851,13 @@ static void niu_get_strings(struct net_device *dev, u32 stringset, u8 *data) | |||
7855 | } | 7851 | } |
7856 | } | 7852 | } |
7857 | 7853 | ||
7858 | static int niu_get_stats_count(struct net_device *dev) | 7854 | static int niu_get_sset_count(struct net_device *dev, int stringset) |
7859 | { | 7855 | { |
7860 | struct niu *np = netdev_priv(dev); | 7856 | struct niu *np = netdev_priv(dev); |
7861 | 7857 | ||
7858 | if (stringset != ETH_SS_STATS) | ||
7859 | return -EINVAL; | ||
7860 | |||
7862 | return ((np->flags & NIU_FLAGS_XMAC ? | 7861 | return ((np->flags & NIU_FLAGS_XMAC ? |
7863 | NUM_XMAC_STAT_KEYS : | 7862 | NUM_XMAC_STAT_KEYS : |
7864 | NUM_BMAC_STAT_KEYS) + | 7863 | NUM_BMAC_STAT_KEYS) + |
@@ -7978,7 +7977,7 @@ static const struct ethtool_ops niu_ethtool_ops = { | |||
7978 | .get_settings = niu_get_settings, | 7977 | .get_settings = niu_get_settings, |
7979 | .set_settings = niu_set_settings, | 7978 | .set_settings = niu_set_settings, |
7980 | .get_strings = niu_get_strings, | 7979 | .get_strings = niu_get_strings, |
7981 | .get_stats_count = niu_get_stats_count, | 7980 | .get_sset_count = niu_get_sset_count, |
7982 | .get_ethtool_stats = niu_get_ethtool_stats, | 7981 | .get_ethtool_stats = niu_get_ethtool_stats, |
7983 | .phys_id = niu_phys_id, | 7982 | .phys_id = niu_phys_id, |
7984 | .get_rxnfc = niu_get_nfc, | 7983 | .get_rxnfc = niu_get_nfc, |
@@ -8144,7 +8143,7 @@ static void __devinit niu_vpd_parse_version(struct niu *np) | |||
8144 | int i; | 8143 | int i; |
8145 | 8144 | ||
8146 | for (i = 0; i < len - 5; i++) { | 8145 | for (i = 0; i < len - 5; i++) { |
8147 | if (!strncmp(s + i, "FCode ", 5)) | 8146 | if (!strncmp(s + i, "FCode ", 6)) |
8148 | break; | 8147 | break; |
8149 | } | 8148 | } |
8150 | if (i >= len - 5) | 8149 | if (i >= len - 5) |
@@ -9915,7 +9914,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev, | |||
9915 | PCI_EXP_DEVCTL_RELAX_EN); | 9914 | PCI_EXP_DEVCTL_RELAX_EN); |
9916 | pci_write_config_word(pdev, pos + PCI_EXP_DEVCTL, val16); | 9915 | pci_write_config_word(pdev, pos + PCI_EXP_DEVCTL, val16); |
9917 | 9916 | ||
9918 | dma_mask = DMA_44BIT_MASK; | 9917 | dma_mask = DMA_BIT_MASK(44); |
9919 | err = pci_set_dma_mask(pdev, dma_mask); | 9918 | err = pci_set_dma_mask(pdev, dma_mask); |
9920 | if (!err) { | 9919 | if (!err) { |
9921 | dev->features |= NETIF_F_HIGHDMA; | 9920 | dev->features |= NETIF_F_HIGHDMA; |