diff options
author | Radoslaw Biernacki <rad@semihalf.com> | 2016-08-12 14:21:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-13 21:59:32 +0300 |
commit | ecae29cb15c1a9502bb24f44ff9b84075c0b1dcd (patch) | |
tree | 70b7278d3a54c82bdb4db148e84db996c436691b /drivers/net/ethernet/cavium/thunder/nicvf_main.c | |
parent | a8671acca87267ad8b583b6e5cf9f6bcb09ff77a (diff) | |
download | linux-ecae29cb15c1a9502bb24f44ff9b84075c0b1dcd.tar.xz |
net: thunderx: Improvement for MBX interface debug messages
Adding debug messages in case of NACK for a mailbox message, also
did small cleanups.
Signed-off-by: Radoslaw Biernacki <rad@semihalf.com>
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/nicvf_main.c')
-rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 5335ff1bf69a..dd57361aa3fc 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -144,15 +144,19 @@ int nicvf_send_msg_to_pf(struct nicvf *nic, union nic_mbx *mbx) /* Wait for previous message to be acked, timeout 2sec */ while (!nic->pf_acked) { - if (nic->pf_nacked) + if (nic->pf_nacked) { + netdev_err(nic->netdev, + "PF NACK to mbox msg 0x%02x from VF%d\n", + (mbx->msg.msg & 0xFF), nic->vf_id); return -EINVAL; + } msleep(sleep); if (nic->pf_acked) break; timeout -= sleep; if (!timeout) { netdev_err(nic->netdev, - "PF didn't ack to mbox msg %d from VF%d\n", + "PF didn't ACK to mbox msg 0x%02x from VF%d\n", (mbx->msg.msg & 0xFF), nic->vf_id); return -EBUSY; } |