Re: [Pcihpd-discuss] what is writing to /sys/bus/pci/slot/<slot_no>/power really supposed to do?

Matthew Wilcox
2007-10-01T17:46:56Z

On Mon, Oct 01, 2007 at 10:35:57AM -0700, Kristen Carlson Accardi wrote:
> So - here's where we get to interpret. The spec says that _EJ0 is
> used to "eject" the card. From the spec:
> 6.3.3 _EJx (Eject)
> These control methods are optional and are supplied for devices that
> support a software-controlled VCR-style ejection mechanism or that
> require an action be performed such as isolation of power/data lines
> before the device can be removed from the system.
> <snip>
> For hot removal, the device must be immediately ejected when OSPM calls
> the _EJ0 control method. The _EJ0 control method does not return until
> ejection is complete. After calling _EJ0, OSPM verifies the
> device no longer exists to determine if the eject succeeded.
> For _HID devices, OSPM evaluates the _STA method. For _ADR devices,
> OSPM checks with the bus driver for that device.
>
> So, when I read this, it seems like if a vendor followed the spec,
> executing _EJ0 would hang until we physically pulled the card out
> of the system, which seems bad. So, maybe this is why we don't call
> _EJ0?

I think you've misread it. Follow the other arm of the 'or':
"require an action be performed such as isolation of power/data
lines before the device can be removed from the system."
So I interpret "the eject succeeded" as "power/data lines are isolated"
for PCI cards.

> _PS3 apparently is used to put a device into D3. By "device" here
> I'm not sure if we are talking about the adapter in the slot, or the
> slot itself.

Slots don't have a D3. If you're talking about the bus, I guess there's
a B3. But D is for devices.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."