linux/drivers/net/ethernet/renesas
Yuusuke Ashizuka 1838d6c62f ravb: Fixed to be able to unload modules
When this driver is built as a module, I cannot rmmod it after insmoding
it.
This is because that this driver calls ravb_mdio_init() at the time of
probe, and module->refcnt is incremented by alloc_mdio_bitbang() called
after that.
Therefore, even if ifup is not performed, the driver is in use and rmmod
cannot be performed.

$ lsmod
Module                  Size  Used by
ravb                   40960  1
$ rmmod ravb
rmmod: ERROR: Module ravb is in use

Call ravb_mdio_init() at open and free_mdio_bitbang() at close, thereby
rmmod is possible in the ifdown state.

Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Yuusuke Ashizuka <ashiduka@fujitsu.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-08-24 15:38:02 -07:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ethernet: renesas: convert to SPDX identifiers 2018-09-10 10:11:53 -07:00
ravb.h ravb: implement MTU change while device is up 2019-11-14 18:05:25 -08:00
ravb_main.c ravb: Fixed to be able to unload modules 2020-08-24 15:38:02 -07:00
ravb_ptp.c ptp: Introduce strict checking of external time stamp options. 2019-11-15 12:48:32 -08:00
sh_eth.c net: renesas: Fix use correct return type for ndo_start_xmit() 2020-05-06 14:13:39 -07:00
sh_eth.h sh_eth: use Gigabit register map for R7S72100 2020-02-16 19:44:41 -08:00