Re: [PATCH 2/2 v2] PCI: add remove_id sysfs entry

Jesse Barnes
2009-03-20T00:35:10Z

On Mon, 23 Feb 2009 21:52:23 -0800
Chris Wright <chrisw@sous-sol.org> 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 0000:00:19.0 > /sys/bus/pci/devices/0000:00:19.0/driver/unbind
> # echo 0000:00:19.0 > /sys/bus/pci/drivers/pci-stub/bind
>
> Guest uses device
>
> # echo "8086 10f5" > /sys/bus/pci/drivers/pci-stub/remove_id
> # echo 0000:00:19.0 > /sys/bus/pci/drivers_probe
>
> Signed-off-by: Chris Wright <chrisw@sous-sol.org>

Applied to linux-next, thanks Chris.

--
Jesse Barnes, Intel Open Source Technology Center