none
USB transfer RRS feed

  • Question

  • I would like to know how KMDF handles usb acknowledgements like USB_ACK, USB_NAK etc. For example, in my KMDF bus driver for simulating USB devices, I am passing data to a bus driver, say in response to a control transfer request as below:

    pUrb->TransferFlags = USBD_DEFAULT_PIPE_TRANSFER | USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK; pUrb->Hdr.Status = USBD_STATUS_SUCCESS; status = WdfMemoryCopyToBuffer(WdfMemory, 0, pDescriptorBuffer, pUrb->TransferBufferLength); if (!NT_SUCCESS(status)) {

    return; } WdfRequestComplete(Request, STATUS_SUCCESS);

    Is the Hdr.Status  actually considered as an ACK/NAK etc by the host/bus driver? Can we mention USBD_STATUS_SUCCESS as an ACK? Or is it being handled by KMDF internally?


    • Edited by its_me_here Thursday, March 17, 2016 12:00 PM
    Thursday, March 17, 2016 12:00 PM

Answers

  • USB_ACK/NACK are on the wire details that KMDF nor any usb client driver has no visibility to. You don't need to simulate ACK/NACK b/c there is no real hardware to need it

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, March 17, 2016 4:56 PM