kern/169526: [patch] sys/dev/sym broken by r236061 on amd64 with
more than 4GB RAM
Mike Watters
mike at mwatters.net
Thu Jun 28 17:20:09 UTC 2012
>Number: 169526
>Category: kern
>Synopsis: [patch] sys/dev/sym broken by r236061 on amd64 with more than 4GB RAM
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jun 28 17:20:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Mike Watters
>Release: 8-STABLE
>Organization:
>Environment:
FreeBSD 8.3-STABLE #4: Wed Jun 27 00:13:04 MDT 2012
srcbuild@:/usr/obj/usr/src-8/sys/GENERIC amd64
>Description:
Related PR: 168928 (different bug in same revision)
real memory = 8589934592 (8192 MB)
avail memory = 7983443968 (7613 MB)
sym0: <1010-66> port 0xe000-0xe0ff mem 0xfbfffc00-0xfbffffff,0xfbffc000-0xfbffdfff irq 21 at device 7.0 on pci3
sym0: failed to create DMA tag.
device_attach: sym0 attach returned 6
(followed by memory-related errors and boot failure)
In r236061 to sys/dev/sym/sym_hipd.c, the flags parameter to
bus_dma_tag_create() was changed from 0 to BUS_DMA_ALLOCNOW, which
breaks the driver on my amd64 system with 8GB RAM.
If I follow the logic correctly, the BUS_DMA_ALLOCNOW flag combined
with the maxsize parameter being BUS_SPACE_MAXSIZE results in the
system trying to allocate 4GB worth of bounce pages, which I assume
exhausts kernel resources.
>How-To-Repeat:
>Fix:
Change flags parameter from BUS_DMA_ALLOCNOW back to 0, or change
maxsize parameter to a more appropriate smaller value. Changing flags to 0
(BUS_DMA_WAITOK) fixes the problem on my system.
Patch attached with submission follows:
--- sym_hipd.c.orig 2012-06-17 03:43:04.000000000 -0600
+++ sym_hipd.c 2012-06-28 11:01:36.335984640 -0600
@@ -8538,7 +8538,7 @@
if (bus_dma_tag_create(np->bus_dmat, 1, SYM_CONF_DMA_BOUNDARY,
BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
BUS_SPACE_MAXSIZE, SYM_CONF_MAX_SG, SYM_CONF_DMA_BOUNDARY,
- BUS_DMA_ALLOCNOW, busdma_lock_mutex, &np->mtx, &np->data_dmat)) {
+ BUS_DMA_WAITOK, busdma_lock_mutex, &np->mtx, &np->data_dmat)) {
device_printf(dev, "failed to create DMA tag.\n");
goto attach_failed;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list