Writing Device Drivers

Hot Removal With No Replacement

This operation is used to remove a card. You may want to remove a card because, for example, its failure mode affects system operation. To perform a hotplug removal:

  1. Indicate, using an administrative application, that a card needs to be removed or replaced.

  2. Through the administrative application, use kernel functions to take the appropriate driver offline.

    If the driver instance is busy or open, this operation may fail and you will first have to terminate the processes that are accessing the device.

  3. Through the administrative application, use kernel functions to turn off the appropriate slot; an optional slot-state indicator will show that the slot is off and it is now safe to remove the card.

  4. Remove the card.

  5. Inform the administrative application that the card has been removed.