All of lore.kernel.org
 help / color / mirror / Atom feed
* FCC driver for Motorola MPC82xx - an error found
@ 2015-11-24 12:19 Martin Roth
  2015-12-08  1:29 ` Scott Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Roth @ 2015-11-24 12:19 UTC (permalink / raw)
  To: linuxppc-dev


I was looking for an error on MPC8270 processor 100 Mbps Ethernet FCC port.  
The port may become locked if it is set to AUTO, while the peer is forced to
100 Mbs full duplex (non AUTO).
I was looking for an error in the area of collision handling of the driver.
It looks like I found the problem.

The error is at line 555:
http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fs_enet/mac-fcc.c#L555

The problem is that the last descriptor address is not calculated correctly.

Instead of
   last_tx_bd = fep->tx_bd_base + (fpi->tx_ring * sizeof(cbd_t)); 
The fix should be:
   last_tx_bd = fep->tx_bd_base + ((fpi->tx_ring-1)* sizeof(cbd_t));

Is it a bug? 
Thanks,
Martin Roth



--
View this message in context: http://linuxppc.10917.n7.nabble.com/FCC-driver-for-Motorola-MPC82xx-an-error-found-tp101297.html
Sent from the linuxppc-dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: FCC driver for Motorola MPC82xx - an error found
  2015-11-24 12:19 FCC driver for Motorola MPC82xx - an error found Martin Roth
@ 2015-12-08  1:29 ` Scott Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2015-12-08  1:29 UTC (permalink / raw)
  To: Martin Roth, linuxppc-dev

On Tue, 2015-11-24 at 05:19 -0700, Martin Roth wrote:
> I was looking for an error on MPC8270 processor 100 Mbps Ethernet FCC port. 
> The port may become locked if it is set to AUTO, while the peer is forced to
> 100 Mbs full duplex (non AUTO).
> I was looking for an error in the area of collision handling of the driver.
> It looks like I found the problem.
> 
> The error is at line 555:
> http://lxr.free-electrons.com/source/drivers/net/ethernet/freescale/fs_enet/
> mac-fcc.c#L555
> 
> The problem is that the last descriptor address is not calculated correctly.
> 
> Instead of
>    last_tx_bd = fep->tx_bd_base + (fpi->tx_ring * sizeof(cbd_t)); 
> The fix should be:
>    last_tx_bd = fep->tx_bd_base + ((fpi->tx_ring-1)* sizeof(cbd_t));
> 
> Is it a bug? 
> Thanks,
> Martin Roth

Yes, it looks like a bug.  Could you send a patch to the netdev list and
maintainer?

-Scott

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-08  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-24 12:19 FCC driver for Motorola MPC82xx - an error found Martin Roth
2015-12-08  1:29 ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.