NetBSD/sys/dev/marvell
dyoung b480b62270 Make many ethernet drivers share the common code for MII media
handling, ether_mediastatus() and ether_mediachange().  Check for
a non-ENXIO error return from mii_mediachg().  (ENXIO indicates
that a PHY is suspended.)

This patch shrinks the source code size by 979 lines.  There was
a 5100-byte savings on the NetBSD/i386 kernel configuration, ALL.

I have made a few miscellaneous changes, too:

gem(4): use LIST_EMPTY(), LIST_FOREACH().
mtd(4): handle media ioctls, for a change!
axe(4): do not track link status in sc->axe_link any longer
nfe(4), aue(4), axe(4), udav(4), url(4): do not reset all PHYs
        on a change of media

Except for the change to mtd(4), no functional changes are intended.

XXX This patch affects more architectures than I can feasibly
XXX compile and run.  I have compiled macppc, sparc64, i386.  I
XXX have run the patches on i386 boxen with bnx(4) and sip(4).
XXX Compiling and running on evbmips (MERAKI, ADM5120) is in
XXX progress.
2008-01-19 22:10:14 +00:00
..
files.discovery
gt.c Interrupt handling changes, in discussion since February: 2007-12-03 15:33:00 +00:00
gtbrgreg.h
gtethreg.h
gti2c.c Remove a local variable which is no longer used. 2007-12-16 14:21:43 +00:00
gti2creg.h
gtidma.c machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
gtidmareg.h
gtidmavar.h
gtintrreg.h
gtmpsc.c - Factor out too many copies of the same bit of tty code. 2007-11-19 18:51:36 +00:00
gtmpscreg.h
gtmpscvar.h
gtpci.c Interrupt handling changes, in discussion since February: 2007-12-03 15:33:00 +00:00
gtpcireg.h
gtpcivar.h
gtreg.h
gtsdmareg.h
gtvar.h
if_gfe.c Make many ethernet drivers share the common code for MII media 2008-01-19 22:10:14 +00:00
if_gfevar.h
obio.c machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
README

External m.d. interface points:

To config, code should configure 'gt' with a struct gtbus_attach_args
filled in.  The code should have already set up the bus_space and
bus_dma tags that are passed in.

m.d. pci_chipset_tag_t should contain at least a copy of the
gtpci_chipset_tag_t data structure.

m.d. code must provide the following functions:

pci_intr_map
pci_intr_string
pci_intr_establish,
pci_intr_disestablish

void *gtmpp_intr_establish(struct gt_softc *gt, int mpp_pin, int ipl,
		     int (*handler)(void *), void *arg);
	Add an interrupt attached to Discovery MPP pin <mpp_pin> at
	the given ipl with the given handler.

void gtmpp_intr_disestablish(struct gt_softc *gt, void *cookie);
	Remove an interrupt attached to Discovery MPP pin.

int gtget_macaddr(struct gt_softc *gt, int function, char *enaddr);
	Get MAC for Discovery ethernet <function>

void intr_enable(void);
	Enable all interrupts (disregarding spls)

void intr_disable(void);
	Disable all interrupts (disregarding spls)