summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpa
diff options
context:
space:
mode:
authorMarian Rotariu <marian.rotariu@freescale.com>2013-11-08 08:54:59 (GMT)
committerJ. German Rivera <German.Rivera@freescale.com>2013-11-14 19:01:01 (GMT)
commitbc45838cfff13521f1bb95c011223107db30985e (patch)
tree570765f3a1f336fbd3ff90352f363e2c69098971 /drivers/net/ethernet/freescale/dpa
parent04eb04c1a808f7b9b6d8a3c83d513261d45dbf08 (diff)
downloadlinux-fsl-qoriq-bc45838cfff13521f1bb95c011223107db30985e.tar.xz
dpaa_eth: remove pr_alert from proxy interface
With this patch the user will be able to configure the debug message display through netdev. Also, an unused variable declaration was removed. Change-Id: I203cc77fffd14ecbad8a5d115232d9eab1188168 Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/6315 Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c
index 95ad3ea..1c1a121 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_proxy.c
@@ -181,7 +181,6 @@ int dpa_proxy_set_rx_mode(struct proxy_device *proxy_dev,
struct net_device *net_dev)
{
struct mac_device *mac_dev = proxy_dev->mac_dev;
- const struct dpa_priv_s *priv = netdev_priv(net_dev);
int _errno;
_errno = mac_dev->set_multi(net_dev, mac_dev);
@@ -205,7 +204,9 @@ int dpa_proxy_start(struct net_device *net_dev)
_errno = mac_dev->init_phy(net_dev, mac_dev);
if (_errno < 0) {
- pr_alert("init_phy() = %d\n", _errno);
+ if (netif_msg_drv(priv))
+ netdev_err(net_dev, "init_phy() = %d\n",
+ _errno);
return _errno;
}
@@ -214,7 +215,9 @@ int dpa_proxy_start(struct net_device *net_dev)
_errno = mac_dev->start(mac_dev);
if (_errno < 0) {
- pr_alert("mac_dev->start() = %d\n", _errno);
+ if (netif_msg_drv(priv))
+ netdev_err(net_dev, "mac_dev->start() = %d\n",
+ _errno);
return _errno;
}
@@ -223,15 +226,15 @@ int dpa_proxy_start(struct net_device *net_dev)
int dpa_proxy_stop(struct proxy_device *proxy_dev, struct net_device *net_dev)
{
- struct mac_device *mac_dev;
- int _errno;
- int i;
-
- mac_dev = proxy_dev->mac_dev;
+ struct mac_device *mac_dev = proxy_dev->mac_dev;
+ const struct dpa_priv_s *priv = netdev_priv(net_dev);
+ int _errno, i;
_errno = mac_dev->stop(mac_dev);
if (_errno < 0) {
- pr_alert("mac_dev->stop() = %d\n", _errno);
+ if (netif_msg_drv(priv))
+ netdev_err(net_dev, "mac_dev->stop() = %d\n",
+ _errno);
return _errno;
}