aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/srp
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2014-03-14 08:52:21 -0400
committerRoland Dreier <roland@purestorage.com>2014-03-24 13:05:30 -0400
commite7ffde0164b1a580f66ea3b95081626107931d3c (patch)
tree21594a94166e4454c2db9f6ed6a4ede61ee2bc58 /drivers/infiniband/ulp/srp
parent2088ca66f5e986c06dc1deb4e2f004218b652300 (diff)
IB/srp: Add more logging
Log sgid and dgid when reporting that a login has been rejected or when a host has been added. This makes it easy to figure out which initiator and target ports these messages apply to. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/ulp/srp')
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 890322637e2e..2ec9c05814f6 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1804,8 +1804,10 @@ static void srp_cm_rej_handler(struct ib_cm_id *cm_id,
1804 shost_printk(KERN_WARNING, shost, 1804 shost_printk(KERN_WARNING, shost,
1805 PFX "SRP_LOGIN_REJ: requested max_it_iu_len too large\n"); 1805 PFX "SRP_LOGIN_REJ: requested max_it_iu_len too large\n");
1806 else 1806 else
1807 shost_printk(KERN_WARNING, shost, 1807 shost_printk(KERN_WARNING, shost, PFX
1808 PFX "SRP LOGIN REJECTED, reason 0x%08x\n", reason); 1808 "SRP LOGIN from %pI6 to %pI6 REJECTED, reason 0x%08x\n",
1809 target->path.sgid.raw,
1810 target->orig_dgid, reason);
1809 } else 1811 } else
1810 shost_printk(KERN_WARNING, shost, 1812 shost_printk(KERN_WARNING, shost,
1811 " REJ reason: IB_CM_REJ_CONSUMER_DEFINED," 1813 " REJ reason: IB_CM_REJ_CONSUMER_DEFINED,"
@@ -2653,15 +2655,6 @@ static ssize_t srp_create_target(struct device *dev,
2653 if (ret) 2655 if (ret)
2654 goto err_free_mem; 2656 goto err_free_mem;
2655 2657
2656 shost_printk(KERN_DEBUG, target->scsi_host, PFX
2657 "new target: id_ext %016llx ioc_guid %016llx pkey %04x "
2658 "service_id %016llx dgid %pI6\n",
2659 (unsigned long long) be64_to_cpu(target->id_ext),
2660 (unsigned long long) be64_to_cpu(target->ioc_guid),
2661 be16_to_cpu(target->path.pkey),
2662 (unsigned long long) be64_to_cpu(target->service_id),
2663 target->path.dgid.raw);
2664
2665 ret = srp_create_target_ib(target); 2658 ret = srp_create_target_ib(target);
2666 if (ret) 2659 if (ret)
2667 goto err_free_mem; 2660 goto err_free_mem;
@@ -2681,6 +2674,14 @@ static ssize_t srp_create_target(struct device *dev,
2681 if (ret) 2674 if (ret)
2682 goto err_disconnect; 2675 goto err_disconnect;
2683 2676
2677 shost_printk(KERN_DEBUG, target->scsi_host, PFX
2678 "new target: id_ext %016llx ioc_guid %016llx pkey %04x service_id %016llx sgid %pI6 dgid %pI6\n",
2679 be64_to_cpu(target->id_ext),
2680 be64_to_cpu(target->ioc_guid),
2681 be16_to_cpu(target->path.pkey),
2682 be64_to_cpu(target->service_id),
2683 target->path.sgid.raw, target->path.dgid.raw);
2684
2684 return count; 2685 return count;
2685 2686
2686err_disconnect: 2687err_disconnect: