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://github.com/ipxe/ipxe/commit/ab1954638

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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98257): https://edk2.groups.io/g/devel/message/98257
Mute This Topic: https://groups.io/mt/95531719/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to