From: "Tinh Nguyen" <tinhnguyen@os.amperecomputing.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"richardho@ami.com" <richardho@ami.com>
Subject: Re: [edk2-devel] [PATCH v4 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support
Date: Tue, 21 Feb 2023 02:23:33 +0000 [thread overview]
Message-ID: <2e170b3a-0822-9e13-bbf1-15c99d646d78@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <20230218094743.358-1-richardho@ami.com>
[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]
On 18/02/2023 16:47, RichardHo [何明忠] via groups.io wrote:
+ PrintRndisMsg (RndisMsg);
+
+ Status = UsbIo->UsbControlTransfer (
+ UsbIo,
+ &DevReq,
+ EfiUsbDataOut,
+ USB_ETHERNET_TRANSFER_TIMEOUT,
+ RndisMsg,
+ RndisMsg->MessageLength,
+ &UsbStatus
+ );
+
+ DEBUG ((DEBUG_INFO, "RndisControlMsg: UsbStatus : %x Status : %r RndisMsgResponse : %lx\n", UsbStatus, Status, RndisMsgResponse));
+
+ // Error or no response expected
+ if ((EFI_ERROR (Status)) || (RndisMsgResponse == NULL)) {
+ DEBUG ((DEBUG_INFO, "RndisControlMsg: UsbStatus : %x Status : %r\n", UsbStatus, Status));
+ return Status;
+ }
+
+ for (Index = 0; Index < (RNDIS_CONTROL_TIMEOUT/100); Index++) {
+ ReadRndisResponseInterrupt (UsbRndisDevice);
Could you help review the ReadRndisResponseInterrupt function? (). While using USB Rndis, the Jade platform crashes.
I found that AMI had published the same driver here OSF-Aptio-OpenEdition/UsbRndisFunction.c at main · opencomputeproject/OSF-Aptio-OpenEdition (github.com)<https://github.com/opencomputeproject/OSF-Aptio-OpenEdition/blob/main/UsbRndisPkg/UsbRndis/UsbRndisFunction.c>,
however the RndisControlMsg function does not call ReadRndisResponseInterrupt.
Jade platform (aarch64) works well with this (OSF-Aptio-OpenEdition/UsbRndisFunction.c at main · opencomputeproject/OSF-Aptio-OpenEdition (github.com)<https://github.com/opencomputeproject/OSF-Aptio-OpenEdition/blob/main/UsbRndisPkg/UsbRndis/UsbRndisFunction.c>). Does your x86 system work without this line ?
+ ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
+
+ DevReq.RequestType = USB_ENDPOINT_DIR_IN | USB_REQ_TYPE_CLASS | USB_TARGET_INTERFACE;
+ DevReq.Request = GET_ENCAPSULATED_RESPONSE;
[-- Attachment #2: Type: text/html, Size: 2462 bytes --]
next prev parent reply other threads:[~2023-02-21 2:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 9:47 [PATCH v4 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support RichardHo [何明忠]
2023-02-18 9:47 ` [PATCH v4 2/3] UsbNetworkPkg/UsbCdcEcm: Add USB Cdc ECM " RichardHo [何明忠]
2023-03-06 8:13 ` [edk2-devel] " Tinh Nguyen
2023-02-18 9:47 ` [PATCH v4 3/3] UsbNetworkPkg/UsbCdcNcm: Add USB Cdc NCM " RichardHo [何明忠]
2023-02-21 2:23 ` Tinh Nguyen [this message]
2023-02-21 3:01 ` [edk2-devel] [PATCH v4 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS " RichardHo [何明忠]
2023-03-03 9:34 ` RichardHo [何明忠]
2023-03-06 7:59 ` Tinh Nguyen
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=2e170b3a-0822-9e13-bbf1-15c99d646d78@amperemail.onmicrosoft.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