Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-3] src/sys/dev/pci



Module Name:    src
Committed By:   tron
Date:           Tue Nov 22 20:44:22 UTC 2005

Modified Files:
        src/sys/dev/pci [netbsd-3]: if_bge.c if_bgereg.h

Log Message:
Pull up following revision(s) (requested by jonathan in ticket #985):
        sys/dev/pci/if_bgereg.h: revision 1.27
        sys/dev/pci/if_bge.c: revision 1.94
Correct a performance bug from Bill Paul's original FreeBSD bge(4) driver:
Each call to the FreeBSD bge_start() routine the transmit producer
pointer index from the chip mailbox register BGE_MBX_TX_HOST_PROD0_LO.
The local copy of that value is then updated by bge_encap() as
bge_encap() encapsulates packets in the Tx ring. If bge_encap()
succeds in encpuslating one or more packets, bge_start() tells the
chip to start sending the newly-encinitiates writes the new value back
to the chip mailbox register.
However, comparison of the Linux drivers (Broadcom-supplied and
open-source tg3.c) and to the OpenSolaris driver confirms that
register BGE_MBX_TX_HOST_PROD0_LO is write-only to software.
Thus, we can just keep a copy in the softc, and eliminate the
(expensive) PCI register write on each call to bge_start().
``Make it so''.


To generate a diff of this commit:
cvs rdiff -r1.87.2.3 -r1.87.2.4 src/sys/dev/pci/if_bge.c
cvs rdiff -r1.24.2.1 -r1.24.2.2 src/sys/dev/pci/if_bgereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index