[openib-general] [mthca] debug strings

Bernhard Fischer berny.f at aon.at
Fri Jun 10 16:35:52 PDT 2005


On Fri, Jun 10, 2005 at 09:34:10PM +0200, Bernhard Fischer wrote:
>Hi,

>- remove duplicate ': ' and prefix messages from sdp with ib_sdp
>  like ib_mthca does.

hm. when loading mthca i see:
ib_mthca: Mellanox InfiniBand HCA driver v0.06-pre (November 8, 2004)
ib_mthca: Initializing Mellanox Technologies .....
ib_mthca 0000:04:00.0: FW version 000400060002, max commands 64
...

which is a bit inconsistent.

No functional obj-code changes.

- peruse DRV_NAME
- trim ':' from PFX to be consistent with dev_{info,warn,err} output.
- whitespace in struct mthca_profile: replace spaces with tabs to
  be consistent with other member of that struct wrt spacing style.
- mthca_dev_lim() remove tab (was that ment to be a reminder?)
- add apparently missing newlines to stings emitted by dev_err.
- add note whom to contact if old FW is found.


In mthca_map_eq_regs(), i take it that it is of no interrest to know
who of "..dev->fw.arbel.eq_"arm_base|eq_set_ci_base") + "(0|4) did
trigger? Memfree vs. not would be obvious from previous msgs.
Same in mthca_tune_pci for cap messages (which don't fit into width=80 terminals)

find_mgm(): 'if (0)\n\t\tmthca_dbg(dev, "Hash for..' should not rely
on dead code elimination but HEAVY_DEBUG. Haven't looked for other
occurances of that, yet. Will you?

thank you,
-- 
Bernhard
-------------- next part --------------
diff -X excl -rduNp gen2.2551.oorig/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_dev.h gen2.2551/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_dev.h
--- gen2.2551.oorig/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_dev.h	2005-05-27 11:06:10.000000000 +0200
+++ gen2.2551/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_dev.h	2005-06-11 01:27:31.000000000 +0200
@@ -45,7 +45,7 @@
 #include "mthca_doorbell.h"
 
 #define DRV_NAME	"ib_mthca"
-#define PFX		DRV_NAME ": "
+#define PFX		DRV_NAME " "
 #define DRV_VERSION	"0.06-pre"
 #define DRV_RELDATE	"November 8, 2004"
 
diff -X excl -rduNp gen2.2551.oorig/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_main.c gen2.2551/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_main.c
--- gen2.2551.oorig/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_main.c	2005-05-27 11:06:10.000000000 +0200
+++ gen2.2551/trunk/src/linux-kernel/infiniband/hw/mthca/mthca_main.c	2005-06-10 23:14:43.000000000 +0200
@@ -69,7 +69,7 @@ MODULE_PARM_DESC(msi, "attempt to use MS
 #endif /* CONFIG_PCI_MSI */
 
 static const char mthca_version[] __devinitdata =
-	"ib_mthca: Mellanox InfiniBand HCA driver v"
+	DRV_NAME " Mellanox InfiniBand HCA driver v"
 	DRV_VERSION " (" DRV_RELDATE ")\n";
 
 static struct mthca_profile default_profile = {
@@ -154,11 +154,11 @@ static int __devinit mthca_dev_lim(struc
 		return -ENODEV;
 	}
 
-	mdev->limits.num_ports      	= dev_lim->num_ports;
+	mdev->limits.num_ports		= dev_lim->num_ports;
 	mdev->limits.vl_cap             = dev_lim->max_vl;
 	mdev->limits.mtu_cap            = dev_lim->max_mtu;
-	mdev->limits.gid_table_len  	= dev_lim->max_gids;
-	mdev->limits.pkey_table_len 	= dev_lim->max_pkeys;
+	mdev->limits.gid_table_len	= dev_lim->max_gids;
+	mdev->limits.pkey_table_len	= dev_lim->max_pkeys;
 	mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay;
 	mdev->limits.max_sg             = dev_lim->max_sg;
 	mdev->limits.reserved_qps       = dev_lim->reserved_qps;
@@ -188,7 +188,7 @@ static int __devinit mthca_dev_lim(struc
 
 	if (dev_lim->flags & DEV_LIM_FLAG_BAD_QKEY_CNTR)
 		mdev->device_cap_flags |= IB_DEVICE_BAD_QKEY_CNTR;
-				
+
 	if (dev_lim->flags & DEV_LIM_FLAG_RAW_MULTI)
 		mdev->device_cap_flags |= IB_DEVICE_RAW_MULTI;
 
@@ -927,13 +927,13 @@ static int __devinit mthca_init_one(stru
 	 */
 	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM) ||
 	    pci_resource_len(pdev, 0) != 1 << 20) {
-		dev_err(&pdev->dev, "Missing DCS, aborting.");
+		dev_err(&pdev->dev, "Missing DCS, aborting.\n");
 		err = -ENODEV;
 		goto err_disable_pdev;
 	}
 	if (!(pci_resource_flags(pdev, 2) & IORESOURCE_MEM) ||
 	    pci_resource_len(pdev, 2) != 1 << 23) {
-		dev_err(&pdev->dev, "Missing UAR, aborting.");
+		dev_err(&pdev->dev, "Missing UAR, aborting.\n");
 		err = -ENODEV;
 		goto err_disable_pdev;
 	}
@@ -1032,6 +1032,7 @@ static int __devinit mthca_init_one(stru
 			   (int) (mthca_hca_table[id->driver_data].latest_fw >> 16) & 0xffff,
 			   (int) (mthca_hca_table[id->driver_data].latest_fw & 0xffff));
 		mthca_warn(mdev, "If you have problems, try updating your HCA FW.\n");
+		mthca_warn(mdev, "Contact your HW supplier for current FW.\n");
 	}
 
 	err = mthca_setup_hca(mdev);
@@ -1163,7 +1164,7 @@ static struct pci_device_id mthca_pci_ta
 MODULE_DEVICE_TABLE(pci, mthca_pci_table);
 
 static struct pci_driver mthca_driver = {
-	.name		= "ib_mthca",
+	.name		= DRV_NAME,
 	.id_table	= mthca_pci_table,
 	.probe		= mthca_init_one,
 	.remove		= __devexit_p(mthca_remove_one)



More information about the general mailing list