From owner-freebsd-usb@freebsd.org Tue Mar 29 11:30:36 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F407AE2B38 for ; Tue, 29 Mar 2016 11:30:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 768201F3A for ; Tue, 29 Mar 2016 11:30:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u2TBUZag094154 for ; Tue, 29 Mar 2016 11:30:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 208365] [umass] Cannot fsck 3TB USB disk Date: Tue, 29 Mar 2016 11:30:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hselasky@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 11:30:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #10 from Hans Petter Selasky --- 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_ad= dr_t paddr) { int retval; + if (tc->flags & BUS_DMA_KEEP_PG_OFFSET) { + if ((paddr % 3) =3D=3D 0) { + printf("F"); + return (1); + } + } + retval =3D 0; do { if (((paddr > tc->lowaddr && paddr <=3D tc->highaddr) || cat << EOF > test.c #include #include #include #include int main() { int fd =3D open("/dev/da0", O_RDONLY); char buffer[65536]; int y; if (fd < 0) return (0); y =3D 65536; while (1) { (void) malloc(512); if (lseek(fd, 0, 0) < 0) printf("ERROR seek\n"); if (read(fd, buffer, y) !=3D 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 probl= em happens. --=20 You are receiving this mail because: You are the assignee for the bug.=