Siyuan, Thanks, this patch fixed the issue for us. Much appreciated.
Reviewed-by: Eugene Cohen <eug...@hp.com> -----Original Message----- From: Fu, Siyuan [mailto:siyuan...@intel.com] Sent: Wednesday, October 29, 2014 7:58 PM To: Cohen, Eugene Cc: edk2-devel@lists.sourceforge.net; Tian, Feng Subject: RE: SnpDxe BAR check breaks adapters with memory-only BARs Hi, Euqune The original intention of r16104 is to use logic bar index from PciIo protocol instead of physical offset in PCI configuration header, but it incorrectly add a new restriction about the existence of the memory bar and IO bar. Here is a patch to remove this check, please help to check whether it could fix the problem in your NIC device, thanks. Best regards Siyuan -----Original Message----- From: Tian, Feng [mailto:feng.t...@intel.com] Sent: Thursday, October 30, 2014 9:16 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] SnpDxe BAR check breaks adapters with memory-only BARs Eugene Thanks for raising this issue. We are working on this and will get back to you if we have progress. Thanks Feng -----Original Message----- From: Cohen, Eugene [mailto:eug...@hp.com] Sent: Wednesday, October 29, 2014 22:25 To: edk2-devel@lists.sourceforge.net Subject: [edk2] SnpDxe BAR check breaks adapters with memory-only BARs Dear MdeModulePkg maintainer, On September 14 SVN rev 16104 there was a change to SnpDxe to improve the detection of BARs to replace the hardcoded MemoryBarIndex=0 and IoBarIndex=1 with some intelligent scanning using PCI_IO GetBarAttributes instead. This change had the side effect of breaking our UNDI drivers (from two different manufacturers) because of a requirement that both IO and Memory BARs exist: if ((Snp->MemoryBarIndex == PCI_MAX_BAR) || (Snp->IoBarIndex == PCI_MAX_BAR)) { goto Error_DeleteSNP; } Our NICs only implement memory BARs and have no IO bars so this check fails and SnpDxe will no longer bind to these adapters. I'm not aware of a requirement that adapters must implement both Memory and IO BARs. I'm thinking SnpDxe should handle all of these cases and not just the dual memory- and io-BAR case. Eugene ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel