aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index d6e90c72c257..6dfcbf523936 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2056,7 +2056,6 @@ vmxnet3_set_mc(struct net_device *netdev)
2056 if (!netdev_mc_empty(netdev)) { 2056 if (!netdev_mc_empty(netdev)) {
2057 new_table = vmxnet3_copy_mc(netdev); 2057 new_table = vmxnet3_copy_mc(netdev);
2058 if (new_table) { 2058 if (new_table) {
2059 new_mode |= VMXNET3_RXM_MCAST;
2060 rxConf->mfTableLen = cpu_to_le16( 2059 rxConf->mfTableLen = cpu_to_le16(
2061 netdev_mc_count(netdev) * ETH_ALEN); 2060 netdev_mc_count(netdev) * ETH_ALEN);
2062 new_table_pa = dma_map_single( 2061 new_table_pa = dma_map_single(
@@ -2064,15 +2063,18 @@ vmxnet3_set_mc(struct net_device *netdev)
2064 new_table, 2063 new_table,
2065 rxConf->mfTableLen, 2064 rxConf->mfTableLen,
2066 PCI_DMA_TODEVICE); 2065 PCI_DMA_TODEVICE);
2066 }
2067
2068 if (new_table_pa) {
2069 new_mode |= VMXNET3_RXM_MCAST;
2067 rxConf->mfTablePA = cpu_to_le64(new_table_pa); 2070 rxConf->mfTablePA = cpu_to_le64(new_table_pa);
2068 } else { 2071 } else {
2069 netdev_info(netdev, "failed to copy mcast list" 2072 netdev_info(netdev,
2070 ", setting ALL_MULTI\n"); 2073 "failed to copy mcast list, setting ALL_MULTI\n");
2071 new_mode |= VMXNET3_RXM_ALL_MULTI; 2074 new_mode |= VMXNET3_RXM_ALL_MULTI;
2072 } 2075 }
2073 } 2076 }
2074 2077
2075
2076 if (!(new_mode & VMXNET3_RXM_MCAST)) { 2078 if (!(new_mode & VMXNET3_RXM_MCAST)) {
2077 rxConf->mfTableLen = 0; 2079 rxConf->mfTableLen = 0;
2078 rxConf->mfTablePA = 0; 2080 rxConf->mfTablePA = 0;
@@ -2091,11 +2093,10 @@ vmxnet3_set_mc(struct net_device *netdev)
2091 VMXNET3_CMD_UPDATE_MAC_FILTERS); 2093 VMXNET3_CMD_UPDATE_MAC_FILTERS);
2092 spin_unlock_irqrestore(&adapter->cmd_lock, flags); 2094 spin_unlock_irqrestore(&adapter->cmd_lock, flags);
2093 2095
2094 if (new_table) { 2096 if (new_table_pa)
2095 dma_unmap_single(&adapter->pdev->dev, new_table_pa, 2097 dma_unmap_single(&adapter->pdev->dev, new_table_pa,
2096 rxConf->mfTableLen, PCI_DMA_TODEVICE); 2098 rxConf->mfTableLen, PCI_DMA_TODEVICE);
2097 kfree(new_table); 2099 kfree(new_table);
2098 }
2099} 2100}
2100 2101
2101void 2102void