Deleted Added
full compact
xmphy.c (215300) xmphy.c (217413)
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/xmphy.c 215300 2010-11-14 14:25:04Z marius $");
34__FBSDID("$FreeBSD: head/sys/dev/mii/xmphy.c 217413 2011-01-14 19:29:53Z marius $");
35
36/*
37 * driver for the XaQti XMAC II's internal PHY. This is sort of
38 * like a 10/100 PHY, except the only thing we're really autoselecting
39 * here is full/half duplex. Speed is always 1000mbps.
40 */
41
42#include <sys/param.h>

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

166 */
167 if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN)
168 return (0);
169#endif
170 (void)xmphy_mii_phy_auto(sc);
171 break;
172 case IFM_1000_SX:
173 mii_phy_reset(sc);
35
36/*
37 * driver for the XaQti XMAC II's internal PHY. This is sort of
38 * like a 10/100 PHY, except the only thing we're really autoselecting
39 * here is full/half duplex. Speed is always 1000mbps.
40 */
41
42#include <sys/param.h>

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

166 */
167 if (PHY_READ(sc, XMPHY_MII_BMCR) & XMPHY_BMCR_AUTOEN)
168 return (0);
169#endif
170 (void)xmphy_mii_phy_auto(sc);
171 break;
172 case IFM_1000_SX:
173 mii_phy_reset(sc);
174 if ((ife->ifm_media & IFM_GMASK) == IFM_FDX) {
174 if ((ife->ifm_media & IFM_FDX) != 0) {
175 PHY_WRITE(sc, XMPHY_MII_ANAR, XMPHY_ANAR_FDX);
176 PHY_WRITE(sc, XMPHY_MII_BMCR, XMPHY_BMCR_FDX);
177 } else {
178 PHY_WRITE(sc, XMPHY_MII_ANAR, XMPHY_ANAR_HDX);
179 PHY_WRITE(sc, XMPHY_MII_BMCR, 0);
180 }
181 break;
182 default:

--- 110 unchanged lines hidden ---
175 PHY_WRITE(sc, XMPHY_MII_ANAR, XMPHY_ANAR_FDX);
176 PHY_WRITE(sc, XMPHY_MII_BMCR, XMPHY_BMCR_FDX);
177 } else {
178 PHY_WRITE(sc, XMPHY_MII_ANAR, XMPHY_ANAR_HDX);
179 PHY_WRITE(sc, XMPHY_MII_BMCR, 0);
180 }
181 break;
182 default:

--- 110 unchanged lines hidden ---