Subject: Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized

From: Jim Baxter <[email-masked]>
Date: Tue, 26 Mar 2013 16:00:55 +0000

The field is the extended status control for the FEC network device, the
values written to it are used to set the hardware transmit and receive
state.
*From:* Eric Dumazet ([email-masked]) *Sent:* Tue, 26 Mar 2013
08:44:04 -0700 *To:* [email-masked] *Cc:* [email-masked],
[email-masked], [email-masked],
[email-masked] *Subject:* Re: [PATCH net-next 1/1] net: fec: TX
Buffer incorrectly initialized
> On Tue, 2013-03-26 at 15:25 +0000, Jim Baxter wrote:
>> The TX Buffer in fec_enet_alloc_buffers was being initialized
>> with the receive register define BD_ENET_RX_INT instead of
>> the transmit register define BD_ENET_TX_INT
>>
>> Signed-off-by: Jim Baxter <[email-masked]>
>> ---
>>  drivers/net/ethernet/freescale/fec_main.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
>> index 3eb608f..2b78a1e 100644
>> --- a/drivers/net/ethernet/freescale/fec_main.c
>> +++ b/drivers/net/ethernet/freescale/fec_main.c
>> @@ -1391,7 +1391,7 @@ static int fec_enet_alloc_buffers(struct net_device *ndev)
>>  
>>  		if (fep->bufdesc_ex) {
>>  			struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp;
>> -			ebdp->cbd_esc = BD_ENET_RX_INT;
>> +			ebdp->cbd_esc = BD_ENET_TX_INT;
>>  		}
>>  
>>  		bdp = fec_enet_get_nextdesc(bdp, fep->bufdesc_ex);
> 
> I am curious. What is the point having cbd_esc ?
> 
> Its a written only field.
> 
> 
>