none
Removable capability of PCI device RRS feed

  • Question

  • Hi, ALL

    I have a PCIe Raid Controller based on Storport and it's showed on the "Safely Remove Hardware and Eject Media" system tray.

    I checked the "Capabilities" property of this device, the value is 6, which means "CM_DEVCAP_EJECTSUPPORTED" and "CM_DEVCAP_REMOVABLE".

    But if I install the same controller on another machine, the  value of "Capabilities" is 0.

    I want to know what determines the value of "Capabilities"? And is there any method I can change it in my miniport driver? 

    I know there is a SRB_FUNCTION_PNP/StorQueryCapabilities function, but it seems not applicable to the adapter. 

    Monday, March 25, 2013 1:41 AM

Answers

  • Given that this is a PCI device, and it only occurs on some systems but not others, it might be related to the PCI implementation in the system. One thing to look at is the PCI Express Slot Capabilities register (offset 14h in the PCIe capability) of the slot into which your device is installed. You can see this in the debugger with !pci 100 <bus> <device> <function>. You will see something like:

    Capabilities:
    ...
    xx: CapID          10 PCI Express Capability
    ...
    xx+14h: Slot Caps      00000560 <= This value will vary 

    Bit 1 means "Power Controller Present" -> Implies the device is ejectable.
    Bit 6 means "Hot-Plug Capable" -> Implies the device is removable.

    Check to see if either or both of these are set. Note that even if they are set, that doesn't necessarily imply that the device will be treated as ejectable, as there are interactions with firmware needed to enable this as well.

    Thursday, April 4, 2013 5:12 PM

All replies

  • No expert can answer this question?
    Wednesday, March 27, 2013 2:37 AM
  • Thanks, Pavel A.

    My problem is my controller don't implement the hot removal function, but it's shown in the system tray.

    So I want to know what determined that my hardware is hot removable.

    Wednesday, April 3, 2013 6:58 AM
  • Given that this is a PCI device, and it only occurs on some systems but not others, it might be related to the PCI implementation in the system. One thing to look at is the PCI Express Slot Capabilities register (offset 14h in the PCIe capability) of the slot into which your device is installed. You can see this in the debugger with !pci 100 <bus> <device> <function>. You will see something like:

    Capabilities:
    ...
    xx: CapID          10 PCI Express Capability
    ...
    xx+14h: Slot Caps      00000560 <= This value will vary 

    Bit 1 means "Power Controller Present" -> Implies the device is ejectable.
    Bit 6 means "Hot-Plug Capable" -> Implies the device is removable.

    Check to see if either or both of these are set. Note that even if they are set, that doesn't necessarily imply that the device will be treated as ejectable, as there are interactions with firmware needed to enable this as well.

    Thursday, April 4, 2013 5:12 PM