diff options
author | Faisal Latif <faisal.latif@intel.com> | 2011-09-25 21:33:44 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-10 13:51:21 -0400 |
commit | 6224c7eeff586e9dbf51b872d7e0bae291fa00ed (patch) | |
tree | acdc9b15f77f440e53c4fcbc1aed592667857e8a /drivers/infiniband | |
parent | bab3a9f43f211554626e189519b91ab9ef952f2d (diff) |
RDMA/nes: Print IP address for critcal errors
Print the IP address of the remote host when a critical asynchronous event is
received.
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Signed-off-by: Faisal Latif <Faisal.Latif@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_hw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c index 43bebe805d2e..f85ccbad8fa2 100644 --- a/drivers/infiniband/hw/nes/nes_hw.c +++ b/drivers/infiniband/hw/nes/nes_hw.c | |||
@@ -110,6 +110,14 @@ static unsigned char *nes_tcp_state_str[] = { | |||
110 | }; | 110 | }; |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | static inline void print_ip(struct nes_cm_node *cm_node) | ||
114 | { | ||
115 | unsigned char *rem_addr; | ||
116 | if (cm_node) { | ||
117 | rem_addr = (unsigned char *)&cm_node->rem_addr; | ||
118 | printk(KERN_ERR PFX "Remote IP addr: %pI4\n", rem_addr); | ||
119 | } | ||
120 | } | ||
113 | 121 | ||
114 | /** | 122 | /** |
115 | * nes_nic_init_timer_defaults | 123 | * nes_nic_init_timer_defaults |
@@ -3694,6 +3702,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, | |||
3694 | case NES_AEQE_AEID_ROE_INVALID_RDMA_WRITE_OR_READ_RESP: | 3702 | case NES_AEQE_AEID_ROE_INVALID_RDMA_WRITE_OR_READ_RESP: |
3695 | printk(KERN_ERR PFX "QP[%u] async_event_id=0x%04X IB_EVENT_QP_FATAL\n", | 3703 | printk(KERN_ERR PFX "QP[%u] async_event_id=0x%04X IB_EVENT_QP_FATAL\n", |
3696 | nesqp->hwqp.qp_id, async_event_id); | 3704 | nesqp->hwqp.qp_id, async_event_id); |
3705 | print_ip(nesqp->cm_node); | ||
3697 | if (!atomic_read(&nesqp->close_timer_started)) | 3706 | if (!atomic_read(&nesqp->close_timer_started)) |
3698 | nes_terminate_connection(nesdev, nesqp, aeqe, IB_EVENT_QP_FATAL); | 3707 | nes_terminate_connection(nesdev, nesqp, aeqe, IB_EVENT_QP_FATAL); |
3699 | break; | 3708 | break; |