Hi, Problem Description: We have noticed that gPXE UNDI code is always expecting interrupt(s) to be generated by the underlying NIC HW to process the receive path in undinet_poll() routine. This is causing problem on some of the PCI NIC controllers where though the NIC device supports IRQ and able to generate interrupts, during PXE UNDI code some devices do not enable interrupts on their device and run in polling mode. Those devices expect upper layer UNDI drivers to poll for the receive packets instead of waiting for interrupt from the device. But in undinet_poll() routine the code checks for ISR triggered or not if not it just returns. [(please check "if (undinet_isr_triggered)" statement ) in undinet_poll()]
Solution Description: I have attached a patch here to take care of this so that gPXE UNDI code will work on both types of devices (interrupt & polling supported devices). The patch is to check whether the device supports IRQ or not in "ServiceFlags" returned by the API call PXENV_UNDI_GET_IFACE_INFO in undinet_probe() routine. If the underlying device supports IRQ then enable the newly introduced flag "irq_supported" in undi_nic structure. Later in undinet_open() & undinet_close() routines check this flag (irq_supported) to decide to hook the interrupts or to unhook the interrupts. Also in undinet_poll() routine check whether interrupt got generated or not, only if the device supports interrupts otherwise get the packet from underlying UNDI NIC drivers by calling PXENV_UNDI_ISR using FuncFlag PXEENV_UNDI_ISR_GET_NEXT. I am attaching here the patch for review and acceptance. Muralidhar Appalla Engineer Principal 2560 N.First Street Sanjose,CA Emulex Corporation (408)678-3472 (work) [cid:image001.gif@01CB867A.2F6F8180]<http://www.emulex.com/> [cid:image002.gif@01CB867A.2F6F8180]<http://www.twitter.com/emulex>[cid:image003.gif@01CB867A.2F6F8180]<http://www.friendfeed.com/emulex>[cid:image004.gif@01CB867A.2F6F8180]<http://www.google.com/reader/shared/emulexinc>[cid:image005.gif@01CB867A.2F6F8180]<http://www.facebook.com/pages/Emulex-Corporation/116933412473>[cid:image006.gif@01CB867A.2F6F8180]<http://www.slideshare.net/emulex>[cid:image007.gif@01CB867A.2F6F8180]<http://www.emulex.com/rss.xml>[cid:image008.gif@01CB867A.2F6F8180]<http://www.youtube.com/EmulexVideo>[cid:image009.gif@01CB867A.2F6F8180]<http://www.emulex.com/resources/blogs.html>
<<inline: image001.gif>>
<<inline: image002.gif>>
<<inline: image003.gif>>
<<inline: image004.gif>>
<<inline: image005.gif>>
<<inline: image006.gif>>
<<inline: image007.gif>>
<<inline: image008.gif>>
<<inline: image009.gif>>
gpxe-1.0.1.undi_intr.patch
Description: gpxe-1.0.1.undi_intr.patch
_______________________________________________ gPXE mailing list gPXE@etherboot.org http://etherboot.org/mailman/listinfo/gpxe