aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-dpaa2 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-06-07Merge tag 'staging-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-2/+4
Pull staging/IIO driver updates from Greg KH: "Here is the large set of staging and IIO driver changes for 5.8-rc1 Nothing major, but a lot of new IIO drivers are included in here, along with other core iio cleanups and changes. On the staging driver front, again, nothing noticable. No new deletions or additions, just a ton of tiny cleanups all over the tree done by a lot of different people. Most coding style, but many actual real fixes and cleanups that are nice to see. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (618 commits) staging: rtl8723bs: Use common packet header constants staging: sm750fb: Add names to proc_setBLANK args staging: most: usb: init return value in default path of switch/case expression staging: vchiq: Get rid of VCHIQ_SERVICE_OPENEND callback reason staging: vchiq: move vchiq_release_message() into vchiq staging: vchi: Get rid of C++ guards staging: vchi: Get rid of not implemented function declarations staging: vchi: Get rid of vchiq_status_to_vchi() staging: vchi: Get rid of vchi_service_set_option() staging: vchi: Merge vchi_msg_queue() into vchi_queue_kernel_message() staging: vchiq: Move copy callback handling into vchiq staging: vchi: Get rid of vchi_queue_user_message() staging: vchi: Get rid of vchi_service_destroy() staging: most: usb: use function sysfs_streq staging: most: usb: add missing put_device calls staging: most: usb: use correct error codes staging: most: usb: replace code to calculate array index staging: most: usb: don't use error path to exit function on success staging: most: usb: move allocation of URB out of critical section staging: most: usb: return 0 instead of variable ...
2020-04-30docs: networking: convert switchdev.txt to ReSTMauro Carvalho Chehab1-1/+1
- add SPDX header; - use copyright symbol; - adjust title markup; - mark code blocks and literals as such; - mark tables as such; - adjust identation, whitespaces and blank lines where needed; - add to networking/index.rst. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-13staging: fsl-dpaa2: ethsw: Fix parenthesis alignmentJohn B. Wyatt IV1-2/+4
Fix 2 parenthesis alignment issues. Reported by checkpatch. Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com> Link: https://lore.kernel.org/r/20200402023310.816245-1-jbwyatt4@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-17staging: fsl-dpaa2: ethsw: ethsw.c: Fix line over 80 charactersSandesh Kenjana Ashok1-1/+2
Issue found by checkpatch. Signed-off-by: Sandesh Kenjana Ashok <sandeshkenjanaashok@gmail.com> Link: https://lore.kernel.org/r/20200214232143.GA20675@SandeshPC Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: ordered workqueue should be per ethswIoana Ciornei2-8/+10
Create a different ordered workqueue per dpaa2-ethsw instance. Without this change, we overwrite the global queue and leak memory when probing multiple instances of the driver. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port switchdev blocking notifier per ethswIoana Ciornei2-6/+4
Register a different switchdev blocking notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port switchdev notifier per ethswIoana Ciornei2-7/+5
Register a different switchdev notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: dpaa2-ethsw: move port notifier per ethswIoana Ciornei2-7/+8
Register a different net_device notifier block per ethsw instance. When probing multiple dpaa2-ethsw instances, without this the register will fail. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1573491058-24766-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: do not force user to bring interface downIoana Ciornei1-9/+23
Link settings can be changed only when the interface is down. Disable and re-enable the interface, if necessary, behind the scenes so that we do not force users to an if down/up sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-11-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: register_netdev only when readyIoana Ciornei1-8/+6
The register_netdev() call should be made only when ready to process any user request on the interface. Move the call to be the last one issued in the probe sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-10-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: reword error messageIoana Ciornei1-2/+1
In the current state, the dpaa2-ethsw driver supports only one bridge per DPSW object. Reword the error message so that this information is much more clear. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-9-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove redundant VLAN checkIoana Ciornei1-5/+0
The ethsw_add_vlan() function is already called only when the VLAN is not yet configured on the switch. Remove the redundant check. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-8-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove unnecessary memsetIoana Ciornei1-3/+0
The ethtool core already zeroes the memory before calling .get_ethtool_stats() thus making the memset unnecessary. Remove it. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-7-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: use bool when encoding learning/flooding stateIoana Ciornei1-6/+6
Use a bool instead of an u8 in ethsw_set_learning() and ethsw_port_set_flood() to encode an binary type property. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-6-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove debug messageIoana Ciornei1-7/+0
Since ethtool will be loud enough if the .set_link_ksettings() callback fails, remove the debug messages which do not add additional information. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: add line terminator to all formatsIoana Ciornei2-6/+6
Add the '\n' line terminator to the string formats missing it. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: enable switch ports only on dev_openIoana Ciornei1-53/+6
At probe time, only the DPSW object should be enabled without the associated ports, which will get enabled on dev_open. Remove the ethsw_open() and ethsw_stop() functions and replace them only with dpsw_enable()/_disable(). Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-14staging: fsl-dpaa2/ethsw: remove IGMP default addressIoana Ciornei1-5/+2
Do not add an IGMP multicast address by default since we do not support Rx/Tx ar the moment. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-02staging: fsl-dpaa2/ethsw: Remove useless set memory to zero use memset()Wei Yongjun1-2/+0
The memory return by kzalloc() has already be set to zero, so remove useless memset(0). Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20190802013149.80952-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: fsl-dpaa2/ethsw: add .ndo_fdb[add|del] callbacksIoana Ciornei1-0/+27
Add the .ndo_fdb_[add|del] callbacks so that FDB entries not associated with a master device still end up offloaded. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1564416712-16946-6-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: fsl-dpaa2/ethsw: check added_by_user flagIoana Ciornei1-0/+4
We do not want to offload FDB entries if not added by user as static entries. Check the added_by_user flag and break if not set. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1564416712-16946-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: fsl-dpaa2/ethsw: add .ndo_fdb_dump callbackIoana Ciornei5-3/+224
Implement the .ndo_fdb_dump callback for the switch net devices. The list of all offloaded FDB entries is retrieved through the dpsw_fdb_dump() firmware call. Filter the entries by the switch port on which the callback was called and for each of them create a new neighbour message. Also remove the requirement from the TODO list. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1564416712-16946-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: fsl-dpaa2/ethsw: notify switchdev of offloaded entryIoana Ciornei1-2/+10
Notify switchdev in case the FDB entry was successfully offloaded. This will help users to make the distinction between entries known to the HW switch and those that are held only on the software bridge. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1564416712-16946-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: fsl-dpaa2/ethsw: remove unused structureIoana Ciornei1-31/+0
The dpsw_cfg structure is only used when creating a new dpsw DPAA2 object. In the DPAA2 architecture, objects are created at boot time by the firmware or dynamically from userspace while drivers on the fsl-mc bus only configure those objects. Remove the structure since it's of no use. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1564416712-16946-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: fsl-dpaa2/ethsw: Add comments to ETHSW_VLAN flagsRazvan Stefanescu1-0/+4
Document each ETHSW_VLAN flag with the appropriate comment. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1562336836-17119-7-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: fsl-dpaa2/ethsw: Add ndo_get_phys_port_nameRazvan Stefanescu1-0/+14
Add the ndo_get_phys_port_name callback to the ethsw driver. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1562336836-17119-5-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: fsl-dpaa2/ethsw: Remove netdevice on port probing errorRazvan Stefanescu1-3/+13
If the ethsw_port_init() call failed, the netdevice remains registered in the system. Use labels to ensure that netdevice is unregistered and freed in this case. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1562336836-17119-4-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: fsl-dpaa2/ethsw: Add network interface statisticsRazvan Stefanescu1-1/+3
Allocate MC portal with atomic context for I/O and enable network interface statistics for hardware counters. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1562336836-17119-3-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22staging: fsl-dpaa2/ethsw: Fix setting port learning/flooding flagsRazvan Stefanescu1-2/+3
ethsw_set_learning()/ethsw_set_flood() use flags parameter as an enable/disable (1/0) indicator. Previous usage sent incorrect values. Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1562336836-17119-2-git-send-email-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-09staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_workColin Ian King1-0/+1
In the default event case switchdev_work is being leaked because nothing is queued for work. Fix this by kfree'ing switchdev_work before returning NOTIFY_DONE. Addresses-Coverity: ("Resource leak") Fixes: 44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: fsl-dpaa2: use help instead of ---help--- in KconfigMoses Christopher1-4/+4
- Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher <moseschristopherb@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-20staging: fsl-dpaa2: ethsw: Remove return variableNishka Dasgupta1-3/+1
Remove return variable and return return value directly. Issue found by Coccinelle using ret.cocci. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-06Merge tag 'staging-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds3-3/+3
Pull staging/IIO updates from Greg KH: "Here is the big staging/iio driver pull request for 5.1-rc1. Lots of good IIO driver updates and cleanups in here as always. Combined with the removal of the xgifb driver, we have a net "loss" of over 9000 lines in the pull request, always a nice thing. As the outreachy application process is currently happening, there are loads of tiny checkpatch cleanup fixes all over the staging tree, which accounts for the majority of the fixups" * tag 'staging-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (341 commits) staging: mt7621-dma: remove license boilerplate text staging: mt7621-dma: add SPDX GPL-2.0+ license identifier Staging: ks7010: Replace typecast to int Staging: vt6655: Align a static function declaration staging: speakup: fix line over 80 characters. staging: mt7621-eth: Remove license boilerplate text staging: mt7621-eth: Add SPDX license identifier staging: ks7010: removed custom Michael MIC implementation. staging: rtl8192e: Fix space and suspect issue Staging: vt6655: Modify comment style of SPDX License Identifier Staging: vt6655: Modify comment style for SPDX-License-Identifier Staging: vt6655: Align a function declaration Staging: vt6655: Alignment of function declaration staging: rtl8712: Fix indentation issue staging: wilc1000: fix incorrent type in initializer staging: rtl8188eu: remove unused P2P_PRIVATE_IOCTL_SET_LEN staging: rtl8188eu: remove unused enum P2P_PROTO_WK_ID staging: rtl8723bs: Remove duplicated include from drv_types.h Staging: vt6655: Alignment should match open parenthesis staging: erofs: fix mis-acted TAIL merging behavior ...
2019-02-27net: Remove switchdev_opsFlorian Fainelli1-5/+0
Now that we have converted all possible callers to using a switchdev notifier for attributes we do not have a need for implementing switchdev_ops anymore, and this can be removed from all drivers the net_device structure. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-27staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_ATTR_SETFlorian Fainelli1-0/+21
Following patches will change the way we communicate setting a port's attribute and use a blocking notifier to perform those tasks. Prepare ethsw to support receiving notifier events targeting SWITCHDEV_PORT_ATTR_SET and simply translate that into the existing swdev_port_attr_set() call. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-26staging: fsl-dpaa2: ethsw: Add missing netdevice checkFlorian Fainelli1-0/+3
port_switchdev_event() does not check that the target network device is actually backed by the ethsw driver, this could be problematic in a stacked environment case. Fixes: 44baaa43d7cc ("staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-21net: Get rid of switchdev_port_attr_get()Florian Fainelli1-7/+0
With the bridge no longer calling switchdev_port_attr_get() to obtain the supported bridge port flags from a driver but instead trying to set the bridge port flags directly and relying on driver to reject unsupported configurations, we can effectively get rid of switchdev_port_attr_get() entirely since this was the only place where it was called. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21net: Remove SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORTFlorian Fainelli1-9/+1
Now that we have converted the bridge code and the drivers to check for bridge port(s) flags at the time we try to set them, there is no need for a get() -> set() sequence anymore and SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT therefore becomes unused. Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-21staging: fsl-dpaa2: ethsw: Handle PORT_PRE_BRIDGE_FLAGSFlorian Fainelli1-0/+14
In preparation for removing SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT, handle the SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS attribute and check that the bridge port flags being configured are supported. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-12staging: fsl-dpaa2: ethsw: Remove unused port_priv variableFlorian Fainelli1-2/+0
After 1b8b589d9103 ("staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS") we are not accessing any driver private data anymore, remove port_priv which is unused. Fixes: 1b8b589d9103 ("staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-12staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGSFlorian Fainelli1-5/+0
There is no code that tries to get the attribute SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-06staging: fsl-dpaa2: ethsw: Implement ndo_get_port_parent_id()Florian Fainelli1-4/+12
ethsw implements SWITCHDEV_ATTR_ID_PORT_PARENT_ID and we want to get rid of switchdev_ops eventually, ease that migration by implementing a ndo_get_port_parent_id() function which returns what switchdev_port_attr_get() would do. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-07staging: fsl-dpaa2: fix SPDX identifiers in header filesMichael Straube3-3/+3
Use the correct comment style for SPDX identifiers in header files. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06net: core: dev: Add extack argument to dev_open()Petr Machata1-1/+1
In order to pass extack together with NETDEV_PRE_UP notifications, it's necessary to route the extack to __dev_open() from diverse (possibly indirect) callers. One prominent API through which the notification is invoked is dev_open(). Therefore extend dev_open() with and extra extack argument and update all users. Most of the calls end up just encoding NULL, but bond and team drivers have the extack readily available. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23rocker, dsa, ethsw: Don't filter VLAN events on bridge itselfPetr Machata1-3/+0
Due to an explicit check in rocker_world_port_obj_vlan_add(), dsa_slave_switchdev_event() resp. port_switchdev_event(), VLAN objects that are added to a device that is not a front-panel port device are ignored. Therefore this check is immaterial. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23switchdev: Replace port obj add/del SDO with a notificationPetr Machata1-2/+0
Drop switchdev_ops.switchdev_port_obj_add and _del. Drop the uses of this field from all clients, which were migrated to use switchdev notification in the previous patches. Add a new function switchdev_port_obj_notify() that sends the switchdev notifications SWITCHDEV_PORT_OBJ_ADD and _DEL. Update switchdev_port_obj_del_now() to dispatch to this new function. Drop __switchdev_port_obj_add() and update switchdev_port_obj_add() likewise. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23staging: fsl-dpaa2: ethsw: Handle SWITCHDEV_PORT_OBJ_ADD/_DELPetr Machata1-0/+56
Following patches will change the way of distributing port object changes from a switchdev operation to a switchdev notifier. The switchdev code currently recursively descends through layers of lower devices, eventually calling the op on a front-panel port device. The notifier will instead be sent referencing the bridge port device, which may be a stacking device that's one of front-panel ports uppers, or a completely unrelated device. ethsw currently doesn't support any uppers other than bridge. SWITCHDEV_OBJ_ID_HOST_MDB and _PORT_MDB objects are always notified on the bridge port device. Thus the only case that a stacked device could be validly referenced by port object notifications are bridge notifications for VLAN objects added to the bridge itself. But the driver explicitly rejects such notifications in port_vlans_add(). It is therefore safe to assume that the only interesting case is that the notification is on a front-panel port netdevice. To handle SWITCHDEV_PORT_OBJ_ADD and _DEL, subscribe to the blocking notifier chain. Dispatch to swdev_port_obj_add() resp. _del() to maintain the behavior that the switchdev operation based code currently has. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-23staging: fsl-dpaa2: ethsw: Introduce ethsw_port_dev_check()Petr Machata1-1/+6
ethsw currently uses an open-coded comparison of netdev_ops to determine whether whether a device represents a front panel port. Wrap this into a named function to simplify reuse. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>