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 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 |
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) { |
475 sc->link_status = NTWK_LOGICAL_LINK_UP; 476 if_link_state_change(sc->ifp, LINK_STATE_UP); 477 } else { |
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 --- |