public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ali Shirvani" <aj.shirvani@gmail.com>
To: devel@edk2.groups.io
Subject: `UsbSyncInterruptTransfer` Modifies the Endpoint Number
Date: Sun, 24 Jan 2021 17:13:27 +0330	[thread overview]
Message-ID: <CAFQ97XFOOX5T_fL+vKGsx-gGRdevXAaLEkO+_KP7tN5NXZOY7g@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2735 bytes --]

Hi all,

I tried to send some data from the host to a HID USB device via interrupt
out endpoint. I used following snippet to send data synchronously:

UsbIo->UsbSyncInterruptTransfer(UsbIo, *0x01*, TestData, &DataLen, 1000,
&Result);

I captured the USB packets, but the endpoint number in the captured file
differs from the endpoint number, *0x01*, that I passed as an argument to
the `UsbSyncInterruptTransfer` function. The endpoint number in the capture
file is *0x81*.

Here is the capture file:

Frame 19: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
USB URB
    [Source: host]
    [Destination: 0.1.1]
    URB id: 0x000000000720e0c0
    URB type: URB_SUBMIT ('S')
    URB transfer type: URB_INTERRUPT (0x01)
    Endpoint: *0x81*, Direction: IN
        1... .... = Direction: IN (1)
        .... 0001 = Endpoint number: 1
    Device: 1
    URB bus id: 0
    Device setup request: relevant (0)
    Only control URBs may contain a setup packet
        [Expert Info (Error/Malformed): Only control URBs may contain a
setup packet]
            [Only control URBs may contain a setup packet]
            [Severity level: Error]
            [Group: Malformed]
    Data: not present ('<')
    URB sec: 1611495093
    URB usec: 737320
    URB status: Success (0)
    URB length [bytes]: 0
    Data length [bytes]: 64
    [bInterfaceClass: HID (0x03)]
    Unused Setup Header
    Interval: 0
    Start frame: 0
    Copy of Transfer Flags: 0x00000000
        .... .... .... .... .... .... .... ...0 = Short not OK: False
        .... .... .... .... .... .... .... ..0. = ISO ASAP: False
        .... .... .... .... .... .... .... .0.. = No transfer DMA map: False
        .... .... .... .... .... .... ..0. .... = No FSBR: False
        .... .... .... .... .... .... .0.. .... = Zero Packet: False
        .... .... .... .... .... .... 0... .... = No Interrupt: False
        .... .... .... .... .... ...0 .... .... = Free Buffer: False
        .... .... .... .... .... ..0. .... .... = Dir IN: False
        .... .... .... ...0 .... .... .... .... = DMA Map Single: False
        .... .... .... ..0. .... .... .... .... = DMA Map Page: False
        .... .... .... .0.. .... .... .... .... = DMA Map SG: False
        .... .... .... 0... .... .... .... .... = Map Local: False
        .... .... ...0 .... .... .... .... .... = Setup Map Single: False
        .... .... ..0. .... .... .... .... .... = Setup Map Local: False
        .... .... .0.. .... .... .... .... .... = DMA S-G Combined: False
        .... .... 0... .... .... .... .... .... = Aligned Temp Buffer: False
    Number of ISO descriptors: 0

Would you please guide me how I should solve this issue?

Regards,
Ali

PS: The attached is the complete pcap file.

[-- Attachment #1.2: Type: text/html, Size: 3347 bytes --]

[-- Attachment #2: uefi.pcap --]
[-- Type: application/vnd.tcpdump.pcap, Size: 222379 bytes --]

                 reply	other threads:[~2021-01-24 13:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFQ97XFOOX5T_fL+vKGsx-gGRdevXAaLEkO+_KP7tN5NXZOY7g@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox