Deleted Added
full compact
cxgb_aq100x.c (256281) cxgb_aq100x.c (277343)
1/**************************************************************************
2
3Copyright (c) 2009 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) 2009 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: stable/10/sys/dev/cxgb/common/cxgb_aq100x.c 228825 2011-12-23 01:39:10Z np $");
31__FBSDID("$FreeBSD: stable/10/sys/dev/cxgb/common/cxgb_aq100x.c 277343 2015-01-18 20:38:38Z np $");
32
33#include <cxgb_include.h>
34
35#undef msleep
36#define msleep t3_os_sleep
37
38enum {
39 /* MDIO_DEV_PMA_PMD registers */

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

345 BMCR_SPEED1000 | BMCR_SPEED100, set);
346 if (err)
347 return (err);
348
349 return (0);
350}
351
352static int
32
33#include <cxgb_include.h>
34
35#undef msleep
36#define msleep t3_os_sleep
37
38enum {
39 /* MDIO_DEV_PMA_PMD registers */

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

345 BMCR_SPEED1000 | BMCR_SPEED100, set);
346 if (err)
347 return (err);
348
349 return (0);
350}
351
352static int
353aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex,
353aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex,
354 int *fc)
355{
356 int err;
357 unsigned int v, link = 0;
358
359 err = mdio_read(phy, MDIO_DEV_PMA_PMD, AQ_LINK_STAT, &v);
360 if (err)
361 return (err);

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

435 }
436
437 if (duplex)
438 *duplex = DUPLEX_FULL;
439 }
440
441 link = 1;
442done:
354 int *fc)
355{
356 int err;
357 unsigned int v, link = 0;
358
359 err = mdio_read(phy, MDIO_DEV_PMA_PMD, AQ_LINK_STAT, &v);
360 if (err)
361 return (err);

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

435 }
436
437 if (duplex)
438 *duplex = DUPLEX_FULL;
439 }
440
441 link = 1;
442done:
443 if (link_ok)
444 *link_ok = link;
443 if (link_state)
444 *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN;
445 return (0);
446}
447
448static struct cphy_ops aq100x_ops = {
449 .reset = aq100x_reset,
450 .intr_enable = aq100x_intr_enable,
451 .intr_disable = aq100x_intr_disable,
452 .intr_clear = aq100x_intr_clear,

--- 90 unchanged lines hidden ---
445 return (0);
446}
447
448static struct cphy_ops aq100x_ops = {
449 .reset = aq100x_reset,
450 .intr_enable = aq100x_intr_enable,
451 .intr_disable = aq100x_intr_disable,
452 .intr_clear = aq100x_intr_clear,

--- 90 unchanged lines hidden ---