* [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
@ 2013-03-26 15:25 Jim Baxter
2013-03-26 15:44 ` Eric Dumazet
2013-03-26 16:56 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Jim Baxter @ 2013-03-26 15:25 UTC (permalink / raw)
To: David S. Miller, Frank Li; +Cc: Fabio Estevam, netdev
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 <jim_baxter@mentor.com>
---
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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
2013-03-26 15:25 [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized Jim Baxter
@ 2013-03-26 15:44 ` Eric Dumazet
2013-03-26 16:00 ` Jim Baxter
2013-03-26 16:12 ` David Miller
2013-03-26 16:56 ` David Miller
1 sibling, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-03-26 15:44 UTC (permalink / raw)
To: Jim Baxter; +Cc: David S. Miller, Frank Li, Fabio Estevam, netdev
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 <jim_baxter@mentor.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
2013-03-26 15:44 ` Eric Dumazet
@ 2013-03-26 16:00 ` Jim Baxter
2013-03-26 16:08 ` Eric Dumazet
2013-03-26 16:12 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Jim Baxter @ 2013-03-26 16:00 UTC (permalink / raw)
Cc: netdev
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 (eric.dumazet@gmail.com) *Sent:* Tue, 26 Mar 2013
08:44:04 -0700 *To:* jim_baxter@mentor.com *Cc:* davem@davemloft.net,
Frank.Li@freescale.com, fabio.estevam@freescale.com,
netdev@vger.kernel.org *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 <jim_baxter@mentor.com>
>> ---
>> 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.
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
2013-03-26 16:00 ` Jim Baxter
@ 2013-03-26 16:08 ` Eric Dumazet
0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2013-03-26 16:08 UTC (permalink / raw)
To: Jim Baxter; +Cc: netdev
On Tue, 2013-03-26 at 16:00 +0000, Jim Baxter wrote:
> 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.
Hmm, I guess this driver has no intent to be endian safe then...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
2013-03-26 15:44 ` Eric Dumazet
2013-03-26 16:00 ` Jim Baxter
@ 2013-03-26 16:12 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2013-03-26 16:12 UTC (permalink / raw)
To: eric.dumazet; +Cc: jim_baxter, Frank.Li, fabio.estevam, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 26 Mar 2013 08:44:04 -0700
> 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 <jim_baxter@mentor.com>
>> ---
>> 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.
It's read by the chip and this is how the chip decides what interrupts
to generate when the descriptor is fully processed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized
2013-03-26 15:25 [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized Jim Baxter
2013-03-26 15:44 ` Eric Dumazet
@ 2013-03-26 16:56 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2013-03-26 16:56 UTC (permalink / raw)
To: jim_baxter; +Cc: Frank.Li, fabio.estevam, netdev
From: Jim Baxter <jim_baxter@mentor.com>
Date: Tue, 26 Mar 2013 15:25:07 +0000
> 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 <jim_baxter@mentor.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-26 16:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 15:25 [PATCH net-next 1/1] net: fec: TX Buffer incorrectly initialized Jim Baxter
2013-03-26 15:44 ` Eric Dumazet
2013-03-26 16:00 ` Jim Baxter
2013-03-26 16:08 ` Eric Dumazet
2013-03-26 16:12 ` David Miller
2013-03-26 16:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).