]> git.neil.brown.name Git - history.git/commitdiff
USB mem flags nonpoisonous
authorDavid Brownell <david-b@pacbell.net>
Mon, 18 Mar 2002 08:26:55 +0000 (00:26 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 18 Mar 2002 08:26:55 +0000 (00:26 -0800)
This patch completely punts on passing SLAB_POISON, I've
gotten burnt by it once too many.  Seems like the slab code
changed somewhere.  I've got a separate patch to make the
pci_pool code use CONFIG_DEBUG_SLAB, which I'll send
around.

Meanwhile, I needed this to get at least EHCI to intialize on
a 2.5.7-pre1 system.  Please merge.

drivers/usb/hcd/ehci-hcd.c
drivers/usb/hcd/ehci-mem.c
drivers/usb/hcd/ohci-mem.c

index 42e0b4c25ee608eb626cec0723313c9e37e2b045..25f8016f915800ccf6b033755041acffeba3b29c 100644 (file)
 // #define EHCI_VERBOSE_DEBUG
 // #define have_split_iso
 
-#ifdef CONFIG_DEBUG_SLAB
-#      define  EHCI_SLAB_FLAGS         (SLAB_POISON)
-#else
-#      define  EHCI_SLAB_FLAGS         0
-#endif
-
 /* magic numbers that can affect system performance */
 #define        EHCI_TUNE_CERR          3       /* 0-3 qtd retries; 0 == don't stop */
 #define        EHCI_TUNE_RL_HS         0       /* nak throttle; see 4.9 */
@@ -197,7 +191,7 @@ static int ehci_start (struct usb_hcd *hcd)
         * periodic_size can shrink by USBCMD update if hcc_params allows.
         */
        ehci->periodic_size = DEFAULT_I_TDPS;
-       if ((retval = ehci_mem_init (ehci, EHCI_SLAB_FLAGS | SLAB_KERNEL)) < 0)
+       if ((retval = ehci_mem_init (ehci, SLAB_KERNEL)) < 0)
                return retval;
        hcc_params = readl (&ehci->caps->hcc_params);
 
index b2ee617c6c8b9063b6d735eb88dc15147ec924a1..422f4e26b798098f0f0bb803a13ee109b70892aa 100644 (file)
@@ -224,8 +224,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, int flags)
                ehci->periodic [i] = EHCI_LIST_END;
 
        /* software shadow of hardware table */
-       ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *),
-               flags & ~EHCI_SLAB_FLAGS);
+       ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags);
        if (ehci->pshadow == 0) {
                dbg ("no shadow periodic table");
                ehci_mem_cleanup (ehci);
index b775c71114d03ec142b17c56cf3a27995202bfb6..c2063d13a8c4f336885954fe49f573b60533a0e4 100644 (file)
@@ -42,12 +42,6 @@ static void ohci_hcd_free (struct usb_hcd *hcd)
 
 /*-------------------------------------------------------------------------*/
 
-#ifdef CONFIG_DEBUG_SLAB
-#      define OHCI_MEM_FLAGS   SLAB_POISON
-#else
-#      define OHCI_MEM_FLAGS   0
-#endif
 #ifndef CONFIG_PCI
 #      error "usb-ohci currently requires PCI-based controllers"
        /* to support non-PCI OHCIs, you need custom bus/mem/... glue */
@@ -169,14 +163,14 @@ static int ohci_mem_init (struct ohci_hcd *ohci)
                sizeof (struct td),
                32 /* byte alignment */,
                0 /* no page-crossing issues */,
-               GFP_KERNEL | OHCI_MEM_FLAGS);
+               GFP_KERNEL);
        if (!ohci->td_cache)
                return -ENOMEM;
        ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev,
                sizeof (struct ed),
                16 /* byte alignment */,
                0 /* no page-crossing issues */,
-               GFP_KERNEL | OHCI_MEM_FLAGS);
+               GFP_KERNEL);
        if (!ohci->ed_cache) {
                pci_pool_destroy (ohci->td_cache);
                return -ENOMEM;