diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-11-08 16:30:44 +1100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-11 15:09:44 +0900 |
commit | 9ef8690be13d8ae3130749fbcc0cc21e4e3f738c (patch) | |
tree | af903d0bf0a2bef1f3c7f8aed1b69d008eb1b1fb /net/ncsi/ncsi-rsp.c | |
parent | a8a6f1e4ea78c5d32a6c34c52877f7eb53ef054c (diff) | |
download | linux-9ef8690be13d8ae3130749fbcc0cc21e4e3f738c.tar.gz |
net/ncsi: Improve general state logging
The NCSI driver is mostly silent which becomes a headache when trying to
determine what has occurred on the NCSI connection. This adds additional
logging in a few key areas such as state transitions and calling out
certain errors more visibly.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/ncsi-rsp.c')
-rw-r--r-- | net/ncsi/ncsi-rsp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c index 927dad4759d1..58186c4102f0 100644 --- a/net/ncsi/ncsi-rsp.c +++ b/net/ncsi/ncsi-rsp.c @@ -1032,11 +1032,19 @@ int ncsi_rcv_rsp(struct sk_buff *skb, struct net_device *dev, if (payload < 0) payload = ntohs(hdr->length); ret = ncsi_validate_rsp_pkt(nr, payload); - if (ret) + if (ret) { + netdev_warn(ndp->ndev.dev, + "NCSI: 'bad' packet ignored for type 0x%x\n", + hdr->type); goto out; + } /* Process the packet */ ret = nrh->handler(nr); + if (ret) + netdev_err(ndp->ndev.dev, + "NCSI: Handler for packet type 0x%x returned %d\n", + hdr->type, ret); out: ncsi_free_request(nr); return ret; |