]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: don't allocate dma pools for PIO HCDs
authorChris Humbert <mahadri-kernel@drigon.com>
Mon, 28 Nov 2005 17:29:23 +0000 (09:29 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2006 21:51:39 +0000 (13:51 -0800)
USB: don't allocate dma pools for PIO HCDs

hcd_buffer_alloc() and hcd_buffer_free() have a similar dma_mask
check and revert to kmalloc()/kfree(), but hcd_buffer_create()
doesn't check dma_mask and allocates unused dma pools.

Signed-off-by: Chris Humbert <mahadri-kernel@drigon.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/buffer.c

index 419c9943a7cbde9428aef14df1f266bd7e32c142..ad742cec94fa09d1e8b5f5b1b9f0cf249b9e9e57 100644 (file)
@@ -55,6 +55,9 @@ int hcd_buffer_create (struct usb_hcd *hcd)
        char            name [16];
        int             i, size;
 
+       if (!hcd->self.controller->dma_mask)
+               return 0;
+
        for (i = 0; i < HCD_BUFFER_POOLS; i++) { 
                if (!(size = pool_max [i]))
                        continue;