cxgb_ael1002.c (170076) | cxgb_ael1002.c (170654) |
---|---|
1/************************************************************************** 2 3Copyright (c) 2007, Chelsio Inc. 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 --- 14 unchanged lines hidden (view full) --- 23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26POSSIBILITY OF SUCH DAMAGE. 27 28***************************************************************************/ 29 30#include <sys/cdefs.h> | 1/************************************************************************** 2 3Copyright (c) 2007, Chelsio Inc. 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 --- 14 unchanged lines hidden (view full) --- 23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26POSSIBILITY OF SUCH DAMAGE. 27 28***************************************************************************/ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_ael1002.c 170076 2007-05-28 22:57:27Z kmacy $"); | 31__FBSDID("$FreeBSD: head/sys/dev/cxgb/common/cxgb_ael1002.c 170654 2007-06-13 05:36:00Z kmacy $"); |
32 33#ifdef CONFIG_DEFINED 34#include <cxgb_include.h> 35#else 36#include <dev/cxgb/cxgb_include.h> 37#endif 38 39enum { --- 232 unchanged lines hidden (view full) --- 272 273static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, 274 int *speed, int *duplex, int *fc) 275{ 276 if (link_ok) { 277 unsigned int status; 278 279 status = t3_read_reg(phy->adapter, | 32 33#ifdef CONFIG_DEFINED 34#include <cxgb_include.h> 35#else 36#include <dev/cxgb/cxgb_include.h> 37#endif 38 39enum { --- 232 unchanged lines hidden (view full) --- 272 273static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, 274 int *speed, int *duplex, int *fc) 275{ 276 if (link_ok) { 277 unsigned int status; 278 279 status = t3_read_reg(phy->adapter, |
280 XGM_REG(A_XGM_SERDES_STAT0, phy->addr)); | 280 XGM_REG(A_XGM_SERDES_STAT0, phy->addr)) | 281 t3_read_reg(phy->adapter, 282 XGM_REG(A_XGM_SERDES_STAT1, phy->addr)) | 283 t3_read_reg(phy->adapter, 284 XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | 285 t3_read_reg(phy->adapter, 286 XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); |
281 *link_ok = !(status & F_LOWSIG0); 282 } 283 if (speed) 284 *speed = SPEED_10000; 285 if (duplex) 286 *duplex = DUPLEX_FULL; 287 return 0; 288} --- 29 unchanged lines hidden (view full) --- 318 .get_link_status = xaui_direct_get_link_status, 319 .power_down = xaui_direct_power_down, 320}; 321#endif 322 323void t3_xaui_direct_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, 324 const struct mdio_ops *mdio_ops) 325{ | 287 *link_ok = !(status & F_LOWSIG0); 288 } 289 if (speed) 290 *speed = SPEED_10000; 291 if (duplex) 292 *duplex = DUPLEX_FULL; 293 return 0; 294} --- 29 unchanged lines hidden (view full) --- 324 .get_link_status = xaui_direct_get_link_status, 325 .power_down = xaui_direct_power_down, 326}; 327#endif 328 329void t3_xaui_direct_phy_prep(struct cphy *phy, adapter_t *adapter, int phy_addr, 330 const struct mdio_ops *mdio_ops) 331{ |
326 cphy_init(phy, adapter, 1, &xaui_direct_ops, mdio_ops); | 332 cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops); |
327} | 333} |