コード例 #1
0
};

static int tlphy_probe		(device_t);
static int tlphy_attach		(device_t);

static device_method_t tlphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		tlphy_probe),
	DEVMETHOD(device_attach,	tlphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc tlphys[] = {
	MII_PHYDESC(xxTI,	TLAN10T),
	MII_PHYDESC_NULL
};

static devclass_t tlphy_devclass;

static driver_t tlphy_driver = {
	"tlphy",
	tlphy_methods,
	sizeof(struct tlphy_softc)
};

DRIVER_MODULE(tlphy, miibus, tlphy_driver, tlphy_devclass, 0, 0);

static int	tlphy_service(struct mii_softc *, struct mii_data *, int);
static int	tlphy_auto(struct tlphy_softc *, int);
コード例 #2
0
static int	truephy_attach(device_t);
static int	truephy_probe(device_t);
static void	truephy_reset(struct mii_softc *);
static void	truephy_status(struct mii_softc *);

static device_method_t truephy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		truephy_probe),
	DEVMETHOD(device_attach,	truephy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc truephys[] = {
	MII_PHYDESC(AGERE,	ET1011C),
	MII_PHYDESC_NULL
};

static devclass_t truephy_devclass;

static driver_t truephy_driver = {
	"truephy",
	truephy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(truephy, miibus, truephy_driver, truephy_devclass, 0, 0);

static const struct truephy_dsp {
	uint16_t	index;
コード例 #3
0
ファイル: atphy.c プロジェクト: mihaicarabas/dragonfly
static void	atphy_status(struct mii_softc *);
static void	atphy_reset(struct mii_softc *);
static uint16_t	atphy_anar(struct ifmedia_entry *);
static void	atphy_auto(struct mii_softc *);

static device_method_t atphy_methods[] = {
	/* Device interface. */
	DEVMETHOD(device_probe,		atphy_probe),
	DEVMETHOD(device_attach,	atphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	DEVMETHOD_END
};

static const struct mii_phydesc atphys[] = {
	MII_PHYDESC(ATHEROS,	F1),
	MII_PHYDESC(ATHEROS,	F1_7),
	MII_PHYDESC(ATHEROS,	F2),
	MII_PHYDESC_NULL
};

static devclass_t atphy_devclass;

static driver_t atphy_driver = {
	"atphy",
	atphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(atphy, miibus, atphy_driver, atphy_devclass, NULL, NULL);
コード例 #4
0
static int	e1000phy_service(struct mii_softc *, struct mii_data *, int);
static void	e1000phy_status(struct mii_softc *);
static void	e1000phy_mii_phy_auto(struct mii_softc *);
static void	e1000phy_reset(struct mii_softc *);

static device_method_t e1000phy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		e1000phy_probe),
	DEVMETHOD(device_attach,	e1000phy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc e1000phys[] = {
	MII_PHYDESC(xxMARVELL,	E1000_2),
	MII_PHYDESC(xxMARVELL,	E1000_3),
	MII_PHYDESC(xxMARVELL,	E1000_5),
	MII_PHYDESC(xxMARVELL,	E1111),
	MII_PHYDESC(MARVELL,	E1000),
	MII_PHYDESC(MARVELL,	E1011),
	MII_PHYDESC(MARVELL,	E1000_3),
	MII_PHYDESC(MARVELL,	E1000_4),
	MII_PHYDESC(MARVELL,	E1000_5),
	MII_PHYDESC(MARVELL,	E1000_6),
	MII_PHYDESC(MARVELL,	E3082),
	MII_PHYDESC(MARVELL,	E1112),
	MII_PHYDESC(MARVELL,	E1149),
	MII_PHYDESC(MARVELL,	E1111),
	MII_PHYDESC(MARVELL,	E1116),
	MII_PHYDESC(MARVELL,	E1118),
コード例 #5
0
ファイル: nsgphy.c プロジェクト: AhmadTux/DragonFlyBSD
#include "miibus_if.h"

static int nsgphy_probe		(device_t);
static int nsgphy_attach	(device_t);

static device_method_t nsgphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		nsgphy_probe),
	DEVMETHOD(device_attach,	nsgphy_attach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc nsgphys[] = {
	MII_PHYDESC(NATSEMI,	DP83891),
	MII_PHYDESC(NATSEMI,	DP83861),
	MII_PHYDESC_NULL
};

static devclass_t nsgphy_devclass;

static driver_t nsgphy_driver = {
	"nsgphy",
	nsgphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(nsgphy, miibus, nsgphy_driver, nsgphy_devclass, NULL, NULL);

static int	nsgphy_service(struct mii_softc *, struct mii_data *, int);
コード例 #6
0
#include "miibus_if.h"

static int nsphy_probe		(device_t);
static int nsphy_attach		(device_t);

static device_method_t nsphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		nsphy_probe),
	DEVMETHOD(device_attach,	nsphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc nsphys[] = {
	MII_PHYDESC(NATSEMI,	DP83840),
	MII_PHYDESC_NULL
};

static devclass_t nsphy_devclass;

static driver_t nsphy_driver = {
	"nsphy",
	nsphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(nsphy, miibus, nsphy_driver, nsphy_devclass, 0, 0);

static int	nsphy_service(struct mii_softc *, struct mii_data *, int);
static void	nsphy_status(struct mii_softc *);
コード例 #7
0
ファイル: brgphy.c プロジェクト: varialus/DragonFlyX
#include <net/if.h>
#include <net/if_media.h>
#include <net/if_arp.h>

#include "mii.h"
#include "miivar.h"
#include "miidevs.h"
#include "brgphyreg.h"

#include "miibus_if.h"

static int brgphy_probe(device_t);
static int brgphy_attach(device_t);

static const struct mii_phydesc brgphys[] = {
	MII_PHYDESC(xxBROADCOM,	BCM5400),
	MII_PHYDESC(xxBROADCOM,	BCM5401),
	MII_PHYDESC(xxBROADCOM,	BCM5411),
	MII_PHYDESC(xxBROADCOM,	BCM5421),
	MII_PHYDESC(xxBROADCOM,	BCM54K2),
	MII_PHYDESC(xxBROADCOM,	BCM5461),
	MII_PHYDESC(xxBROADCOM,	BCM5462),
	MII_PHYDESC(xxBROADCOM,	BCM5464),

	MII_PHYDESC(xxBROADCOM,	BCM5701),
	MII_PHYDESC(xxBROADCOM,	BCM5703),
	MII_PHYDESC(xxBROADCOM,	BCM5704),
	MII_PHYDESC(xxBROADCOM,	BCM5705),
	MII_PHYDESC(xxBROADCOM,	BCM5714),
	MII_PHYDESC(xxBROADCOM,	BCM5750),
	MII_PHYDESC(xxBROADCOM,	BCM5752),
コード例 #8
0
ファイル: pnaphy.c プロジェクト: kusumi/DragonFlyBSD
#include "miibus_if.h"

static int pnaphy_probe		(device_t);
static int pnaphy_attach	(device_t);

static device_method_t pnaphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		pnaphy_probe),
	DEVMETHOD(device_attach,	pnaphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	DEVMETHOD_END
};

static const struct mii_phydesc pnaphys[] = {
	MII_PHYDESC(AMD,	79c978),
	MII_PHYDESC_NULL
};

static devclass_t pnaphy_devclass;

static driver_t pnaphy_driver = {
	"pnaphy",
	pnaphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(pnaphy, miibus, pnaphy_driver, pnaphy_devclass, NULL, NULL);

static int	pnaphy_service(struct mii_softc *, struct mii_data *, int);
コード例 #9
0
ファイル: acphy.c プロジェクト: Gwenio/DragonFlyBSD
#include "miibus_if.h"

static int acphy_probe		(device_t);
static int acphy_attach		(device_t);

static device_method_t acphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		acphy_probe),
	DEVMETHOD(device_attach,	acphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	DEVMETHOD_END
};

static const struct mii_phydesc acphys[] = {
	MII_PHYDESC(xxALTIMA,	AC101),
	MII_PHYDESC(xxALTIMA,	AC101L),
	MII_PHYDESC(xxALTIMA,	AC_UNKNOWN),
	MII_PHYDESC(xxALTIMA,	Am79C875),
	MII_PHYDESC_NULL
};

static devclass_t acphy_devclass;

static driver_t acphy_driver = {
	"acphy",
	acphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(acphy, miibus, acphy_driver, acphy_devclass, NULL, NULL);
コード例 #10
0
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ NULL, NULL }
};

static devclass_t jmphy_devclass;
static driver_t jmphy_driver = {
	"jmphy",
	jmphy_methods,
	sizeof(struct mii_softc)
};

DRIVER_MODULE(jmphy, miibus, jmphy_driver, jmphy_devclass, 0, 0);

static const struct mii_phydesc jmphys[] = {
	MII_PHYDESC(JMICRON, JMP202),
	MII_PHYDESC(JMICRON, JMP211),
	MII_PHYDESC_NULL
};

static int
jmphy_probe(device_t dev)
{
	struct mii_attach_args *ma = device_get_ivars(dev);
	const struct mii_phydesc *mpd;

	mpd = mii_phy_match(ma, jmphys);
	if (mpd != NULL) {
		device_set_desc(dev, mpd->mpd_name);
		return 0;
	}
コード例 #11
0
ファイル: ciphy.c プロジェクト: AhmadTux/DragonFlyBSD
#include <dev/netif/mii_layer/ciphyreg.h>

static int ciphy_probe(device_t);
static int ciphy_attach(device_t);

static device_method_t ciphy_methods[] = {
	/* device interface */
	DEVMETHOD(device_probe,		ciphy_probe),
	DEVMETHOD(device_attach,	ciphy_attach),
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	{ 0, 0 }
};

static const struct mii_phydesc ciphys[] = {
	MII_PHYDESC(CICADA,	CS8201),
	MII_PHYDESC(CICADA,	CS8201A),
	MII_PHYDESC(CICADA,	CS8201B),
	MII_PHYDESC(xxCICADA,	CS8201),
	MII_PHYDESC(xxCICADA,	CS8201A),
	MII_PHYDESC(xxCICADA,	CS8201B),
	MII_PHYDESC(VITESSE,	VSC8601),
	MII_PHYDESC_NULL
};

static devclass_t ciphy_devclass;

static driver_t ciphy_driver = {
	"ciphy",
	ciphy_methods,
	sizeof(struct mii_softc)
コード例 #12
0
ファイル: ip1000phy.c プロジェクト: Gwenio/DragonFlyBSD
	DEVMETHOD(device_detach,	ukphy_detach),
	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
	DEVMETHOD_END
};

static devclass_t ip1000phy_devclass;
static driver_t ip1000phy_driver = {
	"ip1000phy",
	ip1000phy_methods,
	sizeof (struct mii_softc)
};

DRIVER_MODULE(ip1000phy, miibus, ip1000phy_driver, ip1000phy_devclass, NULL, NULL);

static const struct mii_phydesc ip1000phys[] = {
	MII_PHYDESC(ICPLUS,	IP1000A),
	MII_PHYDESC_NULL
};

static int
ip1000phy_probe(device_t dev)
{
	struct mii_attach_args *ma;
	const struct mii_phydesc *mpd;

	ma = device_get_ivars(dev);
	mpd = mii_phy_match(ma, ip1000phys);
	if (mpd != NULL) {
		device_set_desc(dev, mpd->mpd_name);
		return (0);
	}