2008-10-13 17:49:22

by Oliver Neukum

[permalink] [raw]
Subject: question about pci_disable_device

Hi,

could somebody explain what determines when in the sequence of hot
unplugging pci_disable_device() is called?

Regards
Oliver


2008-10-14 21:26:31

by Alex Chiang

[permalink] [raw]
Subject: Re: question about pci_disable_device

Hi Oliver,

* Oliver Neukum <[email protected]>:
> Hi,
>
> could somebody explain what determines when in the sequence of hot
> unplugging pci_disable_device() is called?

I don't know the answer, but you might have better luck cc'ing
the linux-pci list too.

/ac

2008-10-14 21:36:23

by Roland Dreier

[permalink] [raw]
Subject: Re: question about pci_disable_device

> could somebody explain what determines when in the sequence of hot
> unplugging pci_disable_device() is called?

I'm not positive about this, but pci_disable_device() should be called
as part of the device's driver's .remove method, which is called from
the sequence:

hotplug driver ->
pci_remove_bus_device() ->
pci_destroy_dev() ->
pci_stop_dev() ->
device_unregister()

- R.

2008-10-17 01:39:28

by Kenji Kaneshige

[permalink] [raw]
Subject: Re: question about pci_disable_device

Alex Chiang wrote:
> Hi Oliver,
>
> * Oliver Neukum <[email protected]>:
>> Hi,
>>
>> could somebody explain what determines when in the sequence of hot
>> unplugging pci_disable_device() is called?
>
> I don't know the answer, but you might have better luck cc'ing
> the linux-pci list too.
>

When a pci device is hot unplugged, .remove callback of the
corresponding adapter card driver. It calls pci_disable_device().

Thanks,
Kenji Kaneshige