diff options
| author | David Brownell <david-b@pacbell.net> | 2002-03-18 00:26:55 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-03-18 00:26:55 -0800 |
| commit | d00cdf629d715c949f2b96bd024b310b28dbc49e (patch) | |
| tree | 7c8a1a61d389b786899f883b1dab0fd18960a1a0 | |
| parent | 015474f861ee7838450996f0f0035c9669705c8e (diff) | |
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.
| -rw-r--r-- | drivers/usb/hcd/ehci-hcd.c | 8 | ||||
| -rw-r--r-- | drivers/usb/hcd/ehci-mem.c | 3 | ||||
| -rw-r--r-- | drivers/usb/hcd/ohci-mem.c | 10 |
3 files changed, 4 insertions, 17 deletions
diff --git a/drivers/usb/hcd/ehci-hcd.c b/drivers/usb/hcd/ehci-hcd.c index 42e0b4c25ee6..25f8016f9158 100644 --- a/drivers/usb/hcd/ehci-hcd.c +++ b/drivers/usb/hcd/ehci-hcd.c @@ -89,12 +89,6 @@ // #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); diff --git a/drivers/usb/hcd/ehci-mem.c b/drivers/usb/hcd/ehci-mem.c index b2ee617c6c8b..422f4e26b798 100644 --- a/drivers/usb/hcd/ehci-mem.c +++ b/drivers/usb/hcd/ehci-mem.c @@ -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); diff --git a/drivers/usb/hcd/ohci-mem.c b/drivers/usb/hcd/ohci-mem.c index b775c71114d0..c2063d13a8c4 100644 --- a/drivers/usb/hcd/ohci-mem.c +++ b/drivers/usb/hcd/ohci-mem.c @@ -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; |
