Deleted Added
full compact
brgphy.c (215302) brgphy.c (215353)
1/*-
2 * Copyright (c) 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. 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

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000
3 * Bill Paul <wpaul@ee.columbia.edu>. 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

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

26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/dev/mii/brgphy.c 215302 2010-11-14 15:15:22Z marius $");
34__FBSDID("$FreeBSD: head/sys/dev/mii/brgphy.c 215353 2010-11-15 23:13:25Z jkim $");
35
36/*
37 * Driver for the Broadcom BCM54xx/57xx 1000baseTX PHY.
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

149
150#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21"
151#define HS21_BCM_CHIPID 0x57081021
152
153static int
154detect_hs21(struct bce_softc *bce_sc)
155{
156 char *sysenv;
35
36/*
37 * Driver for the Broadcom BCM54xx/57xx 1000baseTX PHY.
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

149
150#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21"
151#define HS21_BCM_CHIPID 0x57081021
152
153static int
154detect_hs21(struct bce_softc *bce_sc)
155{
156 char *sysenv;
157 int found;
157
158
158 if (bce_sc->bce_chipid != HS21_BCM_CHIPID)
159 return (0);
160 sysenv = getenv("smbios.system.product");
161 if (sysenv == NULL)
162 return (0);
163 if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0)
164 return (0);
165 return (1);
159 found = 0;
160 if (bce_sc->bce_chipid == HS21_BCM_CHIPID) {
161 sysenv = getenv("smbios.system.product");
162 if (sysenv != NULL) {
163 if (strcmp(sysenv, HS21_PRODUCT_ID) == 0)
164 found = 1;
165 freeenv(sysenv);
166 }
167 }
168 return (found);
166}
167
168/* Search for our PHY in the list of known PHYs */
169static int
170brgphy_probe(device_t dev)
171{
172
173 return (mii_phy_dev_probe(dev, brgphys, BUS_PROBE_DEFAULT));

--- 911 unchanged lines hidden ---
169}
170
171/* Search for our PHY in the list of known PHYs */
172static int
173brgphy_probe(device_t dev)
174{
175
176 return (mii_phy_dev_probe(dev, brgphys, BUS_PROBE_DEFAULT));

--- 911 unchanged lines hidden ---