From: "RichardHo [何明忠]" <richardho@ami.com>
To: Michael Brown <mcb30@ipxe.org>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Andrew Fish" <afish@apple.com>,
"Leif Lindholm" <quic_llindhol@quicinc.com>,
"Michael D Kinney" <michael.d.kinney@intel.com>,
"Michael Kubacki" <michael.kubacki@microsoft.com>,
"Zhiguang Liu" <zhiguang.liu@intel.com>,
"Liming Gao" <gaoliming@byosoft.com.cn>,
"Tony Lo (羅金松)" <TonyLo@ami.com>
Subject: Re: [edk2-devel] [PATCH 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support
Date: Wed, 11 Jan 2023 09:47:52 +0000 [thread overview]
Message-ID: <CY8PR10MB6441B1C96152E5FB765950E0B0FC9@CY8PR10MB6441.namprd10.prod.outlook.com> (raw)
In-Reply-To: <010201859e67bf63-11df6f7a-c226-4f47-a092-dffbe1f7d9e7-000000@eu-west-1.amazonses.com>
Hi Michael,
Thanks for your response. We will do more test in Nic->CanReceive flag's code next.
Thanks,
Richard
-----Original Message-----
From: Michael Brown <mcb30@ipxe.org>
Sent: 2023年1月11日 9:18 AM
To: devel@edk2.groups.io; Richard Ho (何明忠) <RichardHo@ami.com>
Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Michael D Kinney <michael.d.kinney@intel.com>; Michael Kubacki <michael.kubacki@microsoft.com>; Zhiguang Liu <zhiguang.liu@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Tony Lo (羅金松) <TonyLo@ami.com>
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support
**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**
On 08/12/2022 03:44, RichardHo [何明忠] via groups.io wrote:
> + case PXE_OPFLAGS_RECEIVE_FILTER_DISABLE:
> + if (Cdb->CPBsize != PXE_CPBSIZE_NOT_USED) {
> + Cdb->StatFlags = PXE_STATFLAGS_COMMAND_FAILED;
> + Cdb->StatCode = PXE_STATCODE_INVALID_CDB;
> + }
> +
> + Nic->CanReceive = TRUE;
> + break;
This seems to be the only point in the entire driver that ever sets CanReceive = TRUE.
The result of this is that the device will be unable to receive unless at least one attempt has been made to *disable* the receive filters.
This seems unlikely to be the intended behaviour.
It so happens that the combination of MnpDxe and SnpDxe usually *does* make an attempt to disable the receive filters, and so the bug is masked in normal operation.
I have added a workaround for this bug to iPXE:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fipxe%2Fipxe%2Fcommit%2Fab1954638&data=05%7C01%7Crichardho%40ami.com%7C0fa15caf7eb249a0400708daf371adc1%7C27e97857e15f486cb58e86c2b3040f93%7C1%7C0%7C638089966820616004%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MCb2cgKhHMXGvGNB9uSaJbDHwRo3wr8zr5oJizuRuOU%3D&reserved=0
I would suggest fixing your UndiReceiveFilter() function so that the workaround is not necessary. I cannot follow the logic behind the CanReceive flag, so I am unable to suggest a patch, sorry.
Thanks,
Michael
-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.
next prev parent reply other threads:[~2023-01-11 9:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 3:44 [PATCH 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support RichardHo [何明忠]
2022-12-08 4:41 ` [edk2-devel] " Rebecca Cran
2022-12-08 4:57 ` Rebecca Cran
2022-12-12 5:48 ` RichardHo [何明忠]
2023-01-08 10:41 ` tinhnguyen
2023-01-09 23:50 ` Michael Brown
2023-01-12 8:36 ` RichardHo [何明忠]
2023-01-20 21:36 ` Rebecca Cran
2023-02-05 8:04 ` Tinh Nguyen
2023-02-05 10:26 ` Michael Brown
2023-01-10 5:07 ` Rebecca Cran
2023-01-11 7:34 ` tinhnguyen
2023-01-11 9:55 ` Michael Brown
2023-01-11 10:56 ` Tinh Nguyen
[not found] ` <53d2211e-d8ad-fafe-38ad-814ed77d19cf@ipxe.org>
2023-01-11 1:11 ` Michael Brown
2023-01-11 1:17 ` Michael Brown
2023-01-11 9:47 ` RichardHo [何明忠] [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-10-03 9:26 RichardHo [何明忠]
2022-12-01 15:46 ` [edk2-devel] " Rebecca Cran
2022-12-02 10:42 ` RichardHo [何明忠]
2022-12-02 10:09 ` Michael Brown
2022-12-02 10:42 ` RichardHo [何明忠]
2022-12-02 11:49 ` Chang, Abner
2022-12-02 23:27 ` Rebecca Cran
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=CY8PR10MB6441B1C96152E5FB765950E0B0FC9@CY8PR10MB6441.namprd10.prod.outlook.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