diff options
author | Manish chopra <Manish.Chopra@qlogic.com> | 2011-08-29 16:50:27 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-30 06:52:50 +0400 |
commit | df3cfbe30bcd8ddfbbac2d0893c53b6d048dd1f8 (patch) | |
tree | ebb5768b3f9dec42e5443337b7f08ffbd0d0b666 /drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | |
parent | 44f65b290235a1b259eea1aa055b5b1be36d3c86 (diff) | |
download | linux-df3cfbe30bcd8ddfbbac2d0893c53b6d048dd1f8.tar.xz |
qlcnic: Change debug messages in loopback path
Added more debug messages while loopback test in progress
Signed-off-by: Manish chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index 59d73f23de67..720b3330aafa 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -710,7 +710,7 @@ int qlcnic_check_loopback_buff(unsigned char *data, u8 mac[]) return memcmp(data, buff, QLCNIC_ILB_PKT_SIZE); } -static int qlcnic_do_lb_test(struct qlcnic_adapter *adapter) +static int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode) { struct qlcnic_recv_context *recv_ctx = adapter->recv_ctx; struct qlcnic_host_sds_ring *sds_ring = &recv_ctx->sds_rings[0]; @@ -736,13 +736,18 @@ static int qlcnic_do_lb_test(struct qlcnic_adapter *adapter) dev_kfree_skb_any(skb); if (!adapter->diag_cnt) - dev_warn(&adapter->pdev->dev, "LB Test: %dth packet" - " not recevied\n", i + 1); + QLCDB(adapter, DRV, + "LB Test: packet #%d was not received\n", i + 1); else cnt++; } if (cnt != i) { dev_warn(&adapter->pdev->dev, "LB Test failed\n"); + if (mode != QLCNIC_ILB_MODE) { + dev_warn(&adapter->pdev->dev, + "WARNING: Please make sure external" + "loopback connector is plugged in\n"); + } return -1; } return 0; @@ -761,7 +766,7 @@ static int qlcnic_loopback_test(struct net_device *netdev, u8 mode) return -EOPNOTSUPP; } - netdev_info(netdev, "%s loopback test in progress\n", + QLCDB(adapter, DRV, "%s loopback test in progress\n", mode == QLCNIC_ILB_MODE ? "internal" : "external"); if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC) { netdev_warn(netdev, "Loopback test not supported for non " @@ -797,7 +802,7 @@ static int qlcnic_loopback_test(struct net_device *netdev, u8 mode) } } while (!QLCNIC_IS_LB_CONFIGURED(adapter->ahw->loopback_state)); - ret = qlcnic_do_lb_test(adapter); + ret = qlcnic_do_lb_test(adapter, mode); qlcnic_clear_lb_mode(adapter); |