diff options
author | Bogdan Hamciuc <bogdan.hamciuc@freescale.com> | 2013-04-05 08:34:58 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-08 23:25:14 (GMT) |
commit | b82fa0cdf48483b3a7182fa2c1f0ef569d442163 (patch) | |
tree | a4e31b7c7a715d8892a78eac974e23a5c48d8b3d /drivers/net/ethernet/freescale/dpa/mac-api.c | |
parent | 536b2f172a871f260eeaba0715c9ac9dbc49f9dd (diff) | |
download | linux-fsl-qoriq-b82fa0cdf48483b3a7182fa2c1f0ef569d442163.tar.xz |
dpaa_eth: Use standard printing API
Replace dpaa_eth_*() and cpu_**() macros with standard printing calls.
Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
(cherry picked from commit 1dc1a7386b52b0249d6a5396e547119f1a83151f)
Conflicts:
drivers/net/ethernet/freescale/dpa/dpa-ethtool.c
Change-Id: I5fc6cd3532c2fd39e72ac0531a85fdef028bb967
Reviewed-on: http://git.am.freescale.net:8181/1059
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa/mac-api.c')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/mac-api.c | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/mac-api.c b/drivers/net/ethernet/freescale/dpa/mac-api.c index beb33b1..1195c05 100644 --- a/drivers/net/ethernet/freescale/dpa/mac-api.c +++ b/drivers/net/ethernet/freescale/dpa/mac-api.c @@ -29,6 +29,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define pr_fmt(fmt) \ + KBUILD_MODNAME ": %s:%hu:%s() " fmt, \ + KBUILD_BASENAME".c", __LINE__, __func__ + #include <linux/init.h> #include <linux/module.h> #include <linux/of_platform.h> @@ -110,7 +114,7 @@ static void mac_exception(t_Handle _mac_dev, e_FmMacExceptions exception) printk(KERN_ERR "10G MAC got RX FIFO Error = %x\n", exception); } - cpu_dev_dbg(mac_dev->dev, "%s:%s() -> %d\n", __file__, __func__, + dev_dbg(mac_dev->dev, "%s:%s() -> %d\n", KBUILD_BASENAME".c", __func__, exception); } @@ -138,7 +142,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) priv->mac = FM_MAC_Config(¶m); if (unlikely(priv->mac == NULL)) { - dpaa_eth_err(mac_dev->dev, "FM_MAC_Config() failed\n"); + dev_err(mac_dev->dev, "FM_MAC_Config() failed\n"); _errno = -EINVAL; goto _return; } @@ -151,7 +155,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) fm_get_max_frm()); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_ConfigMaxFrameLength() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -161,7 +165,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) err = FM_MAC_ConfigPadAndCrc(priv->mac, true); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_ConfigPadAndCrc() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -169,7 +173,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) err = FM_MAC_ConfigHalfDuplex(priv->mac, mac_dev->half_duplex); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_ConfigHalfDuplex() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -178,7 +182,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) err = FM_MAC_ConfigResetOnInit(priv->mac, true); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_ConfigResetOnInit() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -187,7 +191,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) err = FM_MAC_Init(priv->mac); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, "FM_MAC_Init() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Init() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -198,7 +202,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) e_FM_MAC_EX_1G_RX_MIB_CNT_OVFL, FALSE); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_SetException() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -211,7 +215,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) e_FM_MAC_EX_10G_1TX_ECC_ER, FALSE); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_SetException() = 0x%08x\n", err); goto _return_fm_mac_free; } @@ -220,11 +224,11 @@ static int __devinit __cold init(struct mac_device *mac_dev) err = FM_MAC_GetVesrion(priv->mac, &version); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) { - dpaa_eth_err(mac_dev->dev, "FM_MAC_GetVesrion() = 0x%08x\n", + dev_err(mac_dev->dev, "FM_MAC_GetVesrion() = 0x%08x\n", err); goto _return_fm_mac_free; } - cpu_dev_info(mac_dev->dev, "FMan %s version: 0x%08x\n", + dev_info(mac_dev->dev, "FMan %s version: 0x%08x\n", ((macdev2enetinterface(mac_dev) != e_ENET_MODE_XGMII_10000) ? "dTSEC" : "XGEC"), version); @@ -234,7 +238,7 @@ static int __devinit __cold init(struct mac_device *mac_dev) _return_fm_mac_free: err = FM_MAC_Free(priv->mac); if (unlikely(-GET_ERROR_TYPE(err) < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Free() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Free() = 0x%08x\n", err); _return: return _errno; } @@ -311,7 +315,7 @@ static int __cold start(struct mac_device *mac_dev) e_COMM_MODE_RX_AND_TX); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Enable() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Enable() = 0x%08x\n", err); if (phy_dev) { if (macdev2enetinterface(mac_dev) != e_ENET_MODE_XGMII_10000) @@ -336,7 +340,7 @@ static int __cold stop(struct mac_device *mac_dev) e_COMM_MODE_RX_AND_TX); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Disable() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Disable() = 0x%08x\n", err); return _errno; } @@ -351,7 +355,7 @@ static int __cold change_promisc(struct mac_device *mac_dev) mac_dev->promisc = !mac_dev->promisc); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_SetPromiscuous() = 0x%08x\n", err); return _errno; @@ -377,7 +381,7 @@ static int __cold set_multi(struct net_device *net_dev) (t_EnetAddr *)old_addr->addr); _errno = -GET_ERROR_TYPE(err); if (_errno < 0) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_RemoveHashMacAddr() = 0x%08x\n", err); return _errno; } @@ -391,13 +395,13 @@ static int __cold set_multi(struct net_device *net_dev) (t_EnetAddr *)ha->addr); _errno = -GET_ERROR_TYPE(err); if (_errno < 0) { - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_AddHashMacAddr() = 0x%08x\n", err); return _errno; } tmp = kmalloc(sizeof(struct mac_address), GFP_ATOMIC); if (!tmp) { - dpaa_eth_err(mac_dev->dev, "Out of memory\n"); + dev_err(mac_dev->dev, "Out of memory\n"); return -ENOMEM; } memcpy(tmp->addr, ha->addr, ETH_ALEN); @@ -416,7 +420,7 @@ static int __cold change_addr(struct mac_device *mac_dev, uint8_t *addr) (t_EnetAddr *)addr); _errno = -GET_ERROR_TYPE(err); if (_errno < 0) - dpaa_eth_err(mac_dev->dev, + dev_err(mac_dev->dev, "FM_MAC_ModifyMacAddr() = 0x%08x\n", err); return _errno; @@ -456,7 +460,7 @@ static void adjust_link(struct net_device *net_dev) phy_dev->speed, phy_dev->duplex); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_AdjustLink() = 0x%08x\n", + dev_err(mac_dev->dev, "FM_MAC_AdjustLink() = 0x%08x\n", err); return; @@ -481,7 +485,7 @@ static int dtsec_init_phy(struct net_device *net_dev) phy_dev = of_phy_connect(net_dev, mac_dev->phy_node, &adjust_link, 0, mac_dev->phy_if); if (unlikely(phy_dev == NULL) || IS_ERR(phy_dev)) { - cpu_netdev_err(net_dev, "Could not connect to PHY %s\n", + netdev_err(net_dev, "Could not connect to PHY %s\n", mac_dev->phy_node ? mac_dev->phy_node->full_name : mac_dev->fixed_bus_id); @@ -510,7 +514,7 @@ static int xgmac_init_phy(struct net_device *net_dev) phy_dev = of_phy_attach(net_dev, mac_dev->phy_node, 0, mac_dev->phy_if); if (unlikely(phy_dev == NULL) || IS_ERR(phy_dev)) { - cpu_netdev_err(net_dev, "Could not attach to PHY %s\n", + netdev_err(net_dev, "Could not attach to PHY %s\n", mac_dev->phy_node ? mac_dev->phy_node->full_name : mac_dev->fixed_bus_id); @@ -578,12 +582,12 @@ static int __cold uninit(struct mac_device *mac_dev) err = FM_MAC_Disable(priv->mac, e_COMM_MODE_RX_AND_TX); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Disable() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Disable() = 0x%08x\n", err); err = FM_MAC_Free(priv->mac); __errno = -GET_ERROR_TYPE(err); if (unlikely(__errno < 0)) { - dpaa_eth_err(mac_dev->dev, "FM_MAC_Free() = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_MAC_Free() = 0x%08x\n", err); if (_errno < 0) _errno = __errno; } @@ -602,7 +606,7 @@ static int __cold ptp_enable(struct mac_device *mac_dev) err = FM_MAC_Enable1588TimeStamp(priv->mac); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Enable1588TimeStamp()" + dev_err(mac_dev->dev, "FM_MAC_Enable1588TimeStamp()" "= 0x%08x\n", err); return _errno; } @@ -618,7 +622,7 @@ static int __cold ptp_disable(struct mac_device *mac_dev) err = FM_MAC_Disable1588TimeStamp(priv->mac); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_MAC_Disable1588TimeStamp()" + dev_err(mac_dev->dev, "FM_MAC_Disable1588TimeStamp()" "= 0x%08x\n", err); return _errno; } @@ -640,7 +644,7 @@ static int __cold fm_rtc_enable(struct net_device *net_dev) err = FM_RTC_Enable(fm_get_rtc_handle(mac_dev->fm_dev), 0); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_Enable = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_RTC_Enable = 0x%08x\n", err); return _errno; } @@ -655,7 +659,7 @@ static int __cold fm_rtc_disable(struct net_device *net_dev) err = FM_RTC_Disable(fm_get_rtc_handle(mac_dev->fm_dev)); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_Disable = 0x%08x\n", err); + dev_err(mac_dev->dev, "FM_RTC_Disable = 0x%08x\n", err); return _errno; } @@ -670,7 +674,7 @@ static int __cold fm_rtc_get_cnt(struct net_device *net_dev, uint64_t *ts) err = FM_RTC_GetCurrentTime(fm_get_rtc_handle(mac_dev->fm_dev), ts); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_GetCurrentTime = 0x%08x\n", + dev_err(mac_dev->dev, "FM_RTC_GetCurrentTime = 0x%08x\n", err); return _errno; @@ -686,7 +690,7 @@ static int __cold fm_rtc_set_cnt(struct net_device *net_dev, uint64_t ts) err = FM_RTC_SetCurrentTime(fm_get_rtc_handle(mac_dev->fm_dev), ts); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_SetCurrentTime = 0x%08x\n", + dev_err(mac_dev->dev, "FM_RTC_SetCurrentTime = 0x%08x\n", err); return _errno; @@ -703,7 +707,7 @@ static int __cold fm_rtc_get_drift(struct net_device *net_dev, uint32_t *drift) drift); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_GetFreqCompensation =" + dev_err(mac_dev->dev, "FM_RTC_GetFreqCompensation =" "0x%08x\n", err); return _errno; @@ -720,7 +724,7 @@ static int __cold fm_rtc_set_drift(struct net_device *net_dev, uint32_t drift) drift); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_SetFreqCompensation =" + dev_err(mac_dev->dev, "FM_RTC_SetFreqCompensation =" "0x%08x\n", err); return _errno; @@ -742,7 +746,7 @@ static int __cold fm_rtc_set_alarm(struct net_device *net_dev, uint32_t id, &alarm); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_SetAlarm =" + dev_err(mac_dev->dev, "FM_RTC_SetAlarm =" "0x%08x\n", err); return _errno; @@ -763,7 +767,7 @@ static int __cold fm_rtc_set_fiper(struct net_device *net_dev, uint32_t id, err = FM_RTC_SetPeriodicPulse(fm_get_rtc_handle(mac_dev->fm_dev), &pp); _errno = -GET_ERROR_TYPE(err); if (unlikely(_errno < 0)) - dpaa_eth_err(mac_dev->dev, "FM_RTC_SetPeriodicPulse =" + dev_err(mac_dev->dev, "FM_RTC_SetPeriodicPulse =" "0x%08x\n", err); return _errno; |