]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Move MTD probe after netdev registration and name allocation
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 23 Oct 2009 08:33:09 +0000 (08:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Oct 2009 11:27:24 +0000 (04:27 -0700)
commit8680e94e087cc61ca776e4335f301b5c362e6bc2
tree34fa48857a1a5e4a1706a2f2921af884d6da3015
parente45556829f079534b27493c8398dbd202c7fe37f
sfc: Move MTD probe after netdev registration and name allocation

The MTD partition is named based on the netdev name, which is set to
'eth%d' before registration.  Also, the MTD partition will currently
be left registered if netdev registration fails.

Fix both these problems by moving the MTD probe after netdev
registration.  Hold the RTNL to serialise this with the netdev
notifier that calls efx_mtd_rename().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/efx.c