Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mlx4: Rename member mlx4_en_dev.nb to netdev_nb

Rename the mlx4_en_dev.nb notifier_block member to netdev_nb in
preparation to add a mlx4 core notifier_block.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Tested-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Petr Pavlu and committed by
David S. Miller
ef5617e3 71ab55a9

+9 -9
+7 -7
drivers/net/ethernet/mellanox/mlx4/en_main.c
··· 235 235 iounmap(mdev->uar_map); 236 236 mlx4_uar_free(dev, &mdev->priv_uar); 237 237 mlx4_pd_free(dev, mdev->priv_pdn); 238 - if (mdev->nb.notifier_call) 239 - unregister_netdevice_notifier(&mdev->nb); 238 + if (mdev->netdev_nb.notifier_call) 239 + unregister_netdevice_notifier(&mdev->netdev_nb); 240 240 kfree(mdev); 241 241 } 242 242 ··· 252 252 mdev->pndev[i] = NULL; 253 253 } 254 254 255 - /* register notifier */ 256 - mdev->nb.notifier_call = mlx4_en_netdev_event; 257 - if (register_netdevice_notifier(&mdev->nb)) { 258 - mdev->nb.notifier_call = NULL; 259 - mlx4_err(mdev, "Failed to create notifier\n"); 255 + /* register netdev notifier */ 256 + mdev->netdev_nb.notifier_call = mlx4_en_netdev_event; 257 + if (register_netdevice_notifier(&mdev->netdev_nb)) { 258 + mdev->netdev_nb.notifier_call = NULL; 259 + mlx4_err(mdev, "Failed to create netdev notifier\n"); 260 260 } 261 261 } 262 262
+1 -1
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
··· 2967 2967 if (!net_eq(dev_net(ndev), &init_net)) 2968 2968 return NOTIFY_DONE; 2969 2969 2970 - mdev = container_of(this, struct mlx4_en_dev, nb); 2970 + mdev = container_of(this, struct mlx4_en_dev, netdev_nb); 2971 2971 dev = mdev->dev; 2972 2972 2973 2973 /* Go into this mode only when two network devices set on two ports
+1 -1
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
··· 432 432 unsigned long last_overflow_check; 433 433 struct ptp_clock *ptp_clock; 434 434 struct ptp_clock_info ptp_clock_info; 435 - struct notifier_block nb; 435 + struct notifier_block netdev_nb; 436 436 }; 437 437 438 438