Module Name: src
Committed By: hannken
Date: Mon Oct 18 08:15:00 UTC 2021
Modified Files:
src/sys/dev/pci: xmm7360.c
Log Message:
Use a local static variable to hold "pktq_rps_hash_default"
like the other devices do.
Kernel ALL/amd64 compiles again.
OK: Kengo NAKAHARA <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/xmm7360.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/xmm7360.c
diff -u src/sys/dev/pci/xmm7360.c:1.12 src/sys/dev/pci/xmm7360.c:1.13
--- src/sys/dev/pci/xmm7360.c:1.12 Mon Oct 11 05:13:10 2021
+++ src/sys/dev/pci/xmm7360.c Mon Oct 18 08:15:00 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: xmm7360.c,v 1.12 2021/10/11 05:13:10 knakahara Exp $ */
+/* $NetBSD: xmm7360.c,v 1.13 2021/10/18 08:15:00 hannken Exp $ */
/*
* Device driver for Intel XMM7360 LTE modems, eg. Fibocom L850-GL.
@@ -75,7 +75,7 @@ MODULE_DEVICE_TABLE(pci, xmm7360_ids);
#include "opt_gateway.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.12 2021/10/11 05:13:10 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.13 2021/10/18 08:15:00 hannken Exp $");
#endif
#include <sys/param.h>
@@ -294,6 +294,7 @@ typedef struct kmutex spinlock_t;
tsleep(xmm, 0, "wwancsl", msec * hz / 1000); \
} while (0)
+static pktq_rps_hash_func_t xmm7360_pktq_rps_hash_p;
static void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, int);
static void dma_free_coherent(struct device *, size_t, volatile void *, dma_addr_t);
@@ -3110,7 +3111,7 @@ wwan_if_input(struct ifnet *ifp, struct
/* No errors. Receive the packet. */
m_set_rcvif(m, ifp);
- const uint32_t h = pktq_rps_hash(&pktq_rps_hash_default, m);
+ const uint32_t h = pktq_rps_hash(&xmm7360_pktq_rps_hash_p, m);
if (__predict_false(!pktq_enqueue(pktq, m, h))) {
m_freem(m);
}
@@ -3257,6 +3258,8 @@ wwan_attach(struct device *parent, struc
printf("\n");
#ifdef __NetBSD__
+ xmm7360_pktq_rps_hash_p = pktq_rps_hash_default;
+
if (pmf_device_register(self, wwan_pmf_suspend, NULL))
pmf_class_network_register(self, ifp);
else