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 <[email protected]> Sent: 2023年1月11日 9:18 AM To: [email protected]; Richard Ho (何明忠) <[email protected]> Cc: Andrew Fish <[email protected]>; Leif Lindholm <[email protected]>; Michael D Kinney <[email protected]>; Michael Kubacki <[email protected]>; Zhiguang Liu <[email protected]>; Liming Gao <[email protected]>; Tony Lo (羅金松) <[email protected]> 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. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98288): https://edk2.groups.io/g/devel/message/98288 Mute This Topic: https://groups.io/mt/95531719/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
