LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ethtool support to 8260 fcc ethernet driver (and other stuff)
@ 2002-11-11  3:55 Murray Jensen
  2002-11-11 14:49 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Murray Jensen @ 2002-11-11  3:55 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]

This patch does the following:

1. adds support for a "/proc/bus/mii/fccN" file that displays the contents of
   all MII PHY registers

2. adds support for the generic MII interface available in drivers/net/mii.c

3. adds support for the ioctls used by the ethtool program

4. changes statistics recording so that FIFO Overrun errors are accumulated in
   rx_fifo_errors instead of rx_crc_errors and Late Collision errors are
   accumulated in rx_over_errors instead of rx_frame_errors - this means that
   all the possible errors from the 8260 fcc have their own counter

5. fixes comments such as /* CONFIG_FEC_... */ to be /* CONFIG_FCC_... */

6. fixes a bug in the DM9131 PHY support where the wrong value for link status
   was being seen because the bit in the status register is marked as "latch low"
   which means if it goes low (e.g. you pull out the TP cable), it will stay that
   way until the register is read - I simply always read the register twice now
   to ensure that the current link status is seen (not the latched status).
   Other PHY driver writers should beware of this.

7. fix a printk which had "fec: ..." to output "fccN: ..." instead

8. the fcc driver version is tagged as containing these changes by appending
   " (mjj)" after the version number (which is still 0.3). People will probably
   want to leave this one out, or else bump the version number to 0.4 instead.
   (I did this so I could tell which of our boards here had the fixes).

9. set and clear the LPB (local protect bit) bit in the FCC PSMR in tandem with
   setting and clearing the FDE (full duplex enable) bit - if LPB is not set, the
   receiver is blocked while transmitting - on my board this resulted in very low
   throughput on input to the board (e.g. ftp to the board and PUT a file).
   I found this fix in a message to the list, and it solved by problem, but the
   official 2_4_devel sources still doesn't have it. Sorry, I don't have the
   reference at hand - but a search on the list should pick it up pretty quick
   (so the right person gets credit for the fix).

The main advantage of this patch is that you can compile and use the "ethtool"
program on 8260 linuxppc. This allows you to control the fcc ethernet operating
mode (e.g. 10/100, half/full duplex, auto-negotiation or not). I should point
out that because of number 6 above, the need for ethtool for me went away so I
haven't tested these changes much, other than confirming that ethtool runs and
calls the ioctls properly - but someone might be interested in the code anyway.

Note that this requires a patch to drivers/net/Makefile so that mii.c is compiled
if CONFIG_FCC_GENERIC_MII is enabled - obviously this violates the rule that
non-ppc specific files shouldn't be touched, but it is essential to the patch.

Have fun. Cheers!
								Murrray...
--
Murray Jensen, CSIRO Manufacturing & Infra. Tech.      Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen@csiro.au

Hymod project: http://www.msa.cmst.csiro.au/projects/Hymod/



[-- Attachment #2: 6_fcc_ether_ethtool.gz --]
[-- Type: application/x-gzip , Size: 5970 bytes --]

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

end of thread, other threads:[~2002-11-11 23:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-11  3:55 [PATCH] ethtool support to 8260 fcc ethernet driver (and other stuff) Murray Jensen
2002-11-11 14:49 ` Tom Rini
2002-11-11 23:12   ` Murray Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox