rlphy.c (119418) | rlphy.c (119868) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.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) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.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/rlphy.c 119418 2003-08-24 17:55:58Z obrien $"); | 34__FBSDID("$FreeBSD: head/sys/dev/mii/rlphy.c 119868 2003-09-08 02:11:25Z wpaul $"); |
35 36/* 37 * driver for RealTek 8139 internal PHYs 38 */ 39 40#include <sys/cdefs.h> | 35 36/* 37 * driver for RealTek 8139 internal PHYs 38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/dev/mii/rlphy.c 119418 2003-08-24 17:55:58Z obrien $"); | 41__FBSDID("$FreeBSD: head/sys/dev/mii/rlphy.c 119868 2003-09-08 02:11:25Z wpaul $"); |
42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/kernel.h> 46#include <sys/socket.h> 47#include <sys/bus.h> 48 49#include <net/if.h> --- 55 unchanged lines hidden (view full) --- 105 * RealTek PHY doesn't have vendor/device ID registers: 106 * the rl driver fakes up a return value of all zeros. 107 */ 108 if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 || 109 MII_MODEL(ma->mii_id2) != 0) 110 return (ENXIO); 111 112 /* | 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/kernel.h> 46#include <sys/socket.h> 47#include <sys/bus.h> 48 49#include <net/if.h> --- 55 unchanged lines hidden (view full) --- 105 * RealTek PHY doesn't have vendor/device ID registers: 106 * the rl driver fakes up a return value of all zeros. 107 */ 108 if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 || 109 MII_MODEL(ma->mii_id2) != 0) 110 return (ENXIO); 111 112 /* |
113 * Make sure the parent is an `rl'. | 113 * Make sure the parent is an `rl' or an `re'. |
114 */ | 114 */ |
115 if (strcmp(device_get_name(parent), "rl") != 0) | 115 if (strcmp(device_get_name(parent), "rl") != 0 && 116 strcmp(device_get_name(parent), "re") != 0) |
116 return (ENXIO); 117 118 device_set_desc(dev, "RealTek internal media interface"); 119 120 return (0); 121} 122 123static int --- 228 unchanged lines hidden --- | 117 return (ENXIO); 118 119 device_set_desc(dev, "RealTek internal media interface"); 120 121 return (0); 122} 123 124static int --- 228 unchanged lines hidden --- |