diff options
-rw-r--r-- | drivers/infiniband/hw/nes/nes_nic.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 1b0938c87774..77e258a57d4c 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -918,6 +918,10 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu) | |||
918 | struct nes_device *nesdev = nesvnic->nesdev; | 918 | struct nes_device *nesdev = nesvnic->nesdev; |
919 | int ret = 0; | 919 | int ret = 0; |
920 | u8 jumbomode = 0; | 920 | u8 jumbomode = 0; |
921 | u32 nic_active; | ||
922 | u32 nic_active_bit; | ||
923 | u32 uc_all_active; | ||
924 | u32 mc_all_active; | ||
921 | 925 | ||
922 | if ((new_mtu < ETH_ZLEN) || (new_mtu > max_mtu)) | 926 | if ((new_mtu < ETH_ZLEN) || (new_mtu > max_mtu)) |
923 | return -EINVAL; | 927 | return -EINVAL; |
@@ -931,8 +935,24 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu) | |||
931 | nes_nic_init_timer_defaults(nesdev, jumbomode); | 935 | nes_nic_init_timer_defaults(nesdev, jumbomode); |
932 | 936 | ||
933 | if (netif_running(netdev)) { | 937 | if (netif_running(netdev)) { |
938 | nic_active_bit = 1 << nesvnic->nic_index; | ||
939 | mc_all_active = nes_read_indexed(nesdev, | ||
940 | NES_IDX_NIC_MULTICAST_ALL) & nic_active_bit; | ||
941 | uc_all_active = nes_read_indexed(nesdev, | ||
942 | NES_IDX_NIC_UNICAST_ALL) & nic_active_bit; | ||
943 | |||
934 | nes_netdev_stop(netdev); | 944 | nes_netdev_stop(netdev); |
935 | nes_netdev_open(netdev); | 945 | nes_netdev_open(netdev); |
946 | |||
947 | nic_active = nes_read_indexed(nesdev, | ||
948 | NES_IDX_NIC_MULTICAST_ALL); | ||
949 | nic_active |= mc_all_active; | ||
950 | nes_write_indexed(nesdev, NES_IDX_NIC_MULTICAST_ALL, | ||
951 | nic_active); | ||
952 | |||
953 | nic_active = nes_read_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL); | ||
954 | nic_active |= uc_all_active; | ||
955 | nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active); | ||
936 | } | 956 | } |
937 | 957 | ||
938 | return ret; | 958 | return ret; |