Commit Graph

61 Commits

Author SHA1 Message Date
Robert Marko
d3a3989058 qca-ssdk-shell: update to 12.1.5.r3
Sync with SSDK.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-09-28 12:15:54 +02:00
Alexandru Gagniuc
43f19d8112 qca-ssdk: update to QSDK 12.1.5.r3
This "newer" version allows using 3rd party PHYs that are already
supported in the upstream kernel. Some devices use non-QCA PHYs, and
thus must rely on the kernel PHY drivers instead.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-09-28 12:15:25 +02:00
Robert Marko
2ce7693715 Revert "nss-dp: edma-v1: try to improve driver performance"
This reverts commit abdc8ff534, reversing
changes made to 76602b9c18.

It looks like this needs to be further refined as users are reporting
reduced performance and we also see spurious NAPI over-budget warnings.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-07-24 23:30:46 +02:00
Christian Marangi
abdc8ff534
nss-dp: edma-v1: try to improve driver performance
2e82c51 nss-dp: edma-v1: improve napi and irq handling for rx/tx
92aa9ba nss-dp: edma-v1: add support for threaded napi
75129b9 nss-dp: edma-v1: split tx/rx path to specific napi and irq
2c27cb4 nss-dp: edma-v1: convert rx/tx store to idr implementation
2022-06-27 16:33:44 +02:00
Christian Marangi
2e82c51069
nss-dp: edma-v1: improve napi and irq handling for rx/tx
Various improvement on how napi and irq are handled for rx/tx.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-06-27 16:29:01 +02:00
Christian Marangi
92aa9ba865
nss-dp: edma-v1: add support for threaded napi
Add support for threaded napi.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-06-27 16:28:49 +02:00
Christian Marangi
75129b9dbc
nss-dp: edma-v1: split tx/rx path to specific napi and irq
Split tx and rx path to specific napi and irq handler.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-06-24 20:08:17 +02:00
Christian Marangi
2c27cb4ce1
nss-dp: edma-v1: convert rx/tx store to idr implementation
Add patch to convert rx/tx store to idr implementation

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-06-24 17:02:10 +02:00
Robert Marko
76602b9c18 nss-dp: edma-v1: switch to napi_gro_receive
Utilize napi_gro_receive instead of plain netif_receive_skb on EDMA v1.
It provides significant performance improvements when testing with iperf3.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-06-23 14:28:10 +02:00
Alexandru Gagniuc
3395afd07a nss-dp: Support "phy-handle" properties for PHY connection
A phy-handle is a more intuitive way to declare the PHY connection
when compared to the abomination that qualcomm implemented. In the
interest of maintaing the sanity of developers porting hardware,
shield them from the abomination wth the use of 'phy-handle.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2022-06-13 19:25:10 +02:00
Ansuel Smith
e344c6492d
nss-dp: silence debug log on xgmac probe
A debug log is wrongly print as info on xgmac probe.
Silence it as user could get confused.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-19 23:43:13 +02:00
Ansuel Smith
d442d1328e
qca-nss-drv: disable additional module not used
Add patch to permit more modularization and disable
additional module not used. PPPOE is disabled by default.
Will be enabled later if PPPOE offload will be reintroduced.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-17 21:40:05 +02:00
Ansuel Smith
882ea0ee5a
nss-dp: fix confusing printing on driver probe
Net core changed implementation upstream. This results in nss-dp
printing confusing info log to the user as it does print
the netdev name before netdev is registered. Move the old log to dbg
and add an additional info log after netdev_register to give the user
feedback of correct driver probe.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-17 16:06:37 +02:00
Ansuel Smith
76d8866ea2
nss-dp: refresh patches from QSDK 12.0 update
Refresh patches from QSDK 12.0 update using
make package/qca-nss-dp/refresh

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-17 16:06:36 +02:00
Robert Marko
649daa06c7 qca-ssdk-shell: update to 12.0
Update the SSDK shell 12.0 release to match SSDK.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-05-16 21:27:49 +02:00
Ansuel Smith
9324002719 qca-nss-drv: fix use of custom skb_skip_tc_classify
Use standard skb_skip_tc_classify instead of using custom api
and bit.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
8d6d7b6fe1 qca-nss-drv: fix use of dmac_{inv/clean}_range with standard api
Drop use of dmac_{inv/clean}_range and use generic dma sync api.
This should permit us to compile nss-drv without adding additional
patch to the upstream kernel.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
f04e4036c0 nss-drv: update to QSDK 12.0
Update nss-drv to QSDK 12.0

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
27071d79d8 qca-nss-dp: update to QSDK 12.0
Update qca-nss-dp to QSDK 12.0

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
275fe3a0b0 qca-ssdk: update to QSDK 12.0
Update qca-ssdk to QSDK 12.0.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
ddce3f6da1 nss-firmware: update to 12.0r1-002 bin
Update nss-firmware to 12.0r1-002 bin

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
Ansuel Smith
ea5a395dc2 nss-drv: add support for kernel 5.15
Add support for kernel 5.15 for nss-drv

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
XiaoliChan
edf4a0edcb [qca-ecm init] Add if condition in start function
Without this, the "net.bridge.bridge" will append into /etc/sysctl.d/qca-nss-ecm.conf in every system reboot/startup.

Signed-off-by: Xiaoli Chan <2209553467@qq.com>
2022-04-05 13:53:33 +02:00
Robert Marko
1f3addc3a2 treewide: update GIT source URL-s
Codeaurora is now in archive-only mode as everything has been moved to the
Gitlab based git.codelinaro.org

So, update all of the source URL-s as well as update to the latest 11.4
commit if there is a newer one.

Refresh patches as well if any have offsets or fuzzes.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-04-04 13:11:12 +02:00
Robert Marko
cb73d6682b treewide: mark 5.10 only kmods
Mark kmods which only currently work on 5.10 as such.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-19 18:35:07 +01:00
Robert Marko
293ea85ef8 nss-dp: fix FDB roaming
Try and solve the roaming issue by trying to replicate what NSS bridge
module is doing, but by utilizing switchdev FDB notifiers instead of
adding new notifiers to the bridge code.

We register a new non-blocking switchdev notifier and simply wait for
notification, and then process the SWITCHDEV_FDB_DEL_TO_DEVICE
notifications.

Those tell us that a certain FDB entry should be removed, then a VSI ID
is fetched for the physical PPE port and using that VSI ID and the
notification provided MAC adress existing FDB entry gets removed.

Mark qca-nss-dp as conflicting with the old NSS bridge module so
both cant be installed at the same time.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-19 18:34:58 +01:00
Robert Marko
8987699f24 nss-dp: fix switchdev for 5.15
Apply upstream switchdev changes to allow utilizing the switchdev code
on 5.15 kernel.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-18 18:31:33 +01:00
Robert Marko
f1c646d45b nss-dp: mark as required for preinit
Mark the NSS-DP kmod as required for preinit, thus it gets loaded before
preinit.

This finally allows using failsafe as now the network interfaces are
available for preinit to configure them.

Its still required to set the correct interface in preinit script for
each board.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-14 22:46:46 +01:00
Robert Marko
7833eff264 nss-drv: enable crypto
This enables the crypto code required by nss-crypto.

Also, disable erroring out on unused variables.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
43d92e2d79 Add 11.4 NSS Crypto
Add nss-crypto from QSDK11.4.

It provides support for the EIP-197 crypto HW.
It requires the EIP-197 firmware binaries.
They are not freely distributed and have to be pulled
from the stock firmware.

Made for IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
c5e731e58d firmware: Add NSS EIP firmware package
This is just a helper package that helps ensure
that the EIP-197 firmware is installed by being
used as a dependency on nss-crypto.

Note that the package does not provide or ship
with firmware binaries itself.
Those need to be pulled from the stock firmware.
Binaries required are:
* ifpp.bin
* ipue.bin
* ofpp.bin
* opue.bin

They should be placed inside of the src folder.

Note that we add the src folder to the .gitignore to
prevent accidentally pushing the FW to a public repo.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
0012f0a236 firmware: add AQR firmware loader
This provides a way of loading the firmware to Aquantia PHY-s which require it
from userspace.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-08 12:14:40 +01:00
Robert Marko
43a2da39d5 qca-nss-dp: implement ethernet IOCTL-s
Since kernel 5.15 ethernet/PHY related IOCTL-s have been split from the
generic IOCTL netdev op.
So, implement the new op instead of the generic one which is considered
for private IOCTL-s only now for 5.15+.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-08 12:09:43 +01:00
Robert Marko
11ce14453b qca807x: add a LED quirk for Xiaomi AX3600
AX3600 requires the same LED quirk so that PHY LED-s will blink even
once Linux resets the PHY.

So, just check for its compatible.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-26 14:55:52 +01:00
Robert Marko
1c9e256a25 Remove SSDK misplaced patch
The AX9000 quirk patch got left in the NSS root folder as well,
drop it.

Fixes: c78f42fe59 ("qca807x: add a LED quirk for Xiaomi AX9000")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-11 18:14:43 +01:00
Robert Marko
c78f42fe59 qca807x: add a LED quirk for Xiaomi AX9000
Xiaomi AX9000 has a single LED for each of 4 gigabit ethernet ports that
are connected to QCA8075, and that LED is connected to the 100M LED pin.

So, by default it will only work when in 10 or 100Mbit mode, this is quite
annoying and makes no sense(If they have connected it to the 1000Mbit LED
pin then it would have worked for 10/100 by default as well).

So, to solve this add a check for system compatible as we cant parse if
from DTS in any other way and set the 100M LED to blink on 1000Base-T
as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-11 00:44:47 +01:00
Robert Marko
afb1ac339c SSDK: add kernel 5.15 support
Add SSDK support for kernel 5.15, it just required the configuration check
and QCA8081 IRQ model update.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-01 20:01:52 +01:00
Dirk Buchwalder
f29396f467 qca-ssdk: This adds support for the AQR113C with the id
"113CB0 / 0x31c31C12" to the ssdk.

This is used in the QNAP 301w

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
2021-11-03 17:33:33 +01:00
psi-c
05904ca2b5 qca-nss-clients: Add bridge-mgr & vlan-mgr
Add support for bridge-mgr to fix switch-roaming issues on ipq807x.
2021-10-24 18:29:40 +02:00
Ansuel Smith
dff684e695 nss-drv: remove mismatched NSS FW support
There is no need for the mismatched 11.3 FW support on 11.4
SPF drivers, so drop the support.

This reverts commit f806309bbe.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-09-16 18:25:20 +02:00
Robert Marko
e2d6646754 nss-firmware: update to SPF 11.4
Qualcomm has finally made the firmware publicly
available, so lets update to it.

This will allow removing the compatibility patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-09-16 18:25:20 +02:00
Robert Marko
37a540ecd2 qca-nss-dp: fix of_get_mac_address()
Recently OpenWrt backported the updated of_get_mac_address()
function which returns and error code instead.

So, patch the SSDK to use it and fix the compilation error.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-08-13 20:14:48 +02:00
Robert Marko
28e62b1718 qca-ssdk: fix of_get_mac_address()
Recently OpenWrt backported the updated of_get_mac_address()
function which returns and error code instead.

So, patch the SSDK to use it and fix the compilation error.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-08-13 20:14:32 +02:00
Zhijun You
47bcf2b275 qca-ssdk: disable stack protector
add -fno-stack-protector to EXTRACFLAGS
so it can be compiled with GCC10

Signed-off-by: Zhijun You <hujy652@gmail.com>
2021-07-18 11:00:55 +02:00
Dirk Buchwalder
ce77000019 qca-nss-ecm: resolve the cpu high load regarding ecm
If using ECM, cpu load goes up (around 1.0) and stucks there.
This is due to using uninterruptible sleep function,
the patch changes this to interruptible sleep function.

Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
2021-06-27 19:27:11 +02:00
Robert Marko
fc7b92be0f SSDK: disable parallel build
Actual code is being built in single thread mode as
SSDK enforces it, this will just cause OpenWrt buildroot
to fail sometimes as the headers it tries to use are not
yet installed by the SSDK.

So, disable parallel build as the time saving was minor
and it caused issues with parallel building.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-25 18:35:16 +02:00
Tiago Gaspar
884bf7fb08 qca-nss-clients: fix dependency issue
This commit fixes a dependency issue that was not allowing
qca-nss-clients to show up in menuconfig unless kmod-ppp was selected


Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2021-06-22 12:19:15 +02:00
Tiago Gaspar
82e0e83f35 qca-nss-ecm: fix dependency issue
This commit fixes a dependency issue that was not allowing qca-nss-ecm
to show up in menuconfig unless kmod-ppp was selected


Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2021-06-21 15:18:03 +02:00
Robert Marko
4667f4acb4 nss-drv: fix NSS FW coredump
DMA functions used for NSS FW coredump are called
with NULL being passed instead of device pointer.
This will obviously cause a NULL pointer exception
and crash the kernel.

So, fix it by passing proper device structure pointer.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-09 12:09:49 +02:00
Robert Marko
73460a73af nss-ecm: correct physdev iptables dependency
By accident ECM depended twice on kmod-ipt-physdev
instead of depending on iptables-mod-physdev.

So fix this by replacing the duplicate dependency with
iptables-mod-physdev.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-06 19:41:24 +02:00