aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/sysfs.c10
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mcg.c23
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c31
-rw-r--r--drivers/net/mlx4/mcg.c23
4 files changed, 9 insertions, 78 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 4d1042115598..e985193d631c 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
262 if (ret) 262 if (ret)
263 return ret; 263 return ret;
264 264
265 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 265 return sprintf(buf, "%p6\n", gid.raw);
266 be16_to_cpu(((__be16 *) gid.raw)[0]),
267 be16_to_cpu(((__be16 *) gid.raw)[1]),
268 be16_to_cpu(((__be16 *) gid.raw)[2]),
269 be16_to_cpu(((__be16 *) gid.raw)[3]),
270 be16_to_cpu(((__be16 *) gid.raw)[4]),
271 be16_to_cpu(((__be16 *) gid.raw)[5]),
272 be16_to_cpu(((__be16 *) gid.raw)[6]),
273 be16_to_cpu(((__be16 *) gid.raw)[7]));
274} 266}
275 267
276static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr, 268static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c
index 3f5f94879208..693bed0b2d1c 100644
--- a/drivers/infiniband/hw/mthca/mthca_mcg.c
+++ b/drivers/infiniband/hw/mthca/mthca_mcg.c
@@ -87,17 +87,7 @@ static int find_mgm(struct mthca_dev *dev,
87 } 87 }
88 88
89 if (0) 89 if (0)
90 mthca_dbg(dev, "Hash for %04x:%04x:%04x:%04x:" 90 mthca_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
91 "%04x:%04x:%04x:%04x is %04x\n",
92 be16_to_cpu(((__be16 *) gid)[0]),
93 be16_to_cpu(((__be16 *) gid)[1]),
94 be16_to_cpu(((__be16 *) gid)[2]),
95 be16_to_cpu(((__be16 *) gid)[3]),
96 be16_to_cpu(((__be16 *) gid)[4]),
97 be16_to_cpu(((__be16 *) gid)[5]),
98 be16_to_cpu(((__be16 *) gid)[6]),
99 be16_to_cpu(((__be16 *) gid)[7]),
100 *hash);
101 91
102 *index = *hash; 92 *index = *hash;
103 *prev = -1; 93 *prev = -1;
@@ -264,16 +254,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
264 goto out; 254 goto out;
265 255
266 if (index == -1) { 256 if (index == -1) {
267 mthca_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " 257 mthca_err(dev, "MGID %p6 not found\n", gid->raw);
268 "not found\n",
269 be16_to_cpu(((__be16 *) gid->raw)[0]),
270 be16_to_cpu(((__be16 *) gid->raw)[1]),
271 be16_to_cpu(((__be16 *) gid->raw)[2]),
272 be16_to_cpu(((__be16 *) gid->raw)[3]),
273 be16_to_cpu(((__be16 *) gid->raw)[4]),
274 be16_to_cpu(((__be16 *) gid->raw)[5]),
275 be16_to_cpu(((__be16 *) gid->raw)[6]),
276 be16_to_cpu(((__be16 *) gid->raw)[7]));
277 err = -EINVAL; 258 err = -EINVAL;
278 goto out; 259 goto out;
279 } 260 }
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 5b8b533f2908..bc825310c6db 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1514,15 +1514,7 @@ static ssize_t show_dgid(struct device *dev, struct device_attribute *attr,
1514 target->state == SRP_TARGET_REMOVED) 1514 target->state == SRP_TARGET_REMOVED)
1515 return -ENODEV; 1515 return -ENODEV;
1516 1516
1517 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1517 return sprintf(buf, "%p6\n", target->path.dgid.raw);
1518 be16_to_cpu(((__be16 *) target->path.dgid.raw)[0]),
1519 be16_to_cpu(((__be16 *) target->path.dgid.raw)[1]),
1520 be16_to_cpu(((__be16 *) target->path.dgid.raw)[2]),
1521 be16_to_cpu(((__be16 *) target->path.dgid.raw)[3]),
1522 be16_to_cpu(((__be16 *) target->path.dgid.raw)[4]),
1523 be16_to_cpu(((__be16 *) target->path.dgid.raw)[5]),
1524 be16_to_cpu(((__be16 *) target->path.dgid.raw)[6]),
1525 be16_to_cpu(((__be16 *) target->path.dgid.raw)[7]));
1526} 1518}
1527 1519
1528static ssize_t show_orig_dgid(struct device *dev, 1520static ssize_t show_orig_dgid(struct device *dev,
@@ -1534,15 +1526,7 @@ static ssize_t show_orig_dgid(struct device *dev,
1534 target->state == SRP_TARGET_REMOVED) 1526 target->state == SRP_TARGET_REMOVED)
1535 return -ENODEV; 1527 return -ENODEV;
1536 1528
1537 return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1529 return sprintf(buf, "%p6\n", target->orig_dgid);
1538 be16_to_cpu(target->orig_dgid[0]),
1539 be16_to_cpu(target->orig_dgid[1]),
1540 be16_to_cpu(target->orig_dgid[2]),
1541 be16_to_cpu(target->orig_dgid[3]),
1542 be16_to_cpu(target->orig_dgid[4]),
1543 be16_to_cpu(target->orig_dgid[5]),
1544 be16_to_cpu(target->orig_dgid[6]),
1545 be16_to_cpu(target->orig_dgid[7]));
1546} 1530}
1547 1531
1548static ssize_t show_zero_req_lim(struct device *dev, 1532static ssize_t show_zero_req_lim(struct device *dev,
@@ -1883,19 +1867,12 @@ static ssize_t srp_create_target(struct device *dev,
1883 1867
1884 shost_printk(KERN_DEBUG, target->scsi_host, PFX 1868 shost_printk(KERN_DEBUG, target->scsi_host, PFX
1885 "new target: id_ext %016llx ioc_guid %016llx pkey %04x " 1869 "new target: id_ext %016llx ioc_guid %016llx pkey %04x "
1886 "service_id %016llx dgid %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", 1870 "service_id %016llx dgid %p6\n",
1887 (unsigned long long) be64_to_cpu(target->id_ext), 1871 (unsigned long long) be64_to_cpu(target->id_ext),
1888 (unsigned long long) be64_to_cpu(target->ioc_guid), 1872 (unsigned long long) be64_to_cpu(target->ioc_guid),
1889 be16_to_cpu(target->path.pkey), 1873 be16_to_cpu(target->path.pkey),
1890 (unsigned long long) be64_to_cpu(target->service_id), 1874 (unsigned long long) be64_to_cpu(target->service_id),
1891 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[0]), 1875 target->path.dgid.raw);
1892 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[2]),
1893 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[4]),
1894 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[6]),
1895 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[8]),
1896 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[10]),
1897 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[12]),
1898 (int) be16_to_cpu(*(__be16 *) &target->path.dgid.raw[14]));
1899 1876
1900 ret = srp_create_target_ib(target); 1877 ret = srp_create_target_ib(target);
1901 if (ret) 1878 if (ret)
diff --git a/drivers/net/mlx4/mcg.c b/drivers/net/mlx4/mcg.c
index 592c01ae2c5d..6f79e84a5c9a 100644
--- a/drivers/net/mlx4/mcg.c
+++ b/drivers/net/mlx4/mcg.c
@@ -118,17 +118,7 @@ static int find_mgm(struct mlx4_dev *dev,
118 return err; 118 return err;
119 119
120 if (0) 120 if (0)
121 mlx4_dbg(dev, "Hash for %04x:%04x:%04x:%04x:" 121 mlx4_dbg(dev, "Hash for %p6 is %04x\n", gid, *hash);
122 "%04x:%04x:%04x:%04x is %04x\n",
123 be16_to_cpu(((__be16 *) gid)[0]),
124 be16_to_cpu(((__be16 *) gid)[1]),
125 be16_to_cpu(((__be16 *) gid)[2]),
126 be16_to_cpu(((__be16 *) gid)[3]),
127 be16_to_cpu(((__be16 *) gid)[4]),
128 be16_to_cpu(((__be16 *) gid)[5]),
129 be16_to_cpu(((__be16 *) gid)[6]),
130 be16_to_cpu(((__be16 *) gid)[7]),
131 *hash);
132 122
133 *index = *hash; 123 *index = *hash;
134 *prev = -1; 124 *prev = -1;
@@ -277,16 +267,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16])
277 goto out; 267 goto out;
278 268
279 if (index == -1) { 269 if (index == -1) {
280 mlx4_err(dev, "MGID %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x " 270 mlx4_err(dev, "MGID %p6 not found\n", gid);
281 "not found\n",
282 be16_to_cpu(((__be16 *) gid)[0]),
283 be16_to_cpu(((__be16 *) gid)[1]),
284 be16_to_cpu(((__be16 *) gid)[2]),
285 be16_to_cpu(((__be16 *) gid)[3]),
286 be16_to_cpu(((__be16 *) gid)[4]),
287 be16_to_cpu(((__be16 *) gid)[5]),
288 be16_to_cpu(((__be16 *) gid)[6]),
289 be16_to_cpu(((__be16 *) gid)[7]));
290 err = -EINVAL; 271 err = -EINVAL;
291 goto out; 272 goto out;
292 } 273 }