default I/O Target & remote I/O Target

Discussion in 'Windows Vista Drivers' started by min, Mar 28, 2008.

  1. min

    min Guest

    by WDK 6000, sample driver for 1394:

    the driver has a default I/O target for each device, which is the device's
    next-lower driver:
    -------------------------------------------------------------------------------------------
    \src\kmdf\1394\driver\pnp.c

    deviceExtension->StackIoTarget = WdfDeviceGetIoTarget(device);
    deviceExtension->StackDeviceObject = WdfDeviceWdmGetAttachedDevice(device);
    -----------------------------------------------------------------------------------------------------------------------------------------

    the sample driver has also a remote I/O target representing port device
    object so that we can send async requests in rawmode directly to the port
    device:
    -------------------------------------------------------------------------------------------
    \src\kmdf\1394\driver\pnp.c

    pNodeExt = WdfDeviceWdmGetPhysicalDevice(device)->DeviceExtension;
    deviceExtension->PortDeviceObject = pNodeExt->PortDeviceObject;
    WDF_IO_TARGET_OPEN_PARAMS_INIT_EXISTING_DEVICE(&openParams,
    pNodeExt->PortDeviceObject);
    WdfIoTargetCreate(device, WDF_NO_OBJECT_ATTRIBUTES,
    &deviceExtension->PortDeviceIoTarget);
    WdfIoTargetOpen(deviceExtension->PortDeviceIoTarget, &openParams);
    -------------------------------------------------------------------------------------------

    So, if I want to use bus & nod number by asyncronous transfer (rawmode), the
    t1394_AsyncRead function will take as ioTarget the remote I/O target
    -------------------------------------------------------------------------------------------
    ioTarget = deviceExtension->PortDeviceIoTarget;
    -------------------------------------------------------------------------------------------

    in the other case, the t1394_AsyncRead function use the default I/O target
    as ioTarget and ignore bus & nod number.
    -------------------------------------------------------------------------------------------
    ioTarget = deviceExtension->StackIoTarget;
    -------------------------------------------------------------------------------------------

    I have now a 1394 device with 200 Mpbs for asyncronous transfer, so I have
    to set Xmit properties with 200 Mpbs and use no bus & nod number..
    If I don't set Xmit properites, I get the error 'STATUS_IO_DEVICE_ERROR'.
    But if I use bus & nod number (asyncronous transfer in rawmode), I get also
    the error message 'STATUS_IO_DEVICE_ERROR'.

    It seems like that the set Xmit properties function has no effect if I have
    asyncronous transfer in rawmode. But why?
    Could somebody please explain this?

    Thanks in advance,
    min
     
    min, Mar 28, 2008
    #1
    1. Advertisements

  2. min

    min Guest

    I see now that by raw-mode, the driver must send the request to the PDO of
    the host controller instead of to the PDO of the target device.

    Can this be the reason of the error? Is there a way to set XmitProperties
    and make asynchronous transfer in raw-mode?

    thanks in advance
    min
     
    min, Mar 28, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.