Commit d00cdf62 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

USB mem flags nonpoisonous

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.
parent 015474f8
...@@ -89,12 +89,6 @@ ...@@ -89,12 +89,6 @@
// #define EHCI_VERBOSE_DEBUG // #define EHCI_VERBOSE_DEBUG
// #define have_split_iso // #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 */ /* magic numbers that can affect system performance */
#define EHCI_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */ #define EHCI_TUNE_CERR 3 /* 0-3 qtd retries; 0 == don't stop */
#define EHCI_TUNE_RL_HS 0 /* nak throttle; see 4.9 */ #define EHCI_TUNE_RL_HS 0 /* nak throttle; see 4.9 */
...@@ -197,7 +191,7 @@ static int ehci_start (struct usb_hcd *hcd) ...@@ -197,7 +191,7 @@ static int ehci_start (struct usb_hcd *hcd)
* periodic_size can shrink by USBCMD update if hcc_params allows. * periodic_size can shrink by USBCMD update if hcc_params allows.
*/ */
ehci->periodic_size = DEFAULT_I_TDPS; 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; return retval;
hcc_params = readl (&ehci->caps->hcc_params); hcc_params = readl (&ehci->caps->hcc_params);
......
...@@ -224,8 +224,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, int flags) ...@@ -224,8 +224,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, int flags)
ehci->periodic [i] = EHCI_LIST_END; ehci->periodic [i] = EHCI_LIST_END;
/* software shadow of hardware table */ /* software shadow of hardware table */
ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), ehci->pshadow = kmalloc (ehci->periodic_size * sizeof (void *), flags);
flags & ~EHCI_SLAB_FLAGS);
if (ehci->pshadow == 0) { if (ehci->pshadow == 0) {
dbg ("no shadow periodic table"); dbg ("no shadow periodic table");
ehci_mem_cleanup (ehci); ehci_mem_cleanup (ehci);
......
...@@ -42,12 +42,6 @@ static void ohci_hcd_free (struct usb_hcd *hcd) ...@@ -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 #ifndef CONFIG_PCI
# error "usb-ohci currently requires PCI-based controllers" # error "usb-ohci currently requires PCI-based controllers"
/* to support non-PCI OHCIs, you need custom bus/mem/... glue */ /* to support non-PCI OHCIs, you need custom bus/mem/... glue */
...@@ -169,14 +163,14 @@ static int ohci_mem_init (struct ohci_hcd *ohci) ...@@ -169,14 +163,14 @@ static int ohci_mem_init (struct ohci_hcd *ohci)
sizeof (struct td), sizeof (struct td),
32 /* byte alignment */, 32 /* byte alignment */,
0 /* no page-crossing issues */, 0 /* no page-crossing issues */,
GFP_KERNEL | OHCI_MEM_FLAGS); GFP_KERNEL);
if (!ohci->td_cache) if (!ohci->td_cache)
return -ENOMEM; return -ENOMEM;
ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev, ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev,
sizeof (struct ed), sizeof (struct ed),
16 /* byte alignment */, 16 /* byte alignment */,
0 /* no page-crossing issues */, 0 /* no page-crossing issues */,
GFP_KERNEL | OHCI_MEM_FLAGS); GFP_KERNEL);
if (!ohci->ed_cache) { if (!ohci->ed_cache) {
pci_pool_destroy (ohci->td_cache); pci_pool_destroy (ohci->td_cache);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment