https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208365

--- Comment #10 from Hans Petter Selasky <hsela...@freebsd.org> ---
I'm able to reproduce the problem using the following kernel patch and
test-program on the latest and greatest 11-current:

diff --git a/sys/x86/x86/busdma_machdep.c b/sys/x86/x86/busdma_machdep.c
index c96b26d..a4c0af7 100644
--- a/sys/x86/x86/busdma_machdep.c
+++ b/sys/x86/x86/busdma_machdep.c
@@ -97,6 +97,13 @@ bus_dma_run_filter(struct bus_dma_tag_common *tc, bus_addr_t
paddr)
 {
        int retval;

+       if (tc->flags & BUS_DMA_KEEP_PG_OFFSET) {
+               if ((paddr % 3) == 0) {
+                       printf("F");
+                       return (1);
+               }
+       }
+
        retval = 0;
        do {
                if (((paddr > tc->lowaddr && paddr <= tc->highaddr) ||

cat << EOF > test.c
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
        int fd = open("/dev/da0", O_RDONLY);
        char buffer[65536];
        int y;

        if (fd < 0)
                return (0);

        y = 65536;
        while (1) {
                (void) malloc(512);
                if (lseek(fd, 0, 0) < 0)
                        printf("ERROR seek\n");
                if (read(fd, buffer, y) != y)
                        printf("ERROR read\n");
        }
        close(fd);

        return (0);
}
EOF


Memory stick is connected through USB 3.0 port XHCI.

It appears that when bounce pages are mixed with non-bounce pages the problem
happens.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-usb@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to