Commit 497159af authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

drivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Use print_hex_dump
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4f18b3f
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define DRV_NAME "8139too" #define DRV_NAME "8139too"
#define DRV_VERSION "0.9.28" #define DRV_VERSION "0.9.28"
...@@ -111,7 +113,6 @@ ...@@ -111,7 +113,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION
#define PFX DRV_NAME ": "
/* Default Message level */ /* Default Message level */
#define RTL8139_DEF_MSG_ENABLE (NETIF_MSG_DRV | \ #define RTL8139_DEF_MSG_ENABLE (NETIF_MSG_DRV | \
...@@ -130,7 +131,7 @@ ...@@ -130,7 +131,7 @@
# define assert(expr) do {} while (0) # define assert(expr) do {} while (0)
#else #else
# define assert(expr) \ # define assert(expr) \
if(unlikely(!(expr))) { \ if (unlikely(!(expr))) { \
pr_err("Assertion failed! %s,%s,%s,line=%d\n", \ pr_err("Assertion failed! %s,%s,%s,line=%d\n", \
#expr, __FILE__, __func__, __LINE__); \ #expr, __FILE__, __func__, __LINE__); \
} }
...@@ -957,7 +958,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -957,7 +958,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->device == PCI_DEVICE_ID_REALTEK_8139 &&
pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS && pdev->subsystem_vendor == PCI_VENDOR_ID_ATHEROS &&
pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) { pdev->subsystem_device == PCI_DEVICE_ID_REALTEK_8139) {
pr_info("8139too: OQO Model 2 detected. Forcing PIO\n"); pr_info("OQO Model 2 detected. Forcing PIO\n");
use_io = 1; use_io = 1;
} }
...@@ -1010,21 +1011,19 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -1010,21 +1011,19 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
tp->mii.reg_num_mask = 0x1f; tp->mii.reg_num_mask = 0x1f;
/* dev is fully set up and ready to use now */ /* dev is fully set up and ready to use now */
pr_debug("about to register device named %s (%p)...\n", dev->name, dev); pr_debug("about to register device named %s (%p)...\n",
dev->name, dev);
i = register_netdev (dev); i = register_netdev (dev);
if (i) goto err_out; if (i) goto err_out;
pci_set_drvdata (pdev, dev); pci_set_drvdata (pdev, dev);
pr_info("%s: %s at 0x%lx, %pM, IRQ %d\n", netdev_info(dev, "%s at 0x%lx, %pM, IRQ %d\n",
dev->name,
board_info[ent->driver_data].name, board_info[ent->driver_data].name,
dev->base_addr, dev->base_addr, dev->dev_addr, dev->irq);
dev->dev_addr,
dev->irq);
pr_debug("%s: Identified 8139 chip type '%s'\n", netdev_dbg(dev, "Identified 8139 chip type '%s'\n",
dev->name, rtl_chip_info[tp->chipset].name); rtl_chip_info[tp->chipset].name);
/* Find the connected MII xcvrs. /* Find the connected MII xcvrs.
Doing this in open() would allow detecting external xcvrs later, but Doing this in open() would allow detecting external xcvrs later, but
...@@ -1037,13 +1036,12 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -1037,13 +1036,12 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
if (mii_status != 0xffff && mii_status != 0x0000) { if (mii_status != 0xffff && mii_status != 0x0000) {
u16 advertising = mdio_read(dev, phy, 4); u16 advertising = mdio_read(dev, phy, 4);
tp->phys[phy_idx++] = phy; tp->phys[phy_idx++] = phy;
pr_info("%s: MII transceiver %d status 0x%4.4x advertising %4.4x.\n", netdev_info(dev, "MII transceiver %d status 0x%04x advertising %04x\n",
dev->name, phy, mii_status, advertising); phy, mii_status, advertising);
} }
} }
if (phy_idx == 0) { if (phy_idx == 0) {
pr_info("%s: No MII transceivers found! Assuming SYM transceiver.\n", netdev_info(dev, "No MII transceivers found! Assuming SYM transceiver\n");
dev->name);
tp->phys[0] = 32; tp->phys[0] = 32;
} }
} else } else
...@@ -1062,13 +1060,13 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, ...@@ -1062,13 +1060,13 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0) if (board_idx < MAX_UNITS && full_duplex[board_idx] > 0)
tp->mii.full_duplex = full_duplex[board_idx]; tp->mii.full_duplex = full_duplex[board_idx];
if (tp->mii.full_duplex) { if (tp->mii.full_duplex) {
pr_info("%s: Media type forced to Full Duplex.\n", dev->name); netdev_info(dev, "Media type forced to Full Duplex\n");
/* Changing the MII-advertised media because might prevent /* Changing the MII-advertised media because might prevent
re-connection. */ re-connection. */
tp->mii.force_media = 1; tp->mii.force_media = 1;
} }
if (tp->default_port) { if (tp->default_port) {
pr_info(" Forcing %dMbps %s-duplex operation.\n", netdev_info(dev, " Forcing %dMbps %s-duplex operation\n",
(option & 0x20 ? 100 : 10), (option & 0x20 ? 100 : 10),
(option & 0x10 ? "full" : "half")); (option & 0x10 ? "full" : "half"));
mdio_write(dev, tp->phys[0], 0, mdio_write(dev, tp->phys[0], 0,
...@@ -1330,9 +1328,9 @@ static int rtl8139_open (struct net_device *dev) ...@@ -1330,9 +1328,9 @@ static int rtl8139_open (struct net_device *dev)
rtl8139_hw_start (dev); rtl8139_hw_start (dev);
netif_start_queue (dev); netif_start_queue (dev);
if (netif_msg_ifup(tp)) netif_dbg(tp, ifup, dev,
pr_debug("%s: rtl8139_open() ioaddr %#llx IRQ %d" "%s() ioaddr %#llx IRQ %d GP Pins %02x %s-duplex\n",
" GP Pins %2.2x %s-duplex.\n", dev->name, __func__,
(unsigned long long)pci_resource_start (tp->pci_dev, 1), (unsigned long long)pci_resource_start (tp->pci_dev, 1),
dev->irq, RTL_R8 (MediaStatus), dev->irq, RTL_R8 (MediaStatus),
tp->mii.full_duplex ? "full" : "half"); tp->mii.full_duplex ? "full" : "half");
...@@ -1393,7 +1391,7 @@ static void rtl8139_hw_start (struct net_device *dev) ...@@ -1393,7 +1391,7 @@ static void rtl8139_hw_start (struct net_device *dev)
RTL_W8 (Config3, RTL_R8 (Config3) & ~Cfg3_Magic); RTL_W8 (Config3, RTL_R8 (Config3) & ~Cfg3_Magic);
} }
pr_debug("init buffer addresses\n"); netdev_dbg(dev, "init buffer addresses\n");
/* Lock Config[01234] and BMCR register writes */ /* Lock Config[01234] and BMCR register writes */
RTL_W8 (Cfg9346, Cfg9346_Lock); RTL_W8 (Cfg9346, Cfg9346_Lock);
...@@ -1555,14 +1553,11 @@ static inline void rtl8139_thread_iter (struct net_device *dev, ...@@ -1555,14 +1553,11 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
tp->mii.full_duplex = duplex; tp->mii.full_duplex = duplex;
if (mii_lpa) { if (mii_lpa) {
pr_info("%s: Setting %s-duplex based on MII #%d link" netdev_info(dev, "Setting %s-duplex based on MII #%d link partner ability of %04x\n",
" partner ability of %4.4x.\n",
dev->name,
tp->mii.full_duplex ? "full" : "half", tp->mii.full_duplex ? "full" : "half",
tp->phys[0], mii_lpa); tp->phys[0], mii_lpa);
} else { } else {
pr_info("%s: media is unconnected, link down, or incompatible connection\n", netdev_info(dev, "media is unconnected, link down, or incompatible connection\n");
dev->name);
} }
#if 0 #if 0
RTL_W8 (Cfg9346, Cfg9346_Unlock); RTL_W8 (Cfg9346, Cfg9346_Unlock);
...@@ -1576,13 +1571,12 @@ static inline void rtl8139_thread_iter (struct net_device *dev, ...@@ -1576,13 +1571,12 @@ static inline void rtl8139_thread_iter (struct net_device *dev,
rtl8139_tune_twister (dev, tp); rtl8139_tune_twister (dev, tp);
pr_debug("%s: Media selection tick, Link partner %4.4x.\n", netdev_dbg(dev, "Media selection tick, Link partner %04x\n",
dev->name, RTL_R16 (NWayLPAR)); RTL_R16(NWayLPAR));
pr_debug("%s: Other registers are IntMask %4.4x IntStatus %4.4x\n", netdev_dbg(dev, "Other registers are IntMask %04x IntStatus %04x\n",
dev->name, RTL_R16 (IntrMask), RTL_R16 (IntrStatus)); RTL_R16(IntrMask), RTL_R16(IntrStatus));
pr_debug("%s: Chip config %2.2x %2.2x.\n", netdev_dbg(dev, "Chip config %02x %02x\n",
dev->name, RTL_R8 (Config0), RTL_R8(Config0), RTL_R8(Config1));
RTL_R8 (Config1));
} }
static void rtl8139_thread (struct work_struct *work) static void rtl8139_thread (struct work_struct *work)
...@@ -1640,15 +1634,15 @@ static void rtl8139_tx_timeout_task (struct work_struct *work) ...@@ -1640,15 +1634,15 @@ static void rtl8139_tx_timeout_task (struct work_struct *work)
int i; int i;
u8 tmp8; u8 tmp8;
pr_debug("%s: Transmit timeout, status %2.2x %4.4x %4.4x media %2.2x.\n", netdev_dbg(dev, "Transmit timeout, status %02x %04x %04x media %02x\n",
dev->name, RTL_R8 (ChipCmd), RTL_R8(ChipCmd), RTL_R16(IntrStatus),
RTL_R16(IntrStatus), RTL_R16(IntrMask), RTL_R8(MediaStatus)); RTL_R16(IntrMask), RTL_R8(MediaStatus));
/* Emit info to figure out what went wrong. */ /* Emit info to figure out what went wrong. */
pr_debug("%s: Tx queue start entry %ld dirty entry %ld.\n", netdev_dbg(dev, "Tx queue start entry %ld dirty entry %ld\n",
dev->name, tp->cur_tx, tp->dirty_tx); tp->cur_tx, tp->dirty_tx);
for (i = 0; i < NUM_TX_DESC; i++) for (i = 0; i < NUM_TX_DESC; i++)
pr_debug("%s: Tx descriptor %d is %8.8lx.%s\n", netdev_dbg(dev, "Tx descriptor %d is %08lx%s\n",
dev->name, i, RTL_R32 (TxStatus0 + (i * 4)), i, RTL_R32(TxStatus0 + (i * 4)),
i == tp->dirty_tx % NUM_TX_DESC ? i == tp->dirty_tx % NUM_TX_DESC ?
" (queue head)" : ""); " (queue head)" : "");
...@@ -1729,9 +1723,8 @@ static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb, ...@@ -1729,9 +1723,8 @@ static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
netif_stop_queue (dev); netif_stop_queue (dev);
spin_unlock_irqrestore(&tp->lock, flags); spin_unlock_irqrestore(&tp->lock, flags);
if (netif_msg_tx_queued(tp)) netif_dbg(tp, tx_queued, dev, "Queued Tx packet size %u to slot %d\n",
pr_debug("%s: Queued Tx packet size %u to slot %d.\n", len, entry);
dev->name, len, entry);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -1760,9 +1753,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev, ...@@ -1760,9 +1753,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev,
/* Note: TxCarrierLost is always asserted at 100mbps. */ /* Note: TxCarrierLost is always asserted at 100mbps. */
if (txstatus & (TxOutOfWindow | TxAborted)) { if (txstatus & (TxOutOfWindow | TxAborted)) {
/* There was an major error, log it. */ /* There was an major error, log it. */
if (netif_msg_tx_err(tp)) netif_dbg(tp, tx_err, dev, "Transmit error, Tx status %08x\n",
pr_debug("%s: Transmit error, Tx status %8.8x.\n", txstatus);
dev->name, txstatus);
dev->stats.tx_errors++; dev->stats.tx_errors++;
if (txstatus & TxAborted) { if (txstatus & TxAborted) {
dev->stats.tx_aborted_errors++; dev->stats.tx_aborted_errors++;
...@@ -1792,8 +1784,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev, ...@@ -1792,8 +1784,8 @@ static void rtl8139_tx_interrupt (struct net_device *dev,
#ifndef RTL8139_NDEBUG #ifndef RTL8139_NDEBUG
if (tp->cur_tx - dirty_tx > NUM_TX_DESC) { if (tp->cur_tx - dirty_tx > NUM_TX_DESC) {
pr_err("%s: Out-of-sync dirty pointer, %ld vs. %ld.\n", netdev_err(dev, "Out-of-sync dirty pointer, %ld vs. %ld\n",
dev->name, dirty_tx, tp->cur_tx); dirty_tx, tp->cur_tx);
dirty_tx += NUM_TX_DESC; dirty_tx += NUM_TX_DESC;
} }
#endif /* RTL8139_NDEBUG */ #endif /* RTL8139_NDEBUG */
...@@ -1816,14 +1808,13 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, ...@@ -1816,14 +1808,13 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
int tmp_work; int tmp_work;
#endif #endif
if (netif_msg_rx_err (tp)) netif_dbg(tp, rx_err, dev, "Ethernet frame had errors, status %08x\n",
pr_debug("%s: Ethernet frame had errors, status %8.8x.\n", rx_status);
dev->name, rx_status);
dev->stats.rx_errors++; dev->stats.rx_errors++;
if (!(rx_status & RxStatusOK)) { if (!(rx_status & RxStatusOK)) {
if (rx_status & RxTooLong) { if (rx_status & RxTooLong) {
pr_debug("%s: Oversized Ethernet frame, status %4.4x!\n", netdev_dbg(dev, "Oversized Ethernet frame, status %04x!\n",
dev->name, rx_status); rx_status);
/* A.C.: The chip hangs here. */ /* A.C.: The chip hangs here. */
} }
if (rx_status & (RxBadSymbol | RxBadAlign)) if (rx_status & (RxBadSymbol | RxBadAlign))
...@@ -1855,7 +1846,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, ...@@ -1855,7 +1846,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
break; break;
} }
if (tmp_work <= 0) if (tmp_work <= 0)
pr_warning(PFX "rx stop wait too long\n"); netdev_warn(dev, "rx stop wait too long\n");
/* restart receive */ /* restart receive */
tmp_work = 200; tmp_work = 200;
while (--tmp_work > 0) { while (--tmp_work > 0) {
...@@ -1866,7 +1857,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, ...@@ -1866,7 +1857,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
break; break;
} }
if (tmp_work <= 0) if (tmp_work <= 0)
pr_warning(PFX "tx/rx enable wait too long\n"); netdev_warn(dev, "tx/rx enable wait too long\n");
/* and reinitialize all rx related registers */ /* and reinitialize all rx related registers */
RTL_W8_F (Cfg9346, Cfg9346_Unlock); RTL_W8_F (Cfg9346, Cfg9346_Unlock);
...@@ -1877,7 +1868,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, ...@@ -1877,7 +1868,7 @@ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev,
RTL_W32 (RxConfig, tp->rx_config); RTL_W32 (RxConfig, tp->rx_config);
tp->cur_rx = 0; tp->cur_rx = 0;
pr_debug("init buffer addresses\n"); netdev_dbg(dev, "init buffer addresses\n");
/* Lock Config[01234] and BMCR register writes */ /* Lock Config[01234] and BMCR register writes */
RTL_W8 (Cfg9346, Cfg9346_Lock); RTL_W8 (Cfg9346, Cfg9346_Lock);
...@@ -1931,10 +1922,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, ...@@ -1931,10 +1922,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
unsigned int cur_rx = tp->cur_rx; unsigned int cur_rx = tp->cur_rx;
unsigned int rx_size = 0; unsigned int rx_size = 0;
pr_debug("%s: In rtl8139_rx(), current %4.4x BufAddr %4.4x," netdev_dbg(dev, "In %s(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
" free to %4.4x, Cmd %2.2x.\n", dev->name, (u16)cur_rx, __func__, (u16)cur_rx,
RTL_R16 (RxBufAddr), RTL_R16(RxBufAddr), RTL_R16(RxBufPtr), RTL_R8(ChipCmd));
RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
while (netif_running(dev) && received < budget && while (netif_running(dev) && received < budget &&
(RTL_R8 (ChipCmd) & RxBufEmpty) == 0) { (RTL_R8 (ChipCmd) & RxBufEmpty) == 0) {
...@@ -1950,19 +1940,12 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, ...@@ -1950,19 +1940,12 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
rx_size = rx_status >> 16; rx_size = rx_status >> 16;
pkt_size = rx_size - 4; pkt_size = rx_size - 4;
if (netif_msg_rx_status(tp)) netif_dbg(tp, rx_status, dev, "%s() status %04x, size %04x, cur %04x\n",
pr_debug("%s: rtl8139_rx() status %4.4x, size %4.4x," __func__, rx_status, rx_size, cur_rx);
" cur %4.4x.\n", dev->name, rx_status,
rx_size, cur_rx);
#if RTL8139_DEBUG > 2 #if RTL8139_DEBUG > 2
{ print_dump_hex(KERN_DEBUG, "Frame contents: ",
int i; DUMP_PREFIX_OFFSET, 16, 1,
pr_debug("%s: Frame contents ", dev->name); &rx_ring[ring_offset], 70, true);
for (i = 0; i < 70; i++)
pr_cont(" %2.2x",
rx_ring[ring_offset + i]);
pr_cont(".\n");
}
#endif #endif
/* Packet copy from FIFO still in progress. /* Packet copy from FIFO still in progress.
...@@ -1973,14 +1956,11 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, ...@@ -1973,14 +1956,11 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
if (!tp->fifo_copy_timeout) if (!tp->fifo_copy_timeout)
tp->fifo_copy_timeout = jiffies + 2; tp->fifo_copy_timeout = jiffies + 2;
else if (time_after(jiffies, tp->fifo_copy_timeout)) { else if (time_after(jiffies, tp->fifo_copy_timeout)) {
pr_debug("%s: hung FIFO. Reset.", dev->name); netdev_dbg(dev, "hung FIFO. Reset\n");
rx_size = 0; rx_size = 0;
goto no_early_rx; goto no_early_rx;
} }
if (netif_msg_intr(tp)) { netif_dbg(tp, intr, dev, "fifo copy in progress\n");
pr_debug("%s: fifo copy in progress.",
dev->name);
}
tp->xstats.early_rx++; tp->xstats.early_rx++;
break; break;
} }
...@@ -2021,8 +2001,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, ...@@ -2021,8 +2001,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
netif_receive_skb (skb); netif_receive_skb (skb);
} else { } else {
if (net_ratelimit()) if (net_ratelimit())
pr_warning("%s: Memory squeeze, dropping packet.\n", netdev_warn(dev, "Memory squeeze, dropping packet\n");
dev->name);
dev->stats.rx_dropped++; dev->stats.rx_dropped++;
} }
received++; received++;
...@@ -2036,10 +2015,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, ...@@ -2036,10 +2015,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
if (unlikely(!received || rx_size == 0xfff0)) if (unlikely(!received || rx_size == 0xfff0))
rtl8139_isr_ack(tp); rtl8139_isr_ack(tp);
pr_debug("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," netdev_dbg(dev, "Done %s(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
" free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx, __func__, cur_rx,
RTL_R16 (RxBufAddr), RTL_R16(RxBufAddr), RTL_R16(RxBufPtr), RTL_R8(ChipCmd));
RTL_R16 (RxBufPtr), RTL_R8 (ChipCmd));
tp->cur_rx = cur_rx; tp->cur_rx = cur_rx;
...@@ -2060,8 +2038,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev, ...@@ -2060,8 +2038,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev,
void __iomem *ioaddr, void __iomem *ioaddr,
int status, int link_changed) int status, int link_changed)
{ {
pr_debug("%s: Abnormal interrupt, status %8.8x.\n", netdev_dbg(dev, "Abnormal interrupt, status %08x\n", status);
dev->name, status);
assert (dev != NULL); assert (dev != NULL);
assert (tp != NULL); assert (tp != NULL);
...@@ -2089,8 +2066,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev, ...@@ -2089,8 +2066,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev,
pci_read_config_word (tp->pci_dev, PCI_STATUS, &pci_cmd_status); pci_read_config_word (tp->pci_dev, PCI_STATUS, &pci_cmd_status);
pci_write_config_word (tp->pci_dev, PCI_STATUS, pci_cmd_status); pci_write_config_word (tp->pci_dev, PCI_STATUS, pci_cmd_status);
pr_err("%s: PCI Bus error %4.4x.\n", netdev_err(dev, "PCI Bus error %04x\n", pci_cmd_status);
dev->name, pci_cmd_status);
} }
} }
...@@ -2183,8 +2159,8 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance) ...@@ -2183,8 +2159,8 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance)
out: out:
spin_unlock (&tp->lock); spin_unlock (&tp->lock);
pr_debug("%s: exiting interrupt, intr_status=%#4.4x.\n", netdev_dbg(dev, "exiting interrupt, intr_status=%#4.4x\n",
dev->name, RTL_R16 (IntrStatus)); RTL_R16(IntrStatus));
return IRQ_RETVAL(handled); return IRQ_RETVAL(handled);
} }
...@@ -2233,9 +2209,8 @@ static int rtl8139_close (struct net_device *dev) ...@@ -2233,9 +2209,8 @@ static int rtl8139_close (struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
napi_disable(&tp->napi); napi_disable(&tp->napi);
if (netif_msg_ifdown(tp)) netif_dbg(tp, ifdown, dev, "Shutting down ethercard, status was 0x%04x\n",
pr_debug("%s: Shutting down ethercard, status was 0x%4.4x.\n", RTL_R16(IntrStatus));
dev->name, RTL_R16 (IntrStatus));
spin_lock_irqsave (&tp->lock, flags); spin_lock_irqsave (&tp->lock, flags);
...@@ -2512,8 +2487,8 @@ static void __set_rx_mode (struct net_device *dev) ...@@ -2512,8 +2487,8 @@ static void __set_rx_mode (struct net_device *dev)
int rx_mode; int rx_mode;
u32 tmp; u32 tmp;
pr_debug("%s: rtl8139_set_rx_mode(%4.4x) done -- Rx config %8.8lx.\n", netdev_dbg(dev, "rtl8139_set_rx_mode(%04x) done -- Rx config %08lx\n",
dev->name, dev->flags, RTL_R32 (RxConfig)); dev->flags, RTL_R32(RxConfig));
/* Note: do not reorder, GCC is clever about common statements. */ /* Note: do not reorder, GCC is clever about common statements. */
if (dev->flags & IFF_PROMISC) { if (dev->flags & IFF_PROMISC) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment