Deleted Added
full compact
rlswitch.c (165782) rlswitch.c (213229)
1/*-
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 * Copyright (c) 2006 Bernd Walter. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 * Copyright (c) 2006 Bernd Walter. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/dev/mii/rlswitch.c 165782 2007-01-05 01:46:26Z ticso $");
35__FBSDID("$FreeBSD: head/sys/dev/mii/rlswitch.c 213229 2010-09-27 20:31:03Z marius $");
36
37/*
38 * driver for RealTek 8305 pseudo PHYs
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>

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

112{
113 struct mii_softc *sc;
114 struct mii_attach_args *ma;
115 struct mii_data *mii;
116
117 sc = device_get_softc(dev);
118 ma = device_get_ivars(dev);
119 sc->mii_dev = device_get_parent(dev);
36
37/*
38 * driver for RealTek 8305 pseudo PHYs
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>
43#include <sys/kernel.h>

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

112{
113 struct mii_softc *sc;
114 struct mii_attach_args *ma;
115 struct mii_data *mii;
116
117 sc = device_get_softc(dev);
118 ma = device_get_ivars(dev);
119 sc->mii_dev = device_get_parent(dev);
120 mii = device_get_softc(sc->mii_dev);
120 mii = ma->mii_data;
121
122 /*
123 * We handle all pseudo PHY in a single instance, so never allow
124 * non-zero * instances!
125 */
126 if (mii->mii_instance != 0) {
127 device_printf(dev, "ignoring this PHY, non-zero instance\n");
128 return (ENXIO);

--- 297 unchanged lines hidden ---
121
122 /*
123 * We handle all pseudo PHY in a single instance, so never allow
124 * non-zero * instances!
125 */
126 if (mii->mii_instance != 0) {
127 device_printf(dev, "ignoring this PHY, non-zero instance\n");
128 return (ENXIO);

--- 297 unchanged lines hidden ---