svn commit: r211852 - in projects/ofed/head/sys/ofed/drivers:
infiniband/hw/mlx4 infiniband/hw/mthca net/mlx4
Jeff Roberson
jeff at FreeBSD.org
Thu Aug 26 22:07:27 UTC 2010
Author: jeff
Date: Thu Aug 26 22:07:27 2010
New Revision: 211852
URL: http://svn.freebsd.org/changeset/base/211852
Log:
- Re-enable mthca_reset() for pci-e devices. Warn on pci-x devices and
skip the reset. The cards seem to work fine without anyway.
- Disable debug output for all hardware drivers.
Sponsored by: Isilon Systems, iX Systems, and Panasas
Modified:
projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/main.c
projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h
projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
projects/ofed/head/sys/ofed/drivers/net/mlx4/main.c
projects/ofed/head/sys/ofed/drivers/net/mlx4/mlx4.h
Modified: projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/main.c
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Aug 26 22:07:27 2010 (r211852)
@@ -61,7 +61,7 @@ MODULE_VERSION(DRV_VERSION);
#ifdef CONFIG_MLX4_DEBUG
-int mlx4_ib_debug_level = 1;
+int mlx4_ib_debug_level = 0;
module_param_named(debug_level, mlx4_ib_debug_level, int, 0644);
MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
Modified: projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Aug 26 22:07:27 2010 (r211852)
@@ -44,8 +44,6 @@
#include <linux/mlx4/device.h>
#include <linux/mlx4/doorbell.h>
-#define CONFIG_MLX4_DEBUG
-
#define MLX4_IB_DRV_NAME "mlx4_ib"
Modified: projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_dev.h Thu Aug 26 22:07:27 2010 (r211852)
@@ -363,8 +363,6 @@ struct mthca_dev {
int active;
};
-#define CONFIG_INFINIBAND_MTHCA_DEBUG
-
#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
extern int mthca_debug_level;
Modified: projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Aug 26 22:07:27 2010 (r211852)
@@ -52,7 +52,7 @@ MODULE_VERSION(DRV_VERSION);
#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
-int mthca_debug_level = 1;
+int mthca_debug_level = 0;
module_param_named(debug_level, mthca_debug_level, int, 0644);
MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
Modified: projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Aug 26 22:07:27 2010 (r211852)
@@ -41,7 +41,6 @@
int mthca_reset(struct mthca_dev *mdev)
{
-#ifdef __linux__
int i;
int err = 0;
u32 *hca_header = NULL;
@@ -71,6 +70,7 @@ int mthca_reset(struct mthca_dev *mdev)
if (!(mdev->mthca_flags & MTHCA_FLAG_PCIE)) {
/* Look for the bridge -- its device ID will be 2 more
than HCA's device ID. */
+#ifdef __linux__
while ((bridge = pci_get_device(mdev->pdev->vendor,
mdev->pdev->device + 2,
bridge)) != NULL) {
@@ -91,7 +91,11 @@ int mthca_reset(struct mthca_dev *mdev)
mthca_warn(mdev, "No bridge found for %s\n",
pci_name(mdev->pdev));
}
+#else
+ mthca_warn(mdev, "Reset on PCI-X is not supported.\n");
+ goto out;
+#endif
}
/* For Arbel do we need to save off the full 4K PCI Express header?? */
@@ -117,6 +121,7 @@ int mthca_reset(struct mthca_dev *mdev)
hca_pcix_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
hca_pcie_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP);
+#ifdef __linux__
if (bridge) {
bridge_header = kmalloc(256, GFP_KERNEL);
if (!bridge_header) {
@@ -144,6 +149,7 @@ int mthca_reset(struct mthca_dev *mdev)
goto out;
}
}
+#endif
/* actually hit reset */
{
@@ -158,7 +164,11 @@ int mthca_reset(struct mthca_dev *mdev)
}
writel(MTHCA_RESET_VALUE, reset);
+#ifdef __linux__
iounmap(reset);
+#else
+ pmap_unmapdev((vm_offset_t)reset, 4);
+#endif
}
/* Docs say to wait one second before accessing device */
@@ -281,13 +291,12 @@ good:
}
out:
+#ifdef __linux__
if (bridge)
pci_dev_put(bridge);
+#endif
kfree(bridge_header);
kfree(hca_header);
return err;
-#else
- return 0;
-#endif
}
Modified: projects/ofed/head/sys/ofed/drivers/net/mlx4/main.c
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/net/mlx4/main.c Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/net/mlx4/main.c Thu Aug 26 22:07:27 2010 (r211852)
@@ -55,7 +55,7 @@ struct workqueue_struct *mlx4_wq;
#ifdef CONFIG_MLX4_DEBUG
-int mlx4_debug_level = 1;
+int mlx4_debug_level = 0;
module_param_named(debug_level, mlx4_debug_level, int, 0644);
MODULE_PARM_DESC(debug_level, "Enable debug tracing if > 0");
Modified: projects/ofed/head/sys/ofed/drivers/net/mlx4/mlx4.h
==============================================================================
--- projects/ofed/head/sys/ofed/drivers/net/mlx4/mlx4.h Thu Aug 26 21:42:45 2010 (r211851)
+++ projects/ofed/head/sys/ofed/drivers/net/mlx4/mlx4.h Thu Aug 26 22:07:27 2010 (r211852)
@@ -37,8 +37,6 @@
#ifndef MLX4_H
#define MLX4_H
-#define CONFIG_MLX4_DEBUG
-
#include <linux/mutex.h>
#include <linux/radix-tree.h>
#include <linux/timer.h>
More information about the svn-src-projects
mailing list