In bce_start_locked, check the used_tx_bd count rather than the descriptor's mbuf pointer to see if the transmit ring is full.  The mbuf pointer is set only in the last descriptor of a multi-descriptor packet.  By relying on the mbuf pointers of the earlier descriptors, the driver would sometimes overwrite a descriptor belonging to a packet that wasn't completed yet.  Also, tx_chain_prod wasn't updated inside the loop, causing the wrong descriptor to be checked after the first iteration.  The upshot of all this was the loss of some transmitted packets at medium to high packet rates.
In bce_start_locked, check the used_tx_bd count rather than the
descriptor's mbuf pointer to see if the transmit ring is full.  The
mbuf pointer is set only in the last descriptor of a
multi-descriptor packet.  By relying on the mbuf pointers of the
earlier descriptors, the driver would sometimes overwrite a
descriptor belonging to a packet that wasn't completed yet.  Also,
tx_chain_prod wasn't updated inside the loop, causing the wrong
descriptor to be checked after the first iteration.  The upshot of
all this was the loss of some transmitted packets at medium to high
packet rates.

In bce_tx_encap, remove a couple of old statements that shuffled
around the tx_mbuf_map pointers.  These now correspond 1-to-1 with
the transmit descriptors, and they are not supposed to be changed.

Correct a couple of inaccurate comments.

MFC after:	1 month

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase