@@ -448,18 +448,14 @@ static device_method_t tegra_sdhci_methods[] = {
DEVMETHOD(sdhci_write_4, tegra_sdhci_write_4),
DEVMETHOD(sdhci_write_multi_4, tegra_sdhci_write_multi_4),

{ 0, 0 }
DEVMETHOD_END
};

static devclass_t tegra_sdhci_devclass;

static driver_t tegra_sdhci_driver = {
"sdhci_tegra",
tegra_sdhci_methods,
sizeof(struct tegra_sdhci_softc),
};

static DEFINE_CLASS_0(sdhci, tegra_sdhci_driver, tegra_sdhci_methods,
sizeof(struct tegra_sdhci_softc));
DRIVER_MODULE(sdhci_tegra, simplebus, tegra_sdhci_driver, tegra_sdhci_devclass,
0, 0);
NULL, NULL);
MODULE_DEPEND(sdhci_tegra, sdhci, 1, 1, 1);
DRIVER_MODULE(mmc, sdhci_tegra, mmc_driver, mmc_devclass, NULL, NULL);
DRIVER_MODULE(mmc, sdhci, mmc_driver, mmc_devclass, NULL, NULL);
MODULE_DEPEND(sdhci_tegra, mmc, 1, 1, 1);
@@ -690,7 +690,7 @@ static device_method_t tegra_soctherm_methods[] = {
};

static devclass_t tegra_soctherm_devclass;
DEFINE_CLASS_0(tegra_soctherm, tegra_soctherm_driver, tegra_soctherm_methods,
static DEFINE_CLASS_0(soctherm, tegra_soctherm_driver, tegra_soctherm_methods,
sizeof(struct soctherm_softc));
EARLY_DRIVER_MODULE(tegra_soctherm, simplebus, tegra_soctherm_driver,
tegra_soctherm_devclass, 0, 0, 79);
tegra_soctherm_devclass, NULL, NULL, 79);
@@ -827,13 +827,8 @@ static device_method_t tegra_usbphy_methods[] = {
DEVMETHOD_END
};

static driver_t tegra_usbphy_driver = {
"tegra_usbphy",
tegra_usbphy_methods,
sizeof(struct usbphy_softc),
};

static devclass_t tegra_usbphy_devclass;

static DEFINE_CLASS_0(usbphy, tegra_usbphy_driver, tegra_usbphy_methods,
sizeof(struct usbphy_softc));
EARLY_DRIVER_MODULE(tegra_usbphy, simplebus, tegra_usbphy_driver,
tegra_usbphy_devclass, 0, 0, 79);
tegra_usbphy_devclass, NULL, NULL, 79);
@@ -233,11 +233,16 @@ pci_resource_len(struct pci_dev *pdev, int bar)
static inline int
pci_resource_type(struct pci_dev *pdev, int bar)
{
struct resource_list_entry *rle;
struct pci_map *pm;

if ((rle = _pci_get_bar(pdev, bar)) == NULL)
pm = pci_find_bar(pdev->dev.bsddev, PCIR_BAR(bar));
if (!pm)
return (-1);
return (rle->type);

if (PCI_BAR_IO(pm->pm_value))
return (SYS_RES_IOPORT);
else
return (SYS_RES_MEMORY);
}

/*
@@ -4043,131 +4043,90 @@ ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \
ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \
compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/"

ofed/drivers/infiniband/hw/mlx4/alias_GUID.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mcg.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/sysfs.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/cm.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/ah.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/cq.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/doorbell.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mad.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/main.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mlx4_exp.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/mr.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/qp.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/srq.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
ofed/drivers/infiniband/hw/mlx4/wc.c optional mlx4ib \
no-depend obj-prefix "mlx4ib_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/infiniband/hw/mlx4/"
dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_exp.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"
dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \
compile-with "${OFED_C}"

ofed/drivers/net/mlx4/alloc.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/catas.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/cmd.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/cq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/eq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/fw.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/icm.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/intf.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/main.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/mcg.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/ -Wno-unused"
ofed/drivers/net/mlx4/mr.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/pd.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/port.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/profile.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/qp.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/reset.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/sense.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/srq.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/resource_tracker.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/sys_tune.c optional mlx4ib | mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \
compile-with "${OFED_C}"
dev/mlx4/mlx4_core/mlx4_sys_tune.c optional mlx4 pci \
compile-with "${OFED_C}"

ofed/drivers/net/mlx4/en_cq.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_main.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_netdev.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_port.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_resources.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_rx.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
ofed/drivers/net/mlx4/en_tx.c optional mlxen \
no-depend obj-prefix "mlx4_" \
compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/"
dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"
dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \
compile-with "${OFED_C}"

dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \
compile-with "${OFED_C}"
@@ -457,19 +457,10 @@ static devclass_t psm_devclass;

/* Tunables */
static int tap_enabled = -1;
TUNABLE_INT("hw.psm.tap_enabled", &tap_enabled);

static int verbose = PSM_DEBUG;
static int synaptics_support = 0;
TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support);

static int trackpoint_support = 0;
TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support);

static int elantech_support = 0;
TUNABLE_INT("hw.psm.elantech_support", &elantech_support);

static int verbose = PSM_DEBUG;
TUNABLE_INT("debug.psm.loglevel", &verbose);

/* for backward compatibility */
#define OLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t)
@@ -2460,7 +2451,7 @@ psmtimeout(void *arg)
static SYSCTL_NODE(_debug, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse");
static SYSCTL_NODE(_hw, OID_AUTO, psm, CTLFLAG_RD, 0, "ps/2 mouse");

SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RW, &verbose, 0,
SYSCTL_INT(_debug_psm, OID_AUTO, loglevel, CTLFLAG_RWTUN, &verbose, 0,
"Verbosity level");

static int psmhz = 20;
@@ -2482,7 +2473,7 @@ static int pkterrthresh = 2;
SYSCTL_INT(_debug_psm, OID_AUTO, pkterrthresh, CTLFLAG_RW, &pkterrthresh, 0,
"Number of error packets allowed before reinitializing the mouse");

SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RW, &tap_enabled, 0,
SYSCTL_INT(_hw_psm, OID_AUTO, tap_enabled, CTLFLAG_RWTUN, &tap_enabled, 0,
"Enable tap and drag gestures");
static int tap_threshold = PSM_TAP_THRESHOLD;
SYSCTL_INT(_hw_psm, OID_AUTO, tap_threshold, CTLFLAG_RW, &tap_threshold, 0,
@@ -2491,6 +2482,16 @@ static int tap_timeout = PSM_TAP_TIMEOUT;
SYSCTL_INT(_hw_psm, OID_AUTO, tap_timeout, CTLFLAG_RW, &tap_timeout, 0,
"Tap timeout for touchpads");

/* Tunables */
SYSCTL_INT(_hw_psm, OID_AUTO, synaptics_support, CTLFLAG_RDTUN,
&synaptics_support, 0, "Enable support for Synaptics touchpads");

SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLFLAG_RDTUN,
&trackpoint_support, 0, "Enable support for IBM/Lenovo TrackPoint");

SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN,
&elantech_support, 0, "Enable support for Elantech touchpads");

static void
psmintr(void *arg)
{
@@ -265,6 +265,15 @@ simplebus_add_device(device_t dev, phandle_t node, u_int order,

if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL)
return (NULL);

/*
* If the order is unspecified, use the cell-index field, if available.
* The cell-index property is not part of any standard, but is widely
* used in NXP/Freescale and Marvell device trees.
*/
if (order == -1)
OF_getencprop(node, "cell-index", &order, sizeof(order));

cdev = device_add_child_ordered(dev, order, name, unit);
if (cdev == NULL) {
device_printf(dev, "<%s>: device_add_child failed\n",
@@ -252,6 +252,7 @@ struct hn_softc {
#define HN_FLAG_CHIM_CONNECTED 0x0002
#define HN_FLAG_HAS_RSSKEY 0x0004
#define HN_FLAG_HAS_RSSIND 0x0008
#define HN_FLAG_SYNTH_ATTACHED 0x0010

#define HN_CAP_VLAN 0x0001
#define HN_CAP_MTU 0x0002
@@ -352,6 +352,7 @@ static void hn_resume(struct hn_softc *);
static void hn_rx_drain(struct vmbus_channel *);
static void hn_tx_resume(struct hn_softc *, int);
static void hn_tx_ring_qflush(struct hn_tx_ring *);
static int netvsc_detach(device_t dev);

static void hn_nvs_handle_notify(struct hn_softc *sc,
const struct vmbus_chanpkt_hdr *pkt);
@@ -405,6 +406,9 @@ hn_rss_reconfig(struct hn_softc *sc)

HN_LOCK_ASSERT(sc);

if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0)
return (ENXIO);

/*
* Disable RSS first.
*
@@ -736,27 +740,28 @@ netvsc_attach(device_t dev)

return (0);
failed:
/* TODO: reuse netvsc_detach() */
hn_destroy_tx_data(sc);
if (ifp != NULL)
if_free(ifp);
if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED)
hn_synth_detach(sc);
netvsc_detach(dev);
return (error);
}

/*
* TODO: Use this for error handling on attach path.
*/
static int
netvsc_detach(device_t dev)
{
struct hn_softc *sc = device_get_softc(dev);
struct ifnet *ifp = sc->hn_ifp;

/* TODO: ether_ifdetach */

HN_LOCK(sc);
/* TODO: hn_stop */
hn_synth_detach(sc);
HN_UNLOCK(sc);
if (device_is_attached(dev)) {
HN_LOCK(sc);
if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) {
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
hn_stop(sc);
hn_synth_detach(sc);
}
HN_UNLOCK(sc);
ether_ifdetach(ifp);
}

ifmedia_removeall(&sc->hn_media);
hn_destroy_rx_data(sc);
@@ -765,10 +770,12 @@ netvsc_detach(device_t dev)
if (sc->hn_tx_taskq != hn_tx_taskq)
taskqueue_free(sc->hn_tx_taskq);

vmbus_xact_ctx_destroy(sc->hn_xact);
HN_LOCK_DESTROY(sc);
if (sc->hn_xact != NULL)
vmbus_xact_ctx_destroy(sc->hn_xact);

if_free(ifp);

/* TODO: if_free */
HN_LOCK_DESTROY(sc);
return (0);
}

@@ -1618,6 +1625,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)

HN_LOCK(sc);

if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) {
HN_UNLOCK(sc);
break;
}

if ((sc->hn_caps & HN_CAP_MTU) == 0) {
/* Can't change MTU */
HN_UNLOCK(sc);
@@ -1671,6 +1683,11 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCSIFFLAGS:
HN_LOCK(sc);

if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) {
HN_UNLOCK(sc);
break;
}

if (ifp->if_flags & IFF_UP) {
/*
* If only the state of the PROMISC flag changed,
@@ -1782,6 +1799,9 @@ hn_stop(struct hn_softc *sc)

HN_LOCK_ASSERT(sc);

KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED,
("synthetic parts were not attached"));

/* Clear RUNNING bit _before_ hn_suspend() */
atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING);
hn_suspend(sc);
@@ -1858,6 +1878,9 @@ hn_init_locked(struct hn_softc *sc)

HN_LOCK_ASSERT(sc);

if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0)
return;

if (ifp->if_drv_flags & IFF_DRV_RUNNING)
return;

@@ -3377,6 +3400,9 @@ hn_synth_attach(struct hn_softc *sc, int mtu)
int error, nsubch, nchan, i;
uint32_t old_caps;

KASSERT((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0,
("synthetic parts were attached"));

/* Save capabilities for later verification. */
old_caps = sc->hn_caps;
sc->hn_caps = 0;
@@ -3489,6 +3515,8 @@ hn_synth_attach(struct hn_softc *sc, int mtu)
error = hn_attach_subchans(sc);
if (error)
return (error);

sc->hn_flags |= HN_FLAG_SYNTH_ATTACHED;
return (0);
}

@@ -3502,6 +3530,9 @@ hn_synth_detach(struct hn_softc *sc)
{
HN_LOCK_ASSERT(sc);

KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED,
("synthetic parts were not attached"));

/* Detach the RNDIS first. */
hn_rndis_detach(sc);

@@ -3510,6 +3541,8 @@ hn_synth_detach(struct hn_softc *sc)

/* Detach all of the channels. */
hn_detach_allchans(sc);

sc->hn_flags &= ~HN_FLAG_SYNTH_ATTACHED;
}

static void
@@ -155,6 +155,15 @@ hv_rf_receive_indicate_status(struct hn_softc *sc, const void *data, int dlen)
netvsc_linkstatus_callback(sc, 0);
break;

case RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG:
/* Not really useful; ignore. */
break;

case RNDIS_STATUS_NETWORK_CHANGE:
/* TODO */
if_printf(sc->hn_ifp, "network changed\n");
break;

default:
/* TODO: */
if_printf(sc->hn_ifp, "unknown RNDIS status 0x%08x\n",
File renamed without changes.
@@ -35,8 +35,8 @@

#include <linux/types.h>

#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>

struct mlx4_cqe {
__be32 vlan_my_qpn;
File renamed without changes.
File renamed without changes.
@@ -33,7 +33,7 @@
#ifndef MLX4_DRIVER_H
#define MLX4_DRIVER_H

#include <linux/mlx4/device.h>
#include <dev/mlx4/device.h>

struct mlx4_dev;

File renamed without changes.
File renamed without changes.
@@ -44,10 +44,10 @@
#include <linux/semaphore.h>
#include <linux/workqueue.h>
#include <linux/device.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/doorbell.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/doorbell.h>
#include <dev/mlx4/cmd.h>

#define DRV_NAME "mlx4_core"
#define PFX DRV_NAME ": "
File renamed without changes.
File renamed without changes.
@@ -38,8 +38,8 @@
#include <linux/pci.h>
#include <linux/errno.h>

#include <linux/mlx4/cmd.h>
#include <linux/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <linux/semaphore.h>
#include <rdma/ib_smi.h>

@@ -36,8 +36,8 @@

#include <linux/hardirq.h>
#include <linux/module.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/cq.h>

#include "mlx4.h"
#include "icm.h"
@@ -37,7 +37,7 @@
#include <linux/mm.h>
#include <linux/dma-mapping.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>

#include "mlx4.h"
#include "fw.h"
@@ -35,7 +35,7 @@
#define LINUXKPI_PARAM_PREFIX mlx4_

#include <linux/etherdevice.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/cache.h>

@@ -37,7 +37,7 @@
#include <linux/slab.h>
#include <linux/math64.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>

#include "mlx4.h"
#include "icm.h"
File renamed without changes.
@@ -47,13 +47,13 @@
#include <linux/string.h>
#include <linux/fs.h>

#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>

#include "mlx4.h"
#include "fw.h"
#include "icm.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>

/* Mellanox ConnectX HCA low-level driver */

@@ -34,7 +34,7 @@
#include <linux/string.h>
#include <linux/etherdevice.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/printk.h>

@@ -39,7 +39,7 @@
#include <linux/kernel.h>
#include <linux/vmalloc.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>

#include <linux/math64.h>

File renamed without changes.
@@ -37,10 +37,10 @@
#include <linux/module.h>
#include <linux/err.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/moduleparam.h>
#include "mlx4.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>


int mlx4_set_4k_mtu = -1;
File renamed without changes.
@@ -37,8 +37,8 @@
#include <linux/gfp.h>
#include <linux/module.h>

#include <linux/mlx4/cmd.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/qp.h>

#include "mlx4.h"
#include "icm.h"
File renamed without changes.
@@ -39,8 +39,8 @@
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/qp.h>
#include <linux/if_ether.h>
#include <linux/etherdevice.h>

@@ -34,7 +34,7 @@
#include <linux/errno.h>
#include <linux/if_ether.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>

#include "mlx4.h"

@@ -31,8 +31,8 @@
* SOFTWARE.
*/

#include <linux/mlx4/cmd.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/srq.h>
#include <linux/module.h>
#include <linux/gfp.h>

File renamed without changes.
@@ -46,17 +46,17 @@
#include <linux/dcbnl.h>
#endif

#include <linux/mlx4/device.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/cq.h>
#include <linux/mlx4/srq.h>
#include <linux/mlx4/doorbell.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/srq.h>
#include <dev/mlx4/doorbell.h>
#include <dev/mlx4/cmd.h>

#include <netinet/tcp_lro.h>

#include "en_port.h"
#include "mlx4_stats.h"
#include <dev/mlx4/stats.h>

#define DRV_NAME "mlx4_en"

File renamed without changes.
@@ -31,11 +31,11 @@
*
*/

#include <linux/mlx4/cq.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/cmd.h>

#include "mlx4_en.h"
#include "en.h"


static void mlx4_en_cq_event(struct mlx4_cq *cq, enum mlx4_event event)
@@ -38,11 +38,11 @@
#include <linux/netdevice.h>
#include <linux/slab.h>

#include <linux/mlx4/driver.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>

#include "mlx4_en.h"
#include "en.h"

/* Mellanox ConnectX HCA Ethernet driver */

@@ -330,14 +330,14 @@ module_init(mlx4_en_init);
module_exit(mlx4_en_cleanup);

static int
mlxen_evhand(module_t mod, int event, void *arg)
mlx4en_evhand(module_t mod, int event, void *arg)
{
return (0);
}
static moduledata_t mlxen_mod = {
.name = "mlxen",
.evhand = mlxen_evhand,
static moduledata_t mlx4en_mod = {
.name = "mlx4en",
.evhand = mlx4en_evhand,
};
DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY);
MODULE_DEPEND(mlxen, mlx4, 1, 1, 1);
MODULE_DEPEND(mlxen, linuxkpi, 1, 1, 1);
DECLARE_MODULE(mlx4en, mlx4en_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY);
MODULE_DEPEND(mlx4en, mlx4, 1, 1, 1);
MODULE_DEPEND(mlx4en, linuxkpi, 1, 1, 1);
@@ -41,15 +41,15 @@
#include <linux/list.h>
#include <linux/if_ether.h>

#include <linux/mlx4/driver.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>
#include <dev/mlx4/cq.h>

#include <sys/sockio.h>
#include <sys/sysctl.h>

#include "mlx4_en.h"
#include "en.h"
#include "en_port.h"

static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv);
@@ -34,11 +34,11 @@
#include <sys/types.h>
#include <linux/if_vlan.h>

#include <linux/mlx4/device.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/cmd.h>

#include "en_port.h"
#include "mlx4_en.h"
#include "en.h"
#define EN_IFQ_MIN_INTERVAL 3000


@@ -33,9 +33,9 @@

#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>

#include "mlx4_en.h"
#include "en.h"


void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
@@ -31,18 +31,18 @@
*
*/
#include "opt_inet.h"
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cq.h>
#include <linux/slab.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
#include <linux/mlx4/driver.h>
#include <dev/mlx4/driver.h>
#ifdef CONFIG_NET_RX_BUSY_POLL
#include <net/busy_poll.h>
#endif

#include "mlx4_en.h"
#include "en.h"


static void mlx4_en_init_rx_desc(struct mlx4_en_priv *priv,
@@ -34,9 +34,9 @@
#define LINUXKPI_PARAM_PREFIX mlx4_

#include <linux/page.h>
#include <linux/mlx4/cq.h>
#include <dev/mlx4/cq.h>
#include <linux/slab.h>
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
#include <linux/moduleparam.h>
@@ -50,7 +50,7 @@
#include <netinet/tcp_lro.h>
#include <netinet/udp.h>

#include "mlx4_en.h"
#include "en.h"

enum {
MAX_INLINE = 104, /* 128 - 16 - 4 - 4 */
File renamed without changes.
@@ -46,8 +46,8 @@
#include <rdma/ib_mad.h>
#include <rdma/ib_sa.h>

#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
#include <dev/mlx4/device.h>
#include <dev/mlx4/doorbell.h>

#define MLX4_IB_DRV_NAME "mlx4_ib"

File renamed without changes.
@@ -37,7 +37,7 @@
#include <rdma/ib_cache.h>
#include <rdma/ib_sa.h>
#include <rdma/ib_pack.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <rdma/ib_user_verbs.h>
@@ -32,7 +32,7 @@

#include <rdma/ib_mad.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/idr.h>
#include <rdma/ib_cm.h>
@@ -31,9 +31,9 @@
* SOFTWARE.
*/

#include <linux/mlx4/cq.h>
#include <linux/mlx4/qp.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/cq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/srq.h>
#include <linux/slab.h>

#include "mlx4_ib.h"
File renamed without changes.
@@ -33,7 +33,7 @@

#include "mlx4_ib.h"
#include "mlx4_exp.h"
#include <linux/mlx4/qp.h>
#include <dev/mlx4/qp.h>

int mlx4_ib_exp_query_device(struct ib_device *ibdev,
struct ib_exp_device_attr *props)
@@ -36,7 +36,7 @@
#include <rdma/ib_cache.h>

#include <linux/random.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/gfp.h>
#include <rdma/ib_pma.h>

@@ -47,8 +47,8 @@
#include <rdma/ib_user_verbs_exp.h>
#include <rdma/ib_addr.h>

#include <linux/mlx4/driver.h>
#include <linux/mlx4/cmd.h>
#include <dev/mlx4/driver.h>
#include <dev/mlx4/cmd.h>
#include <linux/sched.h>
#include <linux/page.h>
#include <linux/printk.h>
@@ -35,7 +35,7 @@
#include <rdma/ib_cache.h>
#include <rdma/ib_sa.h>

#include <linux/mlx4/cmd.h>
#include <dev/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/delay.h>

File renamed without changes.
@@ -41,8 +41,8 @@
#include <rdma/ib_addr.h>
#include <rdma/ib_mad.h>

#include <linux/mlx4/qp.h>
#include <linux/mlx4/driver.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/driver.h>
#include <linux/io.h>

#include "mlx4_ib.h"
@@ -31,8 +31,8 @@
* SOFTWARE.
*/

#include <linux/mlx4/qp.h>
#include <linux/mlx4/srq.h>
#include <dev/mlx4/qp.h>
#include <dev/mlx4/srq.h>
#include <linux/slab.h>

#include "mlx4_ib.h"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -35,7 +35,7 @@

#include <linux/types.h>

#include <linux/mlx4/device.h>
#include <dev/mlx4/device.h>

#define MLX4_INVALID_LKEY 0x100

File renamed without changes.
File renamed without changes.
@@ -522,6 +522,7 @@ static const STRUCT_USB_HOST_ID u3g_devs[] = {
U3G_DEV(SIERRA, MC5728, 0),
U3G_DEV(SIERRA, MC7354, 0),
U3G_DEV(SIERRA, MC7355, 0),
U3G_DEV(SIERRA, MC7430, 0),
U3G_DEV(SIERRA, MC8700, 0),
U3G_DEV(SIERRA, MC8755, 0),
U3G_DEV(SIERRA, MC8755_2, 0),
@@ -631,7 +632,7 @@ u3g_sael_m460_init(struct usb_device *udev)
static const uint8_t setup[][24] = {
{ 0x41, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x41, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
{ 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0xc1, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02 },
@@ -643,7 +644,7 @@ u3g_sael_m460_init(struct usb_device *udev)
{ 0x41, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00 },
{ 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x11, 0x13 },
{ 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
{ 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 },
{ 0x41, 0x12, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 },
@@ -653,7 +654,7 @@ u3g_sael_m460_init(struct usb_device *udev)
{ 0x41, 0x19, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x11, 0x13 },
{ 0x41, 0x13, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00 },
{ 0x41, 0x07, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 },
};
@@ -687,7 +688,7 @@ u3g_sael_m460_init(struct usb_device *udev)
DPRINTFN(0, "too small buffer\n");
continue;
}
err = usbd_do_request(udev, NULL, &req,
err = usbd_do_request(udev, NULL, &req,
__DECONST(uint8_t *, &setup[n][8]));
}
if (err) {
@@ -863,7 +864,7 @@ u3g_attach(device_t dev)
}

/* copy in USB config */
for (n = 0; n != U3G_N_TRANSFER; n++)
for (n = 0; n != U3G_N_TRANSFER; n++)
u3g_config_tmp[n] = u3g_config[n];

device_set_usb_desc(dev);
@@ -4101,6 +4101,7 @@ product SIERRA E6893 0x6893 E6893
product SIERRA MC8700 0x68A3 MC8700
product SIERRA MC7354 0x68C0 MC7354
product SIERRA MC7355 0x9041 MC7355
product SIERRA MC7430 0x9071 Sierra Wireless MC7430 Qualcomm Snapdragon X7 LTE-A
product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U
product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer

@@ -592,7 +592,7 @@ hint.mse.0.irq="5"
# 802.11 network adapters
# Requires the iwn firmware module
# mlx4ib: Mellanox ConnectX HCA InfiniBand
# mlxen: Mellanox ConnectX HCA Ethernet
# mlx4en: Mellanox ConnectX HCA Ethernet
# mthca: Mellanox HCA InfiniBand
# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source)
# sbni: Granch SBNI12-xx ISA and PCI adapters
@@ -631,8 +631,9 @@ hint.le.0.at="isa"
hint.le.0.port="0x280"
hint.le.0.irq="10"
hint.le.0.drq="0"
device mlx4 # Shared code module between IB and Ethernet
device mlx4ib # Mellanox ConnectX HCA InfiniBand
device mlxen # Mellanox ConnectX HCA Ethernet
device mlx4en # Mellanox ConnectX HCA Ethernet
device mthca # Mellanox HCA InfiniBand
device nfe # nVidia nForce MCP on-board Ethernet
device sbni
@@ -230,7 +230,7 @@ SUBDIR= \
mlx \
${_mlx4} \
${_mlx4ib} \
${_mlxen} \
${_mlx4en} \
${_mlx5} \
${_mlx5en} \
${_mly} \
@@ -625,16 +625,16 @@ _iwifw= iwifw
_iwmfw= iwmfw
_iwnfw= iwnfw
.endif
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4= mlx4
_mlx4ib= mlx4ib
_mlxen= mlxen
.endif
_mlx5= mlx5
.if (${MK_INET_SUPPORT} != "no" && ${MK_INET6_SUPPORT} != "no") || \
defined(ALL_MODULES)
_mlx4en= mlx4en
_mlx5en= mlx5en
.endif
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4ib= mlx4ib
.endif
_mly= mly
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mthca= mthca
@@ -11,6 +11,7 @@ SRCS= hyperv.c \
vmbus_br.c \
vmbus_chan.c \
vmbus_et.c \
vmbus_if.c \
vmbus_xact.c
SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h vmbus_if.h

@@ -1,20 +1,35 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_core

KMOD= mlx4
SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \
opt_inet.h opt_inet6.h \
alloc.c catas.c cmd.c cq.c eq.c \
fw.c icm.c intf.c main.c mcg.c mr.c \
pd.c port.c profile.c qp.c reset.c sense.c \
srq.c resource_tracker.c sys_tune.c
mlx4_alloc.c \
mlx4_catas.c \
mlx4_cmd.c \
mlx4_cq.c \
mlx4_eq.c \
mlx4_fw.c \
mlx4_icm.c \
mlx4_intf.c \
mlx4_main.c \
mlx4_mcg.c \
mlx4_mr.c \
mlx4_pd.c \
mlx4_port.c \
mlx4_profile.c \
mlx4_qp.c \
mlx4_reset.c \
mlx4_sense.c \
mlx4_srq.c \
mlx4_resource_tracker.c \
mlx4_sys_tune.c

CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include

.include <bsd.kmod.mk>

CFLAGS+= -Wno-cast-qual -Wno-pointer-arith

CWARNFLAGS.mcg.c= -Wno-unused
CWARNFLAGS.mlx4_mcg.c= -Wno-unused
@@ -0,0 +1,18 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_en

KMOD= mlx4en
SRCS= device_if.h bus_if.h pci_if.h vnode_if.h \
opt_inet.h opt_inet6.h \
mlx4_en_cq.c \
mlx4_en_main.c \
mlx4_en_netdev.c \
mlx4_en_port.c \
mlx4_en_resources.c \
mlx4_en_rx.c \
mlx4_en_tx.c

CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include

.include <bsd.kmod.mk>
@@ -1,14 +1,24 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
.PATH: ${.CURDIR}/../../dev/mlx4/mlx4_ib

KMOD= mlx4ib
SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \
opt_inet.h opt_inet6.h \
alias_GUID.c mcg.c sysfs.c ah.c cq.c \
mlx4_exp.c \
doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c
mlx4_ib_alias_GUID.c \
mlx4_ib_mcg.c \
mlx4_ib_sysfs.c \
mlx4_ib_ah.c \
mlx4_ib_cq.c \
mlx4_ib_exp.c \
mlx4_ib_doorbell.c \
mlx4_ib_mad.c \
mlx4_ib_main.c \
mlx4_ib_mr.c \
mlx4_ib_qp.c \
mlx4_ib_srq.c \
mlx4_ib_wc.c \
mlx4_ib_cm.c

CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4
CFLAGS+= -I${.CURDIR}/../../ofed/include
CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include
CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM

This file was deleted.

@@ -31,6 +31,8 @@
#define RNDIS_STATUS_PENDING 0x00000103L
#define RNDIS_STATUS_MEDIA_CONNECT 0x4001000BL
#define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000CL
#define RNDIS_STATUS_NETWORK_CHANGE 0x40010018L
#define RNDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG 0x40020006L
#define RNDIS_STATUS_BUFFER_OVERFLOW 0x80000005L
#define RNDIS_STATUS_FAILURE 0xC0000001L
#define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BBL

This file was deleted.

This file was deleted.

@@ -411,6 +411,18 @@ ioapic_assign_cpu(struct intsrc *isrc, u_int apic_id)
u_int old_vector, new_vector;
u_int old_id;

/*
* On Hyper-V:
* - Stick to the first cpu for all I/O APIC pins.
* - And don't allow destination cpu changes.
*/
if (vm_guest == VM_GUEST_HV) {
if (intpin->io_vector)
return (EINVAL);
else
apic_id = 0;
}

/*
* keep 1st core as the destination for NMI
*/