Skip to content

Commit

Permalink
[PATCH] USB: don't allocate dma pools for PIO HCDs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Humbert authored and Greg Kroah-Hartman committed Jan 4, 2006
1 parent 5d32029 commit bd39b7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/core/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bd39b7f

Please sign in to comment.