提交 7ff11de1 编写于 作者: C Chuck Lever 提交者: Anna Schumaker

xprtrdma: Display async errors

An async error upcall is a hard error, and should be reported in
the system log.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 d5440e27
...@@ -106,6 +106,32 @@ rpcrdma_run_tasklet(unsigned long data) ...@@ -106,6 +106,32 @@ rpcrdma_run_tasklet(unsigned long data)
static DECLARE_TASKLET(rpcrdma_tasklet_g, rpcrdma_run_tasklet, 0UL); static DECLARE_TASKLET(rpcrdma_tasklet_g, rpcrdma_run_tasklet, 0UL);
static const char * const async_event[] = {
"CQ error",
"QP fatal error",
"QP request error",
"QP access error",
"communication established",
"send queue drained",
"path migration successful",
"path mig error",
"device fatal error",
"port active",
"port error",
"LID change",
"P_key change",
"SM change",
"SRQ error",
"SRQ limit reached",
"last WQE reached",
"client reregister",
"GID change",
};
#define ASYNC_MSG(status) \
((status) < ARRAY_SIZE(async_event) ? \
async_event[(status)] : "unknown async error")
static void static void
rpcrdma_schedule_tasklet(struct list_head *sched_list) rpcrdma_schedule_tasklet(struct list_head *sched_list)
{ {
...@@ -122,8 +148,9 @@ rpcrdma_qp_async_error_upcall(struct ib_event *event, void *context) ...@@ -122,8 +148,9 @@ rpcrdma_qp_async_error_upcall(struct ib_event *event, void *context)
{ {
struct rpcrdma_ep *ep = context; struct rpcrdma_ep *ep = context;
dprintk("RPC: %s: QP error %X on device %s ep %p\n", pr_err("RPC: %s: %s on device %s ep %p\n",
__func__, event->event, event->device->name, context); __func__, ASYNC_MSG(event->event),
event->device->name, context);
if (ep->rep_connected == 1) { if (ep->rep_connected == 1) {
ep->rep_connected = -EIO; ep->rep_connected = -EIO;
ep->rep_func(ep); ep->rep_func(ep);
...@@ -136,8 +163,9 @@ rpcrdma_cq_async_error_upcall(struct ib_event *event, void *context) ...@@ -136,8 +163,9 @@ rpcrdma_cq_async_error_upcall(struct ib_event *event, void *context)
{ {
struct rpcrdma_ep *ep = context; struct rpcrdma_ep *ep = context;
dprintk("RPC: %s: CQ error %X on device %s ep %p\n", pr_err("RPC: %s: %s on device %s ep %p\n",
__func__, event->event, event->device->name, context); __func__, ASYNC_MSG(event->event),
event->device->name, context);
if (ep->rep_connected == 1) { if (ep->rep_connected == 1) {
ep->rep_connected = -EIO; ep->rep_connected = -EIO;
ep->rep_func(ep); ep->rep_func(ep);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册