* [PATCH net] enic: do not call enic_change_mtu in enic_probe
@ 2018-07-30 16:56 Govindarajulu Varadarajan
2018-07-31 21:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Govindarajulu Varadarajan @ 2018-07-30 16:56 UTC (permalink / raw)
To: davem, netdev; +Cc: benve, Govindarajulu Varadarajan
In commit ab123fe071c9 ("enic: handle mtu change for vf properly")
ASSERT_RTNL() is added to _enic_change_mtu() to prevent it from being
called without rtnl held. enic_probe() calls enic_change_mtu()
without rtnl held. At this point netdev is not registered yet.
Remove call to enic_change_mtu and assign the mtu to netdev->mtu.
Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly")
Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
---
drivers/net/ethernet/cisco/enic/enic_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 6b0376123cde..60641e202534 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2892,7 +2892,6 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
enic->port_mtu = enic->config.mtu;
- (void)enic_change_mtu(netdev, enic->port_mtu);
err = enic_set_mac_addr(netdev, enic->mac_addr);
if (err) {
@@ -2982,6 +2981,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
/* MTU range: 68 - 9000 */
netdev->min_mtu = ENIC_MIN_MTU;
netdev->max_mtu = ENIC_MAX_MTU;
+ netdev->mtu = enic->port_mtu;
err = register_netdev(netdev);
if (err) {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] enic: do not call enic_change_mtu in enic_probe
2018-07-30 16:56 [PATCH net] enic: do not call enic_change_mtu in enic_probe Govindarajulu Varadarajan
@ 2018-07-31 21:45 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-31 21:45 UTC (permalink / raw)
To: gvaradar; +Cc: netdev, benve
From: Govindarajulu Varadarajan <gvaradar@cisco.com>
Date: Mon, 30 Jul 2018 09:56:54 -0700
> In commit ab123fe071c9 ("enic: handle mtu change for vf properly")
> ASSERT_RTNL() is added to _enic_change_mtu() to prevent it from being
> called without rtnl held. enic_probe() calls enic_change_mtu()
> without rtnl held. At this point netdev is not registered yet.
> Remove call to enic_change_mtu and assign the mtu to netdev->mtu.
>
> Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly")
> Signed-off-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-31 23:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 16:56 [PATCH net] enic: do not call enic_change_mtu in enic_probe Govindarajulu Varadarajan
2018-07-31 21:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox