From owner-freebsd-hackers@freebsd.org Sat Aug 25 15:26:10 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 747A5108DA54 for ; Sat, 25 Aug 2018 15:26:10 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 061AC74E19 for ; Sat, 25 Aug 2018 15:26:09 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 2c46f361-a87b-11e8-93fa-f3ebd9db2b94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 2c46f361-a87b-11e8-93fa-f3ebd9db2b94; Sat, 25 Aug 2018 15:26:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w7PFQ1qt003296; Sat, 25 Aug 2018 09:26:01 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1535210761.1488.45.camel@freebsd.org> Subject: Re: pci bus rescan from userland From: Ian Lepore To: Yuri Pankov , freebsd-hackers Date: Sat, 25 Aug 2018 09:26:01 -0600 In-Reply-To: <561d2b7b-b36a-7bee-bb23-fb7d0ff9a50b@yuripv.net> References: <561d2b7b-b36a-7bee-bb23-fb7d0ff9a50b@yuripv.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2018 15:26:10 -0000 On Sat, 2018-08-25 at 18:21 +0300, Yuri Pankov wrote: > Hi, > > Trying to enable the HDMI/DP sound output on NVIDIA Quadro M2200, I have  > found the following workaround on NVIDIA Linux forums  > (https://devtalk.nvidia.com/default/topic/1024022/linux/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/post/5211273/#5211273): > > setpci -s 01:00.0 0x488.l=0x2000000:0x2000000 > rmmod nvidia-drm nvidia-modeset nvidia > echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove > echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan > modprobe nvidia-drm > > So far rmmod and modprobe steps are obvious, setpci works as well (I  > guess I could use pciconf? doesn't really matter).  Is there a FreeBSD  > equivalent of doing the remove/rescan steps from userland? devctl(8) has a rescan function.  devinfo(8) might be useful for figuring out which device(s) to use the rescan command on. I don't know much about either of these tools beyond the fact that they exist. -- Ian