summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2009-08-13 20:18:58 +0000
committersruffell <sruffell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2009-08-13 20:18:58 +0000
commit94fd1de1eed0f548fa70239a887bc83adbdfa1df (patch)
tree615bdf7a603c169a209b3ffb51501869ace3adfb
parent4703ef88e5af411446882d640b1a8fd4d3f9c5cf (diff)
voicebus: Define CONFIG_STORE_USER on 2.6.22 when CONFIG_SLUB is defined.
This is to work around a known issue with linux 2.6.22. For more information see http://thread.gmane.org/gmane.linux.kernel/618031 git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4677 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--kernel/voicebus.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/voicebus.c b/kernel/voicebus.c
index aabfd8c..2a2183c 100644
--- a/kernel/voicebus.c
+++ b/kernel/voicebus.c
@@ -1322,6 +1322,7 @@ voicebus_init(struct pci_dev *pdev, u32 framesize,
{
int retval = 0;
struct voicebus *vb;
+ unsigned long cache_flags;
assert(NULL != pdev);
assert(NULL != board_name);
@@ -1379,15 +1380,21 @@ voicebus_init(struct pci_dev *pdev, u32 framesize,
vb->handle_receive = handle_receive;
vb->handle_transmit = handle_transmit;
vb->context = context;
+
+#if defined(CONFIG_SLUB) && (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22))
+ cache_flags = SLAB_HWCACHE_ALIGN | SLAB_STORE_USER | SLAB_DEBUG_FREE;
+#else
+ cache_flags = SLAB_HWCACHE_ALIGN;
+#endif
/* \todo This cache should be shared by all instances supported by
* this driver. */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
vb->buffer_cache = kmem_cache_create(board_name, vb->framesize, 0,
- SLAB_HWCACHE_ALIGN, NULL, NULL);
+ cache_flags, NULL, NULL);
#else
vb->buffer_cache = kmem_cache_create(board_name, vb->framesize, 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ cache_flags, NULL);
#endif
if (NULL == vb->buffer_cache) {
VB_PRINTK(vb, ERR, "Failed to allocate buffer cache.\n");