[PATCH] fs_enet: Adjust BDs after tx error

Martin Roth martin.roth at motorolasolutions.com
Tue Nov 24 18:08:54 AEDT 2015


Hi,

I have reviewed the code and in my opinion the  line 

                     last_tx_bd = fep->tx_bd_base + (fpi->tx_ring *
sizeof(cbd_t)); 

should be replaced with
              
                     last_tx_bd = fep->tx_bd_base + ((fpi->tx_ring-1) *
sizeof(cbd_t));  

In  the original code  the last_tx_bd  points to location after the last
base descriptor end.
In the code fix that I propose, the  last_tx_bd points to the last
descriptor.  

Am I missing something ?

Thanks,
Martin  



--
View this message in context: http://linuxppc.10917.n7.nabble.com/PATCH-fs-enet-Adjust-BDs-after-tx-error-tp37529p101274.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.


More information about the Linuxppc-dev mailing list