ethernet-xaui.c revision 302408
1285169Scy/*************************************************************************
2132451SrobertoCopyright (c) 2003-2007  Cavium Networks (support@cavium.com). All rights
354359Srobertoreserved.
4285169Scy
5285169Scy
654359SrobertoRedistribution and use in source and binary forms, with or without
754359Srobertomodification, are permitted provided that the following conditions are
854359Srobertomet:
954359Sroberto
1054359Sroberto    * Redistributions of source code must retain the above copyright
1154359Sroberto      notice, this list of conditions and the following disclaimer.
1254359Sroberto
1354359Sroberto    * Redistributions in binary form must reproduce the above
1454359Sroberto      copyright notice, this list of conditions and the following
15106163Sroberto      disclaimer in the documentation and/or other materials provided
16106163Sroberto      with the distribution.
17280849Scy
1854359Sroberto    * Neither the name of Cavium Networks nor the names of
19285169Scy      its contributors may be used to endorse or promote products
20285169Scy      derived from this software without specific prior written
21285169Scy      permission.
22285169Scy
23285169ScyThis Software, including technical data, may be subject to U.S. export  control laws, including the U.S. Export Administration Act and its  associated regulations, and may be subject to export or import  regulations in other countries.
24285169Scy
25285169ScyTO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
26285169ScyAND WITH ALL FAULTS AND CAVIUM  NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
27285169Scy
28285169Scy*************************************************************************/
29285169Scy
30285169Scy#include <sys/cdefs.h>
31285169Scy__FBSDID("$FreeBSD: stable/11/sys/mips/cavium/octe/ethernet-xaui.c 257324 2013-10-29 11:17:49Z glebius $");
32285169Scy
33285169Scy#include <sys/param.h>
34285169Scy#include <sys/systm.h>
35285169Scy#include <sys/bus.h>
36285169Scy#include <sys/endian.h>
37285169Scy#include <sys/kernel.h>
38285169Scy#include <sys/mbuf.h>
39285169Scy#include <sys/socket.h>
40285169Scy
41285169Scy#include <net/ethernet.h>
42285169Scy#include <net/if.h>
43285169Scy#include <net/if_var.h>
44285169Scy
45285169Scy#include "wrapper-cvmx-includes.h"
46285169Scy#include "ethernet-headers.h"
47285169Scy
48285169Scyint cvm_oct_xaui_init(struct ifnet *ifp)
49285169Scy{
50285169Scy	cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc;
51285169Scy
52285169Scy	if (cvm_oct_common_init(ifp) != 0)
53285169Scy	    return ENXIO;
54285169Scy
55285169Scy	priv->open = cvm_oct_common_open;
56285169Scy	priv->stop = cvm_oct_common_stop;
57285169Scy	priv->stop(ifp);
58285169Scy
59285169Scy	return 0;
60285169Scy}
61285169Scy