sparc64: print debug messages when reading from LDC channel
authorJag Raman <jag.raman@oracle.com>
Fri, 9 Jun 2017 16:29:32 +0000 (12:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2017 21:10:55 +0000 (14:10 -0700)
Print debug messages when reading from given LDC channel.

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Aaron Young <aaron.young@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ldc.c

index 47817b78ebfc0ca2bea5475aa973559101dd2ca6..97a5743b04e23e3b6ecf4827a8c4dd5398dbe80c 100644 (file)
@@ -1950,6 +1950,8 @@ int ldc_read(struct ldc_channel *lp, void *buf, unsigned int size)
        unsigned long flags;
        int err;
 
+       ldcdbg(RX, "%s: entered size=%d\n", __func__, size);
+
        if (!buf)
                return -EINVAL;
 
@@ -1965,6 +1967,9 @@ int ldc_read(struct ldc_channel *lp, void *buf, unsigned int size)
 
        spin_unlock_irqrestore(&lp->lock, flags);
 
+       ldcdbg(RX, "%s: mode=%d, head=%lu, tail=%lu rv=%d\n", __func__,
+              lp->cfg.mode, lp->rx_head, lp->rx_tail, err);
+
        return err;
 }
 EXPORT_SYMBOL(ldc_read);