From owner-freebsd-usb@freebsd.org Mon Mar 28 09:25:12 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 8118BADF5B4 for ; Mon, 28 Mar 2016 09:25:12 +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 71D551EC4 for ; Mon, 28 Mar 2016 09:25:12 +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 u2S9PCqD046935 for ; Mon, 28 Mar 2016 09:25:12 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 195398] [usb] add missing pci ID for Intel Lynx Point USB controller Date: Mon, 28 Mar 2016 09:25:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED 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: Mon, 28 Mar 2016 09:25:12 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D195398 --- Comment #3 from commit-hook@freebsd.org --- A commit references this bug: Author: mav Date: Mon Mar 28 09:24:48 UTC 2016 New revision: 297339 URL: https://svnweb.freebsd.org/changeset/base/297339 Log: MFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller. PR: kern/195398 Changes: _U stable/10/ stable/10/sys/dev/usb/controller/ehci_pci.c --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Mon Mar 28 23:34:50 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 E24C9ADFF07 for ; Mon, 28 Mar 2016 23:34:50 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AE00D1542 for ; Mon, 28 Mar 2016 23:34:50 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u2SNYn6v002471 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 28 Mar 2016 17:34:49 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u2SNYn39002468 for ; Mon, 28 Mar 2016 17:34:49 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 28 Mar 2016 17:34:49 -0600 (MDT) From: Warren Block To: freebsd-usb@FreeBSD.org Subject: Re: Realtek RTS5401 USB 3.0 hub In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 28 Mar 2016 17:34:49 -0600 (MDT) 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: Mon, 28 Mar 2016 23:34:51 -0000 On Tue, 22 Mar 2016, Warren Block wrote: > This Realtek RTS5401 USB 3.0 hub is combined in a case with three USB 3.0 > ports and a Realtek RTL8153 Gigabit Ethernet adapter. > > Connected to a USB 2.0 port, it shows this: > > ugen1.3: at usbus1 > uhub4: on usbus1 > uhub4: MTT could not be enabled > device_attach: uhub4 attach returned 6 > > I have not tried it on a USB 3.0 port yet. > > It would not really bother me if only the Ethernet worked, but surely it is > connected to the hub, so will be all or nothing. Any suggestions? On a USB 3.0 port on a -CURRENT system (r297315), the hub is recognized and works: ugen 0.2: at usbus0 uhub1: on usbus0 uhub1: MTT could not be enabled device_attach: uhub1 attach returned 6 ugen0.3: at usbus0 uhub1: on usbus0 uhub1: 4 ports with 4 removable, self powered Are USB 3 hubs not backwards compatible? Maybe just this one specifically? USB 2.0 devices like mice are not recognized when attached. A USB 3.0 memory stick is recognized. The attached Ethernet port is still not seen. Should rue(4) support the RTL8153? From owner-freebsd-usb@freebsd.org Tue Mar 29 00:20:06 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 6FB55AE0E0C for ; Tue, 29 Mar 2016 00:20:06 +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 60A741CDF for ; Tue, 29 Mar 2016 00:20:06 +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 u2T0K6Ix096625 for ; Tue, 29 Mar 2016 00:20:06 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 00:20:06 +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: ngie@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc short_desc assigned_to 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 00:20:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 Ngie Cooper changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ngie@FreeBSD.org Summary|Cannot fsck 3TB USB disk |[umass] Cannot fsck 3TB USB | |disk Assignee|freebsd-bugs@FreeBSD.org |freebsd-usb@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 06:33:14 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 B533CAE1EC1 for ; Tue, 29 Mar 2016 06:33:14 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 80E311EBC for ; Tue, 29 Mar 2016 06:33:14 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2FDC81FE023; Tue, 29 Mar 2016 08:33:12 +0200 (CEST) Subject: Re: Realtek RTS5401 USB 3.0 hub To: Warren Block , freebsd-usb@FreeBSD.org References: From: Hans Petter Selasky Message-ID: <56FA2260.5030200@selasky.org> Date: Tue, 29 Mar 2016 08:36:16 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 06:33:14 -0000 On 03/29/16 01:34, Warren Block wrote: > Are USB 3 hubs not backwards compatible? Maybe just this one > specifically? USB 2.0 devices like mice are not recognized when > attached. A USB 3.0 memory stick is recognized. USB 3.0 is running parallell to USB 2.0. They are not using the same carrier. --HPS From owner-freebsd-usb@freebsd.org Tue Mar 29 06:37:58 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 EB452AE1F9B for ; Tue, 29 Mar 2016 06:37:58 +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 DBAB41F86 for ; Tue, 29 Mar 2016 06:37:58 +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 u2T6bwU4034606 for ; Tue, 29 Mar 2016 06:37:58 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 06:37:59 +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: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 06:37:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hselasky@FreeBSD.org --- Comment #2 from Hans Petter Selasky --- Hi PHK, Looks like someone has changed some bits and pieces in busdma (again). Would you mind to narrow down the exact version causing the breakage? I'll have a look at the commits in the range you've given. --HPS --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 06:56:26 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 75A15AE147C for ; Tue, 29 Mar 2016 06:56:26 +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 6657D15B9 for ; Tue, 29 Mar 2016 06:56:26 +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 u2T6uQ5q084466 for ; Tue, 29 Mar 2016 06:56:26 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 06:56:26 +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: phk@FreeBSD.org X-Bugzilla-Status: New 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 06:56:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #3 from Poul-Henning Kamp --- It is a production box and I can only mess with it on weekends, so that's g= oing to take forever... I think the best bet is trying to reproduce on another machine --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 08:35:57 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 BF0D7AE14D9 for ; Tue, 29 Mar 2016 08:35:57 +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 B0315120A for ; Tue, 29 Mar 2016 08:35:57 +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 u2T8ZvmL064070 for ; Tue, 29 Mar 2016 08:35:57 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 08:35:57 +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: New 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 08:35:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #4 from Hans Petter Selasky --- FYI: The SCSI command is an 8Kbyte request. I'll try and see if this is reproducable with "dd". --HPS --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 08:53:01 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 F2069AE18BE for ; Tue, 29 Mar 2016 08:53:01 +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 E33501BF9 for ; Tue, 29 Mar 2016 08:53:01 +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 u2T8r1QE004594 for ; Tue, 29 Mar 2016 08:53:01 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 08:53:01 +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: phk@FreeBSD.org X-Bugzilla-Status: New 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 08:53:02 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #5 from Poul-Henning Kamp --- My best guess is that the filesystem was created along these lines: newfs -O2 -U -b 65536 -f 8192 -i something --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 09:11:16 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 D8365AE011A for ; Tue, 29 Mar 2016 09:11:16 +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 C90181442 for ; Tue, 29 Mar 2016 09:11:16 +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 u2T9BG5u069441 for ; Tue, 29 Mar 2016 09:11:16 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 09:11:17 +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: New 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 09:11:16 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #6 from Hans Petter Selasky --- Does the system have more than 4 GB of RAM, so that bounce pages will be us= ed for BUSDMA? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 09:20:39 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 B55EDAE0543 for ; Tue, 29 Mar 2016 09:20:39 +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 A6408197E for ; Tue, 29 Mar 2016 09:20:39 +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 u2T9KdqJ047228 for ; Tue, 29 Mar 2016 09:20:39 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 09:20:39 +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: phk@FreeBSD.org X-Bugzilla-Status: New 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 09:20:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #7 from Poul-Henning Kamp --- Dmesg: CPU: AMD Athlon(tm) II X3 455 Processor (3311.18-MHz K8-class CPU) Origin=3D"AuthenticAMD" Id=3D0x100f53 Family=3D0x10 Model=3D0x5 Stepp= ing=3D3 =20 Features=3D0x178bfbff Features2=3D0x802009 AMD Features=3D0xee500800 AMD Features2=3D0x837ff SVM: NP,NRIP,NAsids=3D64 TSC: P-state invariant real memory =3D 17179869184 (16384 MB) avail memory =3D 16573935616 (15806 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: <090712 APIC1033> FreeBSD/SMP: Multiprocessor System Detected: 3 CPUs FreeBSD/SMP: 1 package(s) x 3 core(s) cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 ACPI BIOS Warning (bug): 32/64X length mismatch in FADT/Gpe0Block: 64/32 (20150818/tbfadt-649) ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-55 on motherboard --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 09:30:56 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 D26EEAE084E for ; Tue, 29 Mar 2016 09:30:56 +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 C38AD1EF1 for ; Tue, 29 Mar 2016 09:30:56 +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 u2T9UuId071537 for ; Tue, 29 Mar 2016 09:30:56 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 09:30:56 +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: bug_status 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 09:30:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #8 from Hans Petter Selasky --- Hi, This issue is not USB related. My best guess is to try to revert r292255 and see if it makes any differenc= e: https://svnweb.freebsd.org/changeset/base/292255 --HPS --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 11:09:04 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 C5123AE24A0 for ; Tue, 29 Mar 2016 11:09:04 +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 B61E01044 for ; Tue, 29 Mar 2016 11:09:04 +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 u2TB94TB050085 for ; Tue, 29 Mar 2016 11:09:04 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:09:04 +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: phk@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:09:04 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #9 from Poul-Henning Kamp --- I can probably try that in the weekend. --=20 You are receiving this mail because: You are the assignee for the bug.= 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.= From owner-freebsd-usb@freebsd.org Tue Mar 29 11:55:46 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 EA8A2AE2447 for ; Tue, 29 Mar 2016 11:55:46 +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 DBCE51DE0 for ; Tue, 29 Mar 2016 11:55:46 +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 u2TBtkl7049469 for ; Tue, 29 Mar 2016 11:55:46 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:55:46 +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:55:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 --- Comment #11 from Hans Petter Selasky --- I just reverted r292255 and the problem does not seem to trigger any more. Handing issue over to royger @ freebsd . org --HPS --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 11:55:59 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 D648AAE2489 for ; Tue, 29 Mar 2016 11:55:59 +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 C77D91E18 for ; Tue, 29 Mar 2016 11:55:59 +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 u2TBtxfH049847 for ; Tue, 29 Mar 2016 11:55:59 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:55:59 +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: royger@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to 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:55:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208365 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-usb@FreeBSD.org |royger@freebsd.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-usb@freebsd.org Tue Mar 29 20:05:37 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 4BA09AE2A9E for ; Tue, 29 Mar 2016 20:05:37 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9C931F09 for ; Tue, 29 Mar 2016 20:05:36 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id p65so155235554wmp.1 for ; Tue, 29 Mar 2016 13:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=rd++7sphthKKPw4/IEOjxWvRDw6/co7o+CoYm1WxACI=; b=EeJbhlmcBX0VQlhejRwfcZ+fAhJrW77Y523Kp75VpgjHTqFsrUsVFqz/p5ofAcnwms ZKtbzeySzPDsnwHRv8cwxALPi2R6rP9q9V7Q6kjPa/2kNsbZXnz0LvMMUUCeR+/+ud7D fmj5DXMjf4YfH8Xuql5Xw+CUjUCvut0W4JW4AIy3GYTfcWKfxDOtROGp+jciNE+ihhy2 2/3UMHDnkNECLHGwIiAnwvu7CTgsycEPxVhGpqBFzf6yPwouQHWLvFhtdnWpPp9SrCym 4TS9M7X7XYvB/uW1vtucjz+3ZBz6WpERPZgc64WzA3dpA3dW/QIWAACO8sBwTWuGqasc 0bHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=rd++7sphthKKPw4/IEOjxWvRDw6/co7o+CoYm1WxACI=; b=MEN5ZfD+5Xdc0cPHhcmKDb79icVsEVHviqdovGb2hS9QoBZoFIH9qXQamSYdQKrWaQ HH5US9HrPMgZbcJtVaWbCKZ5PyGMIlwKZV3FLyYWoNw5RGELt3acL5/jXrLsz65hGfEi JvrJ9u+hkEaTOdwAO0ryuYbtrk/db7m8paygzovKzqC85fC0bKtCdfca6SBQbWOPH4cm D+EGhGU2COhcrIP3QYCdDX1lZpEhe3g8Hs77abphi/12VxCVpA5hMYOWFleaXrZMXUHg zWuyV4d8/qp3FIk/OGCNPect00dI/L+sp+G3T2pQLJ8P+X4vsP5KemEG7GO8ToAp2IUO OnFw== X-Gm-Message-State: AD7BkJLIo7DU61ex1cX0ExrM7kjPkyL1KwYydu5eSsWi0iqhMHX8Nq7hgfyLqXiVQHQpjNP8xmaNvufkBQI67Q== MIME-Version: 1.0 X-Received: by 10.28.132.17 with SMTP id g17mr19266775wmd.63.1459281935266; Tue, 29 Mar 2016 13:05:35 -0700 (PDT) Received: by 10.194.25.226 with HTTP; Tue, 29 Mar 2016 13:05:35 -0700 (PDT) Date: Tue, 29 Mar 2016 21:05:35 +0100 Message-ID: Subject: libusb permission error (?) when attempting to detach device which is not attached From: Conor To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 20:05:37 -0000 Greetings, I'm unsure if this is the correct place for this discussion; if it is more suitably discussed elsewhere, please let me know. Currently, I'm looking into an issue with a port (devel/openocd), whereby attempting to detach a USB device fails due to, from what I can tell, a permissions error. First, some background; The port's pkg-message suggests adding the following lines to /etc/devfs.rules: ===== [localrules=10] add path 'ugen*' mode 0660 group operator add path 'usb/*' mode 0660 group operator add path 'usb' mode 0770 group operator ====== ...such that members of the operator group may access attached hardware. I've done so, and my user is a member of the operator group. The device in question is an Olimex JTAG debugger, and I'm running 10.2-RELEASE. When starting OpenOCD as my user, it bombs out stating that libusb_detach_kernel_driver() has failed with LIBUSB_ERROR_OTHER. When starting as root, there is no error, and I can socat/telnet to the OpenOCD server and flash/debug a target. Initially, it seemed that it was, indeed, a permissions issue: 1) Some initial investigation of the FreeBSD libusb implementation, and kernel source, pointed at the failure being in privilege checking in the ioctl handler for USB_IFACE_DRIVER_DETACH whereby a check for PRIV_DRIVER fails (sys/dev/usb/usb_generic.c:2210) when running as my user. Naturally, the check for su returns success when running as root. 1a) Given the permissions alluded to in /etc/devfs.rules above, should this privilege check fail, given that the device node is one of ugenX.Y? 2) I've patched the OpenOCD source to first check for an active driver with libusb_kernel_driver_active(), and only on success, attempting to detach the device. Whilst this rectifies the issue -- there is no active driver, ergo, no detach attempt is made and I can use the server as described with su, above -- is it reasonable/necessary to do this? I appreciate any insights or input you might have. From owner-freebsd-usb@freebsd.org Tue Mar 29 21:39:18 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 BA87BAE24AF for ; Tue, 29 Mar 2016 21:39:18 +0000 (UTC) (envelope-from admin188@z188.najnx.com) Received: from z188.najnx.com (z188.najnx.com [161.123.213.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3A61349 for ; Tue, 29 Mar 2016 21:39:15 +0000 (UTC) (envelope-from admin188@z188.najnx.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=najnx; d=z188.najnx.com; h=Date:From:To:Subject:Message-ID:Mime-Version:Content-Type; i=admin188@z188.najnx.com; bh=rsnWdDjBJ2PM6f4KHCa0JQnEvvU=; b=gCJHq4SuvuXc5q7t5Ab9C0irXM9z2TTzyv7utiO++e1u5S9sIQ8Ry5+LpNCEwFYaJ8Cu0zdzLlbf eitDFzD82DOFNn4Iy9f4GhPG8JF523bHwcg1jjHWp2qA0CNEauDQRK4I671M4YY/bJ155avxG1lj XbhJL0AG33IVdFJVyTc= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=najnx; d=z188.najnx.com; b=kTuQKdULk/tAS55aLUmvIf5kPrS2WSA68upWboiBa4pkDi+Oe5F393jax8lnTT6GqI64asTHPVVr 1u6ZS+Da/CEeiS427DinYlNZyJhsMStuec5/2d4Jr25UBsHudGJRoHScjJaqksqMRPzTpHWPO5UW vGX8cJggig6hdFBYEUY=; Date: Wed, 30 Mar 2016 05:29:29 +0800 From: "Rayban" To: Subject: great offer from Rayban Sunglasses Message-ID: <20160330052938801101@z188.najnx.com> X-mailer: Foxmail 6, 13, 102, 15 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 21:39:18 -0000 DQoNCllvdSdyZSByZWNlaXZpbmcgdGhpcyBuZXdzbGV0dGVyIGJlY2F1c2UgeW91IHN1YnNjcmli ZWQgZnJvbSBvdXIgd2Vic2l0ZS4NCkhhdmluZyB0cm91YmxlIHJlYWRpbmcgdGhpcyBlbWFpbD8g VmlldyBpdCBpbiB5b3VyIGJyb3dzZXIuIE5vdCBpbnRlcmVzdGVkIGFueW1vcmU/IFVuc3Vic2Ny aWJlIGluc3RhbnRseS4gDQoNCiAgRlJFRSBTSElQUElORyAqICBGcmVlIFJldHVybiAqIA0KDQoN CkJlc3QgU2VsbGVycyBDb2xsZWN0aW9ucyBKdWxpZXQgT3ZhbCBGcmFtZSBUeXBlcyBDb21taXQg U3EgRmFzdCBKYWNrZXQgTmV3IEFycml2YWxzIA0KDQpEaXNjb3VudCBSYXkgQmFuIFN1bmdsYXNz ZXMgDQpXZWxjb21lIHRvIG15IHN1bmdsYXNzZXMgc3RvcmUgDQo4MCANCg0KRVZFUllUSElORyAN CiVPRkYgDQoNClBMVVMgJDgwRlJFRSBTSElQSU5HIE9OIEFMTE9SREVSUyANCk9ha2xleSBTdW5n bGFzcyANClJheSBCYW4gU3VuZ2xhc3MgDQoNCg0KDQoNClByaXZhY3kgUG9saWN5IFNoaXBwaW5n IFJldHVybnMgQ29uZGl0aW9ucyBvZiBVc2UgDQoNCg0KDQpUbyBiZSBzdXJlIHRoYXQgeW91IHdp bGwgcmVjZWl2ZSBvdXIgb2ZmZXJzLCB3ZSBzdWdnZXN0IHRoYXQgeW91IGFkZCBvdXIgZW1haWwg YWRkcmVzcywgY3VzdG9tZXJzZXJ2aWNlMjRob3VyQGhvdG1haWwuY29tIHRvIHlvdXIgYWRkcmVz cyBib29rLiBJbiBhY2NvcmRhbmNlIHdpdGggdGhlIEZyZW5jaCBsYXcgb2YgSmFudWFyeSA2LCAx OTc4LCBjb3JyZWN0IGFueSBpbmZvcm1hdGlvbiBoZWxkIGJ5IDIwMTVzdW5nbGFzc3ZpcC5jb20g dGhhdCBjb25jZXJucyB5b3UuIA0KDQpPdXIgcHJvbWlzZXM6DQoNCi0gMTAwIGRheXMgdG8gcmV0 dXJuIG9yIGV4Y2hhbmdlIGFuIGl0ZW0NCi0gU2FtZS1kYXkgZGlzcGF0Y2ggZm9yIG9yZGVycyBw bGFjZWQgYmVmb3JlIDcgRGF5cy4qDQotIEN1c3RvbWVyIHNhdGlzZmFjdGlvbiBpcyBvdXIgdG9w IHByaW9yaXR5IA0KDQpidXlpbmcgYSBnaWZ0LCBvciBsb29raW5nIGZvciBhIHByYWN0aWNhbCBw YWlyIG9mIHN1bmdsYXNzZXMsIHlvdSdyZSBzdXJlIHRvIGZpbmQgd2hhdCB5b3UncmUgYWZ0ZXIg aW4gUkIgb25saW5lIHN0b3JlIGh1Z2Ugc2VsZWN0aW9uLiB0b3AgZmFzaGlvbiBzZWxlY3Rpb24u IFdoZXRoZXIgeW91J3JlIGxvb2tpbmcgZm9yIHRoZSBsYXRlc3QgdHJlbmRzIG9yIHRpbWVsZXNz IGNsYXNzaWNzLCAyMDE1c3VuZ2xhc3N2aXAgb2ZmZXJzIGh1bmRyZWRzIG9mIGVzdGFibGlzaGVk IHByb2R1Y3QgbGlrZSBzdW5nbGFzc2VzIGp1c3QgZm9yIHlvdS4gDQoNCipUd2VudHktZm91ciBo b3VycyBhIGRheSwgZGVwZW5kZW50IHVwb24gcGF5bWVudCB2YWxpZGF0aW9uDQoqU2VlIHRlcm1z IGFuZCBjb25kaXRpb25zIA0KDQoNCkNvcHlyaWdodCAyMDA5LTIwMTUgUmF5IEJhbiBTdW5nbGFz c2VzIEFsbCBSaWdodHMgUmVzZXJ2ZWQuIA== From owner-freebsd-usb@freebsd.org Wed Mar 30 07:09:38 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 63ECCAE24FD for ; Wed, 30 Mar 2016 07:09:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 2F1D5125D for ; Wed, 30 Mar 2016 07:09:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 69C411FE023; Wed, 30 Mar 2016 09:09:32 +0200 (CEST) Subject: Re: libusb permission error (?) when attempting to detach device which is not attached To: Conor , freebsd-usb@freebsd.org References: From: Hans Petter Selasky Message-ID: <56FB7C64.5090801@selasky.org> Date: Wed, 30 Mar 2016 09:12:36 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 30 Mar 2016 07:09:38 -0000 On 03/29/16 22:05, Conor wrote: > Greetings, > > I'm unsure if this is the correct place for this discussion; if it is more > suitably discussed elsewhere, please let me know. > > Currently, I'm looking into an issue with a port (devel/openocd), whereby > attempting to detach a USB device fails due to, from what I can tell, a > permissions error. First, some background; > > The port's pkg-message suggests adding the following lines to > /etc/devfs.rules: > > ===== > [localrules=10] > add path 'ugen*' mode 0660 group operator > add path 'usb/*' mode 0660 group operator > add path 'usb' mode 0770 group operator > ====== > > ...such that members of the operator group may access attached hardware. > I've done so, and my user is a member of the operator group. The device in > question is an Olimex JTAG debugger, and I'm running 10.2-RELEASE. > > When starting OpenOCD as my user, it bombs out stating that > libusb_detach_kernel_driver() has failed with LIBUSB_ERROR_OTHER. When > starting as root, there is no error, and I can socat/telnet to the OpenOCD > server and flash/debug a target. > > Initially, it seemed that it was, indeed, a permissions issue: > > 1) Some initial investigation of the FreeBSD libusb implementation, and > kernel source, pointed at the failure being in privilege checking in the > ioctl handler for USB_IFACE_DRIVER_DETACH whereby a check for PRIV_DRIVER > fails (sys/dev/usb/usb_generic.c:2210) when running as my user. Naturally, > the check for su returns success when running as root. > > 1a) Given the permissions alluded to in /etc/devfs.rules above, should this > privilege check fail, given that the device node is one of ugenX.Y? Hi, Currently only root/superuser can alter the enumeration state of USB, like attaching/detaching kernel drivers. That's why there is a PRIV_DRIVER check in the IOCTL of USB_IFACE_DRIVER_DETACH. > > 2) I've patched the OpenOCD source to first check for an active driver with > libusb_kernel_driver_active(), and only on success, attempting to detach > the device. Whilst this rectifies the issue -- there is no active driver, > ergo, no detach attempt is made and I can use the server as described with > su, above -- is it reasonable/necessary to do this? Unlike Linux, interface drivers can co-exist in userspace and the kernel for the same USB device, given they are not in use at the same time. Currently this and other user-space drivers should call libusb_kernel_driver_active(), but don't bail out if libusb_kernel_driver_active() does not succeed. --HPS From owner-freebsd-usb@freebsd.org Wed Mar 30 07:14:50 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 96B5DAE26B1 for ; Wed, 30 Mar 2016 07:14:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 6227515C6 for ; Wed, 30 Mar 2016 07:14:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 037C71FE023; Wed, 30 Mar 2016 09:14:47 +0200 (CEST) Subject: Re: libusb permission error (?) when attempting to detach device which is not attached To: Conor , freebsd-usb@freebsd.org References: <56FB7C64.5090801@selasky.org> From: Hans Petter Selasky Message-ID: <56FB7D9F.9030300@selasky.org> Date: Wed, 30 Mar 2016 09:17:51 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56FB7C64.5090801@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 30 Mar 2016 07:14:50 -0000 On 03/30/16 09:12, Hans Petter Selasky wrote: > ===== > [localrules=10] > add path 'ugen*' mode 0660 group operator > add path 'usb/*' mode 0660 group operator > add path 'usb' mode 0770 group operator > ====== This filter is too wide. You should see how /usr/ports/multimedia/webcamd does it. --HPS From owner-freebsd-usb@freebsd.org Wed Mar 30 09:30:37 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 2F511AE0F08 for ; Wed, 30 Mar 2016 09:30:37 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDB2B1EE1 for ; Wed, 30 Mar 2016 09:30:36 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: by mail-wm0-x231.google.com with SMTP id 191so81643062wmq.0 for ; Wed, 30 Mar 2016 02:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=mtUVWT7owIHvusQXZBbjhpsTEqy5f4jhMqqX+koGVnA=; b=0Au4g8jXXNib/shhbCVL7LuQqhm7dlV551iCzaAXfJ1UJUgF9MISTeDzH4yDM4Hf/V ez1oXI6WCtY1+PAOGdmqm5dRMFe2gZgm1ted7P5YT0c2ho9FPNKkoqFRT10VT7lxFTxW yvhOut0RduAEmnkuCarn5fiZ7b1yq7T4So+OXYEyQ7rFjy7XP3r1aUuyvAYeiIFW3Lbh kQCpL4diuEfsKr6PDukXj7cU9AcbBV1npE3EuYDJ7+hUglAGmYveq5XLS7j3K025JgOq o8MJoYyN6vtlucpF47ZZBb8xl0IIw3Qk4OMSa8h87mItMzQeZBBMnjdZPxQWcoMrJdrf ILKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=mtUVWT7owIHvusQXZBbjhpsTEqy5f4jhMqqX+koGVnA=; b=Gl3EUJkY9UMf5W7kEb24vOAs0PS+rV11shd7AmJlU8unKE6glzBFa4mxuYQK+h0fXW V/A7vFZqwOxfDtiXKBt723RzulitQn0uf1qS4DsuCLiBjIpIRnFjwgb5FgT4ySNO7zCU YK64y/q2T/CahHpDx1TprxyUYqdhTsh1NSlNMk/ka0eMhXnLzIwoprjbBbq8zxRGKup1 TsfkUUA5HjnS0mCIZtSlsyPyER/319qIl+9C0psCYHKo77oSxf/pGOTdKEmX5tbxW1Yd QaITPYydbfVjPos9qLCjhtvZLeP+zUacil01l7/lArXvrvergRfeJdfO2iiUGN511NfR sCMQ== X-Gm-Message-State: AD7BkJKuI8xqbo5YW8/OXYrXV7qDK7eCsevzI7mqGkGhzaIFUu0W65VoTSIJRS6Qi8/0gK0PN0U7zhl381V+nQ== MIME-Version: 1.0 X-Received: by 10.194.2.202 with SMTP id 10mr8808687wjw.94.1459330235227; Wed, 30 Mar 2016 02:30:35 -0700 (PDT) Received: by 10.194.25.226 with HTTP; Wed, 30 Mar 2016 02:30:35 -0700 (PDT) In-Reply-To: <56FB7C64.5090801@selasky.org> References: <56FB7C64.5090801@selasky.org> Date: Wed, 30 Mar 2016 10:30:35 +0100 Message-ID: Subject: Re: libusb permission error (?) when attempting to detach device which is not attached From: Conor To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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: Wed, 30 Mar 2016 09:30:37 -0000 Thank you for your response. This clears up a few things. Hi, > > Currently only root/superuser can alter the enumeration state of USB, like > attaching/detaching kernel drivers. That's why there is a PRIV_DRIVER check > in the IOCTL of USB_IFACE_DRIVER_DETACH. > Duly noted. The privilege check failure is valid, then. To me, it doesn't seem to align with the devfs rules I mentioned, but I don't know the full scope of PRIV_DRIVER, so I may be way off. Regarding 'currently', is this likely to change in 11.0? > >> 2) I've patched the OpenOCD source to first check for an active driver >> with >> libusb_kernel_driver_active(), and only on success, attempting to detach >> the device. Whilst this rectifies the issue -- there is no active driver, >> ergo, no detach attempt is made and I can use the server as described with >> su, above -- is it reasonable/necessary to do this? >> > > Unlike Linux, interface drivers can co-exist in userspace and the kernel > for the same USB device, given they are not in use at the same time. > Currently this and other user-space drivers should call > libusb_kernel_driver_active(), but don't bail out if > libusb_kernel_driver_active() does not succeed. > > Got it. This was my solution to the issue, however, it would still require superuser privileges to detach the device if an active driver is present, right? The remaining approach, as far as I can see, is to run openocd with elevated privileges, as opposed to avoid attempting to detach the device by checking for an active driver. Not optimal, but unavoidable, I think. -- Conor. From owner-freebsd-usb@freebsd.org Wed Mar 30 09:41:23 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 ED24FAE158B for ; Wed, 30 Mar 2016 09:41:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 B7F5A19A8 for ; Wed, 30 Mar 2016 09:41:23 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7BDE31FE023; Wed, 30 Mar 2016 11:41:19 +0200 (CEST) Subject: Re: libusb permission error (?) when attempting to detach device which is not attached To: Conor References: <56FB7C64.5090801@selasky.org> Cc: freebsd-usb@freebsd.org From: Hans Petter Selasky Message-ID: <56FB9FF6.9020902@selasky.org> Date: Wed, 30 Mar 2016 11:44:22 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 30 Mar 2016 09:41:24 -0000 On 03/30/16 11:30, Conor wrote: > Regarding 'currently', is this > likely to change in 11.0? No. > Got it. This was my solution to the issue, however, it would still require > superuser privileges to detach the device if an active driver is present, > right? Yes, that is correct. --HPS From owner-freebsd-usb@freebsd.org Wed Mar 30 09:45:43 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 1E9A5AE1865 for ; Wed, 30 Mar 2016 09:45:43 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACFEE1F30 for ; Wed, 30 Mar 2016 09:45:42 +0000 (UTC) (envelope-from interloper255@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id 191so82125666wmq.0 for ; Wed, 30 Mar 2016 02:45:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=f1jBFzvXvGb83epuxKrmM010yjkzhynnfavsjO9jUEA=; b=0hBiDfzJK7k8af8o53RJlh9Rm4tlG4+ngV7NPr/57KvU4TSidgd7n3+IladihrTKoU getzKz7WYDQd5WZOPbq5NmIBT75e0LGukj7gbdxjU1YBS02SQGeK1JajRmpdb4z9HIM7 ZEEZDHDc4IBuHiA0GoVWJzBa0iBJhRXv1GkDagFdAwzVvzZ1QOpjinMta8ulIcWfvM/H kIsc9knu9DmZFYRSdUgOl46GTLS1izNSUwnFXimJKzQS0RdCnDYB7HNeN3ai4eCZKErd WDSdWcu/sUflkV9zPn27zMCTr+9PC/EcciOLoUkLgJSnqZA70qV5SplAhJMzd4ro6uHz RQHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=f1jBFzvXvGb83epuxKrmM010yjkzhynnfavsjO9jUEA=; b=iPekpCH8b20ASrhq/ajPlAAcgHANYA1htVGecdz5K94Zs1RzQzI60W5QaZ3gztQ/nt es7cCQy1Q+y92izOHg9YaOxKko6pOH47BCFu47DACXzlFtQ10QdXzRpZVZdw5KhDhEJq HUm6GcTwRb1+cw/6zG1Ganx8TbZAzGjT0EQndEAZRg7uTgc+arURCcBFFlYX3HCWJaTR x6m0Y12LqAcBIHgW3jrlxQPPNlrtZ5QoE319Q9e81pmi0eMGODUqM4BIlfeWAPz+ENcW dOKMV44wZh0g0l7Gie+zBcI0ITT2M9WlVPcA8Po3iy74I2MW/KqmCRRvcotPXxy88ldr rb0A== X-Gm-Message-State: AD7BkJLT3AW9dkai6lg7NwZPMGT9BI8cPyp/sNK9sODS+AYPtNyAjn9oqabnfPe62MseAvlV2VmeMhrcMFcGDQ== MIME-Version: 1.0 X-Received: by 10.28.131.141 with SMTP id f135mr21986469wmd.33.1459331140839; Wed, 30 Mar 2016 02:45:40 -0700 (PDT) Received: by 10.194.25.226 with HTTP; Wed, 30 Mar 2016 02:45:40 -0700 (PDT) In-Reply-To: <56FB7D9F.9030300@selasky.org> References: <56FB7C64.5090801@selasky.org> <56FB7D9F.9030300@selasky.org> Date: Wed, 30 Mar 2016 10:45:40 +0100 Message-ID: Subject: Re: libusb permission error (?) when attempting to detach device which is not attached From: Conor To: Hans Petter Selasky Cc: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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: Wed, 30 Mar 2016 09:45:43 -0000 > > ===== >> [localrules=10] >> add path 'ugen*' mode 0660 group operator >> add path 'usb/*' mode 0660 group operator >> add path 'usb' mode 0770 group operator >> ====== >> > > This filter is too wide. You should see how /usr/ports/multimedia/webcamd > does it. > > Yes, agreed. I'll pass it on to the port maintainer. Thanks, again. -- Conor.