[ipxe-devel] [gPXE-devel] [PATCH][forcedeth] Exit poll() as early as possible if no work to do

Michael Brown mbrown at fensystems.co.uk
Thu Nov 11 21:31:46 UTC 2010

On Thursday 11 Nov 2010 21:15:35 Thomas Miletich wrote:
> I got my hands on an old nforce mainboard with a 10de:0066 forcedeth
> LoM today. Chainloading pxelinux from gPXE and loading linux over tftp
> was very slow(around 0.25-0.5MByte/s).
> While trying to find the cause I made the following change. It
> resolves the problem for me; transfers are back at ~10MByte/sec in my
> 100MBit test setup now.
> I think the if () should be placed where it is now, so we exit ASAP in
> poll(). Anyway, I don't understand why this resolved the speed issue I
> was seeing. If anyone has any ideas, please let me know.

Question: does this affect the ability to autonegotiate?  The code block

     /* Link change interrupt occured. Call always if link is down,
      * to give auto-neg a chance to finish */
     if ( ( status & NVREG_IRQ_LINK ) || ! ( netdev_link_ok ( netdev ) ) )
          forcedeth_link_status ( netdev );

suggests that we don't see an NVREG_IRQ_LINK interrupt status while the link 
is down, and your patch would cause forcedeth_poll() to exit before testing 

forcedeth_link_status() gets called explicitly in probe().  I would therefore 
expect that with your patch we may work only if the link is up at the time 
probe() is called.

Could you try starting iPXE+your patch with the link down (e.g. cable 
unplugged), open the net device, plug in the cable, and see if ifstat reports 



More information about the ipxe-devel mailing list