mirror of
https://github.com/breeze303/nss-packages.git
synced 2025-12-16 08:44:52 +00:00
Revert "qca-nss-drv: add NAPI threading"
This reverts commit 5700922738.
Causes panic on IPQ807x platforms after sometime. Drop NAPI patch
[180247.904310] Call trace:
[180247.908300] dump_backtrace+0xb0/0x10c
[180247.910992] show_stack+0x18/0x24
[180247.914550] dump_stack_lvl+0x48/0x60
[180247.918023] dump_stack+0x18/0x24
[180247.921756] __schedule_bug+0x54/0x6c
[180247.925141] __schedule+0x4f0/0x5e8
[180247.928873] schedule+0x5c/0xc4
[180247.932605] napi_threaded_poll+0x60/0x1f8
[180247.935819] kthread+0x10c/0x110
[180247.939724] ret_from_fork+0x10/0x20
[180609.113998] BUG: scheduling while atomic: napi/nss-9/1264/0x00000201
Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
f9ca66a002
commit
5fa030cfed
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-drv
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-drv.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -302,6 +302,8 @@ int nss_hal_probe(struct platform_device
|
||||
* Initialize the dummy netdevice.
|
||||
*/
|
||||
init_dummy_netdev(&nss_ctx->napi_ndev);
|
||||
+ strcpy(nss_ctx->napi_ndev.name, "nss");
|
||||
+ nss_ctx->napi_ndev.threaded = 1;
|
||||
|
||||
for (i = 0; i < npd->num_irq; i++) {
|
||||
err = nss_hal_register_irq(nss_ctx, npd, &nss_ctx->napi_ndev, i);
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -2423,8 +2423,7 @@ int nss_core_handle_napi(struct napi_str
|
||||
int_ctx->cause |= int_cause;
|
||||
} while ((int_ctx->cause) && (budget));
|
||||
|
||||
- if (int_ctx->cause == 0) {
|
||||
- napi_complete(napi);
|
||||
+ if (int_ctx->cause == 0 && napi_complete(napi)) {
|
||||
|
||||
/*
|
||||
* Re-enable any further interrupt from this IRQ
|
||||
@@ -2464,8 +2463,8 @@ int nss_core_handle_napi_sdma(struct nap
|
||||
ctrl->consumer[0].dispatch.fp(ctrl->consumer[0].arg.kp);
|
||||
|
||||
#if !defined(NSS_HAL_IPQ806X_SUPPORT)
|
||||
- napi_complete(napi);
|
||||
- enable_irq(int_ctx->irq);
|
||||
+ if (napi_complete(napi))
|
||||
+ enable_irq(int_ctx->irq);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -2480,10 +2479,8 @@ int nss_core_handle_napi_queue(struct na
|
||||
struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
|
||||
|
||||
processed = nss_core_handle_cause_queue(int_ctx, int_ctx->cause, budget);
|
||||
- if (processed < budget) {
|
||||
- napi_complete(napi);
|
||||
+ if (processed < budget && napi_complete(napi))
|
||||
enable_irq(int_ctx->irq);
|
||||
- }
|
||||
|
||||
return processed;
|
||||
}
|
||||
@@ -2497,8 +2494,8 @@ int nss_core_handle_napi_non_queue(struc
|
||||
struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
|
||||
|
||||
nss_core_handle_cause_nonqueue(int_ctx, int_ctx->cause, 0);
|
||||
- napi_complete(napi);
|
||||
- enable_irq(int_ctx->irq);
|
||||
+ if (napi_complete(napi))
|
||||
+ enable_irq(int_ctx->irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -302,6 +302,8 @@ int nss_hal_probe(struct platform_device
|
||||
* Initialize the dummy netdevice.
|
||||
*/
|
||||
init_dummy_netdev(&nss_ctx->napi_ndev);
|
||||
+ strcpy(nss_ctx->napi_ndev.name, "nss");
|
||||
+ nss_ctx->napi_ndev.threaded = 1;
|
||||
|
||||
for (i = 0; i < npd->num_irq; i++) {
|
||||
err = nss_hal_register_irq(nss_ctx, npd, &nss_ctx->napi_ndev, i);
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -2423,8 +2423,7 @@ int nss_core_handle_napi(struct napi_str
|
||||
int_ctx->cause |= int_cause;
|
||||
} while ((int_ctx->cause) && (budget));
|
||||
|
||||
- if (int_ctx->cause == 0) {
|
||||
- napi_complete(napi);
|
||||
+ if (int_ctx->cause == 0 && napi_complete(napi)) {
|
||||
|
||||
/*
|
||||
* Re-enable any further interrupt from this IRQ
|
||||
@@ -2464,8 +2463,8 @@ int nss_core_handle_napi_sdma(struct nap
|
||||
ctrl->consumer[0].dispatch.fp(ctrl->consumer[0].arg.kp);
|
||||
|
||||
#if !defined(NSS_HAL_IPQ806X_SUPPORT)
|
||||
- napi_complete(napi);
|
||||
- enable_irq(int_ctx->irq);
|
||||
+ if (napi_complete(napi))
|
||||
+ enable_irq(int_ctx->irq);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -2480,10 +2479,8 @@ int nss_core_handle_napi_queue(struct na
|
||||
struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
|
||||
|
||||
processed = nss_core_handle_cause_queue(int_ctx, int_ctx->cause, budget);
|
||||
- if (processed < budget) {
|
||||
- napi_complete(napi);
|
||||
+ if (processed < budget && napi_complete(napi))
|
||||
enable_irq(int_ctx->irq);
|
||||
- }
|
||||
|
||||
return processed;
|
||||
}
|
||||
@@ -2497,8 +2494,8 @@ int nss_core_handle_napi_non_queue(struc
|
||||
struct int_ctx_instance *int_ctx = container_of(napi, struct int_ctx_instance, napi);
|
||||
|
||||
nss_core_handle_cause_nonqueue(int_ctx, int_ctx->cause, 0);
|
||||
- napi_complete(napi);
|
||||
- enable_irq(int_ctx->irq);
|
||||
+ if (napi_complete(napi))
|
||||
+ enable_irq(int_ctx->irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user