linux-sg2042/drivers/net/ethernet/mscc
Vladimir Oltean e5fb512d81 net: mscc: ocelot: deinitialize only initialized ports
Currently mscc_ocelot_init_ports() will skip initializing a port when it
doesn't have a phy-handle, so the ocelot->ports[port] pointer will be
NULL. Take this into consideration when tearing down the driver, and add
a new function ocelot_deinit_port() to the switch library, mirror of
ocelot_init_port(), which needs to be called by the driver for all ports
it has initialized.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-18 13:52:34 -07:00
..
Kconfig net: mscc: ocelot: rethink Kconfig dependencies again 2020-07-16 12:46:00 -07:00
Makefile net: mscc: ocelot: rename ocelot_ace.{c, h} to ocelot_vcap.{c,h} 2020-06-20 17:25:23 -07:00
ocelot.c net: mscc: ocelot: deinitialize only initialized ports 2020-09-18 13:52:34 -07:00
ocelot.h net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields 2020-07-13 17:40:01 -07:00
ocelot_flower.c net:qos: police action offloading parameter 'burst' change to the original value 2020-06-29 17:33:42 -07:00
ocelot_io.c net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields 2020-07-13 17:40:01 -07:00
ocelot_net.c net: mscc: ocelot: add locking for the port TX timestamp ID 2020-09-18 13:52:33 -07:00
ocelot_police.c net: mscc: ocelot: move net_device related functions to ocelot_net.c 2020-06-20 17:25:23 -07:00
ocelot_police.h net: mscc: ocelot: unexpose ocelot_vcap_policer_{add,del} 2020-06-20 17:25:23 -07:00
ocelot_ptp.c net: mscc: ocelot: add support for PTP waveform configuration 2020-07-19 19:22:57 -07:00
ocelot_qs.h
ocelot_rew.h
ocelot_s2.h net: mscc: ocelot: Add support for tcam 2019-06-02 13:49:49 -07:00
ocelot_vcap.c net: mscc: ocelot: unexpose ocelot_vcap_policer_{add,del} 2020-06-20 17:25:23 -07:00
ocelot_vcap.h net: mscc: ocelot: generalize the "ACE/ACL" names 2020-06-20 17:25:23 -07:00
ocelot_vsc7514.c net: mscc: ocelot: deinitialize only initialized ports 2020-09-18 13:52:34 -07:00