Deleted Added
full compact
oce_hw.c (232470) oce_hw.c (247880)
1/*-
2 * Copyright (C) 2012 Emulex
3 * 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 are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
1/*-
2 * Copyright (C) 2012 Emulex
3 * 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 are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,

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

31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
39/* $FreeBSD: head/sys/dev/oce/oce_hw.c 232470 2012-03-03 18:03:50Z jhb $ */
39/* $FreeBSD: head/sys/dev/oce/oce_hw.c 247880 2013-03-06 09:53:38Z delphij $ */
40
41#include "oce_if.h"
42
43static int oce_POST(POCE_SOFTC sc);
44
45/**
46 * @brief Function to post status
47 * @param sc software handle to the device

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

400 0, &sc->macaddr.mac_addr[0], &sc->if_id);
401 if (rc)
402 return rc;
403
404 atomic_inc_32(&sc->nifs);
405
406 sc->if_cap_flags = capab_en_flags;
407
40
41#include "oce_if.h"
42
43static int oce_POST(POCE_SOFTC sc);
44
45/**
46 * @brief Function to post status
47 * @param sc software handle to the device

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

400 0, &sc->macaddr.mac_addr[0], &sc->if_id);
401 if (rc)
402 return rc;
403
404 atomic_inc_32(&sc->nifs);
405
406 sc->if_cap_flags = capab_en_flags;
407
408 /* Enable VLAN Promisc on HW */
409 rc = oce_config_vlan(sc, (uint8_t) sc->if_id, NULL, 0, 1, 1);
410 if (rc)
411 goto error;
412
413 /* set default flow control */
414 rc = oce_set_flow_control(sc, sc->flow_control);
415 if (rc)
416 goto error;
417
418 rc = oce_rxf_set_promiscuous(sc, sc->promisc);
419 if (rc)
420 goto error;

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

472 struct link_status link = { 0 };
473 int rc = 0;
474
475 rc = oce_get_link_status(sc, &link);
476 if (rc)
477 return 1;
478
479 if (link.logical_link_status == NTWK_LOGICAL_LINK_UP) {
408 /* set default flow control */
409 rc = oce_set_flow_control(sc, sc->flow_control);
410 if (rc)
411 goto error;
412
413 rc = oce_rxf_set_promiscuous(sc, sc->promisc);
414 if (rc)
415 goto error;

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

467 struct link_status link = { 0 };
468 int rc = 0;
469
470 rc = oce_get_link_status(sc, &link);
471 if (rc)
472 return 1;
473
474 if (link.logical_link_status == NTWK_LOGICAL_LINK_UP) {
480 sc->ifp->if_drv_flags |= IFF_DRV_RUNNING;
481 sc->link_status = NTWK_LOGICAL_LINK_UP;
482 if_link_state_change(sc->ifp, LINK_STATE_UP);
483 } else {
475 sc->link_status = NTWK_LOGICAL_LINK_UP;
476 if_link_state_change(sc->ifp, LINK_STATE_UP);
477 } else {
484 sc->ifp->if_drv_flags &=
485 ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
486 sc->link_status = NTWK_LOGICAL_LINK_DOWN;
487 if_link_state_change(sc->ifp, LINK_STATE_DOWN);
488 }
489
490 if (link.mac_speed > 0 && link.mac_speed < 5)
491 sc->link_speed = link.mac_speed;
492 else
493 sc->link_speed = 0;

--- 102 unchanged lines hidden ---
478 sc->link_status = NTWK_LOGICAL_LINK_DOWN;
479 if_link_state_change(sc->ifp, LINK_STATE_DOWN);
480 }
481
482 if (link.mac_speed > 0 && link.mac_speed < 5)
483 sc->link_speed = link.mac_speed;
484 else
485 sc->link_speed = 0;

--- 102 unchanged lines hidden ---