Commit Graph

13 Commits

Author SHA1 Message Date
Warner Losh
7bd250d818 s/logprintf/printf/g
Approved by: re@
2007-06-20 05:11:37 +00:00
Warner Losh
63ba0d2d76 Remove more __OtherBSD__ ifdefs that don't make sense, and haven't for
some time.
2007-06-13 05:45:48 +00:00
Christian Brueffer
224aecbcdf Remove compat ifdefs for FreeBSD versions < 500014, makes the code
quite a bit easier to read.

Approved by:	rwatson (mentor)
MFC after:	1 weeks
2007-05-12 05:53:53 +00:00
Warner Losh
56635f6bd3 s/Static/static/g
s/device_ptr_t/device_t/g

No md5 changes in the .o's

# Note to the md5 tracking club: $FreeBSD$ changes md5 after every commit
# so you need to checkout -kk to get $FreeBSD$ instead of the actual value
# of the keyword.
2006-09-06 23:44:25 +00:00
Ian Dowse
368030a87a Use the limited scatter-gather capabilities of ehci, ohci and uhci
host controllers to avoid the need to allocate any multi-page
physically contiguous memory blocks. This makes it possible to use
USB devices reliably on low-memory systems or when memory is too
fragmented for contiguous allocations to succeed.

The USB subsystem now uses bus_dmamap_load() directly on the buffers
supplied by USB peripheral drivers, so this also avoids having to
copy data back and forth before and after transfers. The ehci and
ohci controllers support scatter/gather as long as the buffer is
contiguous in the virtual address space. For uhci the hardware
cannot handle a physical address discontinuity within a USB packet,
so it is necessary to copy small memory fragments at times.
2006-05-28 05:27:09 +00:00
Scott Long
2ffb18fec1 Don't use the ALLOCNOW flag for tags that will only be used for static
allocations.
2006-01-10 22:55:35 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Ian Dowse
67dab3d6c9 When searching for a suitable block of memory on the free list,
skip blocks that are too big by a factor of two or greater. This
avoids some cases of extremely inefficient memory use that can occur
when large (e.g. 64k) blocks on the free list get used when allocating
a 4k chunk of 64-byte fragments. Because fragments have their own
free list, the 60k difference got lost forever every time.
2004-08-02 13:59:02 +00:00
Josef Karthauser
272487f507 Make it easier to run this code on RELENG_4.
Submitted by:	luoqi
2003-10-04 22:13:21 +00:00
John-Mark Gurney
44de8a989d fix another bus_dma leak due to not having a size param for our bus_dma
allocation function.  With this patch, it prevents continous growth of
the devbuf memory pool.

Tested with ssh <host> dd of=/dev/null < /dev/zero and vmstat -m | grep devbuf
2003-07-29 05:07:37 +00:00
Peter Wemm
899c48a1cb Fix a 64 bit bug lost in the inline warning noise. sizeof is not always
an int.  Do not printf() it as though it were.
2003-07-22 06:58:04 +00:00
John-Mark Gurney
9e17948f72 override the tag. usb_block_allocmem allocates a new tag, which when we
go looking for free fragments won't match.  Since we never free this, we
can "throw away" the tag.  This is very dirty, and needs to be reimplemented
properly, but fixes performance problems with uhci.

Also assert that when we overlay a structure on some space, that the
space is large enough for the structure.
2003-07-21 02:41:01 +00:00
John-Mark Gurney
45dd937507 make usb bus_dma aware.
Reviewed by:	joe among others
2003-07-15 22:42:37 +00:00