summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-06-13 15:43:06 +0000
committerAndroid Partner Code Review <android-gerrit-partner@google.com>2023-06-13 15:43:06 +0000
commitc8e0e92c75730b4dcced2d916d816ae7396f81f1 (patch)
tree5ecf78567ec0bd1951940f750016afd0b08b7c65
parent1fb5e634d5c562ce5ef447f8c8ebb737cc05b327 (diff)
parent38f51bf5f5992fbe263ea9cb34f7c00755d27166 (diff)
downloadbcm4398-c8e0e92c75730b4dcced2d916d816ae7396f81f1.tar.gz
Merge "DHD: 4398 - do not collect coredump for B0/C0 older chip revs" into android14-gs-pixel-5.15-udc-d1
-rw-r--r--Kbuild2
-rw-r--r--dhd_linux.c16
2 files changed, 16 insertions, 2 deletions
diff --git a/Kbuild b/Kbuild
index 3236619..c9f4363 100644
--- a/Kbuild
+++ b/Kbuild
@@ -352,6 +352,8 @@ ifneq ($(CONFIG_SOC_GOOGLE),)
DHDCFLAGS += -DDHD_TREAT_D3ACKTO_AS_LINKDWN
# Skip coredump for certain health check traps
DHDCFLAGS += -DDHD_SKIP_COREDUMP_ON_HC
+ # Skip coredump for older chip revs
+ DHDCFLAGS += -DDHD_SKIP_COREDUMP_OLDER_CHIPS
endif
endif
diff --git a/dhd_linux.c b/dhd_linux.c
index d22ead9..7b857ef 100644
--- a/dhd_linux.c
+++ b/dhd_linux.c
@@ -20157,14 +20157,26 @@ extern int dhd_collect_coredump(dhd_pub_t *dhdp, dhd_dump_t *dump);
#ifdef DHD_SSSR_COREDUMP
static bool
-dhd_is_coredump_reqd(char *trapstr, uint str_len)
+dhd_is_coredump_reqd(char *trapstr, uint str_len, dhd_pub_t *dhdp)
{
+ uint16 chipid = dhd_get_chipid(dhdp->bus);
+
+ BCM_REFERENCE(chipid);
+
#ifdef DHD_SKIP_COREDUMP_ON_HC
if (trapstr && str_len &&
strnstr(trapstr, DHD_COREDUMP_IGNORE_TRAP_SIG, str_len)) {
return FALSE;
}
#endif /* DHD_SKIP_COREDUMP_ON_HC */
+
+#ifdef DHD_SKIP_COREDUMP_OLDER_CHIPS
+ /* customer ask to skip coredump collection for older chip revs */
+ if (BCM4397_CHIP(chipid) && (dhd_get_chiprev(dhdp->bus) <= 2)) {
+ return FALSE;
+ }
+#endif /* DHD_SKIP_COREDUMP_OLDER_CHIPS */
+
return TRUE;
}
#endif /* DHD_SSSR_COREDUMP */
@@ -20381,7 +20393,7 @@ dhd_mem_dump(void *handle, void *event_info, u8 event)
#ifdef DHD_SSSR_COREDUMP
if (dhd_is_coredump_reqd(dhdp->memdump_str,
- strnlen(dhdp->memdump_str, DHD_MEMDUMP_LONGSTR_LEN))) {
+ strnlen(dhdp->memdump_str, DHD_MEMDUMP_LONGSTR_LEN), dhdp)) {
ret = dhd_collect_coredump(dhdp, dump);
if (ret == BCME_ERROR) {
DHD_ERROR(("%s: dhd_collect_coredump() failed.\n",