Deleted Added
full compact
tdkphy.c (201453) tdkphy.c (213229)
1/*-
2 * Copyright (c) 2000,2001 Jonathan Chen.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000,2001 Jonathan Chen.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/mii/tdkphy.c 201453 2010-01-03 23:31:58Z imp $");
30__FBSDID("$FreeBSD: head/sys/dev/mii/tdkphy.c 213229 2010-09-27 20:31:03Z marius $");
31
32/*
33 * Driver for the TDK 78Q2120 MII
34 *
35 * References:
36 * Datasheet for the 78Q2120 - http://www.tsc.tdk.com/lan/78q2120.pdf
37 * Most of this code stolen from ukphy.c
38 */

--- 64 unchanged lines hidden (view full) ---

103tdkphy_attach(device_t dev)
104{
105 struct mii_softc *sc;
106 struct mii_attach_args *ma;
107 struct mii_data *mii;
108 sc = device_get_softc(dev);
109 ma = device_get_ivars(dev);
110 sc->mii_dev = device_get_parent(dev);
31
32/*
33 * Driver for the TDK 78Q2120 MII
34 *
35 * References:
36 * Datasheet for the 78Q2120 - http://www.tsc.tdk.com/lan/78q2120.pdf
37 * Most of this code stolen from ukphy.c
38 */

--- 64 unchanged lines hidden (view full) ---

103tdkphy_attach(device_t dev)
104{
105 struct mii_softc *sc;
106 struct mii_attach_args *ma;
107 struct mii_data *mii;
108 sc = device_get_softc(dev);
109 ma = device_get_ivars(dev);
110 sc->mii_dev = device_get_parent(dev);
111 mii = device_get_softc(sc->mii_dev);
111 mii = ma->mii_data;
112 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
113
114 if (bootverbose)
115 device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n",
116 MII_OUI(ma->mii_id1, ma->mii_id2),
117 MII_MODEL(ma->mii_id2), MII_REV(ma->mii_id2));
118
119 sc->mii_inst = mii->mii_instance;

--- 155 unchanged lines hidden ---
112 LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list);
113
114 if (bootverbose)
115 device_printf(dev, "OUI 0x%06x, model 0x%04x, rev. %d\n",
116 MII_OUI(ma->mii_id1, ma->mii_id2),
117 MII_MODEL(ma->mii_id2), MII_REV(ma->mii_id2));
118
119 sc->mii_inst = mii->mii_instance;

--- 155 unchanged lines hidden ---