cxgbe.c revision 56b2bdd1f04d465cfe4a95b88ae5cba5884154e4
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* This file is part of the Chelsio T4 support code.
*
* Copyright (C) 2011-2013 Chelsio Communications. All rights reserved.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this
* release for licensing terms and conditions.
*/
#include <sys/ethernet.h>
#include <sys/mac_provider.h>
#include <sys/mac_ether.h>
/*
* NOTE: The "real" NIC driver is in the nexus. This is just a thin wrapper
* whose only purpose is to register the mac.
*/
#include "shared.h"
#include "version.h"
struct port_info_stub {
};
static struct cb_ops cxgbe_cb_ops = {
.cb_strategy = nodev,
};
struct dev_ops cxgbe_dev_ops = {
.devo_identify = nulldev,
.devo_probe = nulldev,
.devo_reset = nodev,
.devo_cb_ops = &cxgbe_cb_ops,
};
.drv_modops = &mod_driverops,
};
static struct modlinkage modlinkage = {
};
int
_init(void)
{
int rc;
if (rc != 0)
return (rc);
}
int
_fini(void)
{
int rc;
if (rc != 0)
return (rc);
return (0);
}
int
{
}
static int
{
struct port_info_stub *pi;
int rc;
if (cmd != DDI_ATTACH)
return (DDI_FAILURE);
return (DDI_FAILURE);
return (DDI_FAILURE);
}
if (rc != 0) {
return (DDI_FAILURE);
}
/*
* Link state from this point onwards to the time interface is plumbed,
* should be set to LINK_STATE_UNKNOWN. The mac should be updated about
* the link state as either LINK_STATE_UP or LINK_STATE_DOWN based on
* the actual link state detection after interface plumb.
*/
return (DDI_SUCCESS);
}
static int
{
struct port_info_stub *pi;
if (cmd != DDI_DETACH)
return (DDI_FAILURE);
return (DDI_FAILURE);
return (mac_unregister(mh));
}