From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH 2/2] PCI: add remove_id sysfs entry Date: Mon, 23 Feb 2009 19:47:47 -0800 Message-ID: <20090224034747.GB24780@kroah.com> References: <1234542767.23746.81.camel@blaa> <20090214021244.GW27684@sequoia.sous-sol.org> <20090214033319.GA4591@kroah.com> <20090224012625.GA7436@sequoia.sous-sol.org> <20090224021725.GB7436@sequoia.sous-sol.org> <20090224021829.GC7436@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jesse Barnes , Mark McLoughlin , kvm , "linux-pci@vger.kernel.org" , Chris Wright , "Dugger, Donald D" , "Kay, Allen M" To: Chris Wright Return-path: Content-Disposition: inline In-Reply-To: <20090224021829.GC7436@sequoia.sous-sol.org> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, Feb 23, 2009 at 06:18:29PM -0800, Chris Wright wrote: > This adds a remove_id sysfs entry to allow users of new_id to later > remove the added dynid. One use case is management tools that want to > dynamically bind/unbind devices to pci-stub driver while devices are > assigned to KVM guests. Rather than having to track which driver was > originally bound to the driver, a mangement tool can simply: > > # echo "8086 10f5" > /sys/bus/pci/drivers/pci-stub/new_id > # echo -n 0000:00:19.0 > /sys/bus/pci/devices/0000:00:19.0/driver/unbind > # echo -n 0000:00:19.0 > /sys/bus/pci/drivers/pci-stub/bind Ah, you do need -n with unbind and bind, you might want to change your documentation :) thanks, greg k-h