Windows Drivers

API extensions for slot and function drivers on Windows. More...

Data Structures

struct  sdioemb_wdf_interface
struct  sdioemb_wdf_slot_data

Functions

NTSTATUS sdioemb_wdf_create_child_list (WDFDEVICE device, struct sdioemb_slot *slot)
void sdioemb_wdf_destroy_child_list (struct sdioemb_slot *slot)
int sdioemb_wdf_slot_register (struct sdioemb_slot *slot)
void sdioemb_wdf_slot_unregister (struct sdioemb_slot *slot)
void sdioemb_wdf_event_log_init (PWDFDEVICE_INIT device_init)
NTSTATUS sdioemb_wdf_event_log_create (WDFDEVICE device)

Detailed Description

API extensions for slot and function drivers on Windows.

Sdioemb makes use of the Windows Driver Model to bind function drivers to function device. When a card is inserted into a slot the following occurs.

  1. The slot driver's add_function() notifier callback is called for each enumerated function.
  2. The slot driver creates a child PDO for the function.
  3. The add_function callback returns SDIOEMB_ADD_FUNC_DEFERRED to indicate that the function is not yet ready for use.
  4. Windows loads an appropriate driver for the function.
  5. The function driver calls sdioemb_driver_register() in the DriverEntry routine.
  6. In the EvtDriverDeviceAdd callback, the function driver obtains sdioemb's own device structure for that function (struct sdioemb_dev).
  7. When the function device first enters the D0 state, the function driver calls sdioemb_add_function(). This makes the function available to function drivers registered with sdioemb.
  8. The driver's probe() callback is called.

Slot Drivers

Slot drivers must be kernel-mode WDF drivers.

Function Drivers

Slot drivers must be kernel-mode WDF (or WDM) drivers.


Function Documentation

NTSTATUS sdioemb_wdf_create_child_list ( WDFDEVICE  device,
struct sdioemb_slot slot 
)

Create and initialize a slot's child list.

This must be called before registering the slot with sdioemb_wdf_slot_register().

Parameters:
device the FDO for the slot.
slot the slot.
Returns:
An NTSTATUS value for the status of the child list creation (success or failure).

References sdioemb_wdf_slot_data::child_list, sdioemb_wdf_slot_data::device, and sdioemb_slot::drv_data.

void sdioemb_wdf_destroy_child_list ( struct sdioemb_slot slot  ) 

Destroy a slot's child list.

The slot must not be registered.

Parameters:
slot the slot.

References sdioemb_wdf_slot_data::child_list, and sdioemb_slot::drv_data.

NTSTATUS sdioemb_wdf_event_log_create ( WDFDEVICE  device  ) 

Create the event logging infrastructure for a WDF device.

This creates the I/O queues etc. for the event logging for a WDF device with one or more slots.

Parameters:
device the WDF device.
Returns:
STATUS_SUCCESS on successfully creating the I/O queues.

A error status otherwise.

void sdioemb_wdf_event_log_init ( PWDFDEVICE_INIT  device_init  ) 

Initialize a WDF device for event logging.

Parameters:
device_init the device initialization information.

int sdioemb_wdf_slot_register ( struct sdioemb_slot slot  ) 

Register a WDF slot driver.

This sets the add and delete function notifiers to create the correct WDF child devices.

Parameters:
slot the slot to be registered.
Returns:
0 on success.

-ve error code on failure.

References sdioemb_slot_notifiers::add_function, sdioemb_slot_notifiers::del_function, sdioemb_slot::notifs, and sdioemb_slot_register().

void sdioemb_wdf_slot_unregister ( struct sdioemb_slot slot  ) 

Unregister a WDF slot driver.

This unregisters the slot driver previously registered with sdioemb_wdf_slot_register().

Parameters:
slot the slot to be unregistered.

References sdioemb_slot_unregister().


Generated on Wed Oct 27 15:18:12 2010 for sdioemb by  doxygen 1.5.5