drivers/net/pci-skeleton.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> Checkpatch cleaning Convert formats like 0x%08x to %#08x Remove periods from formats Coalesce long formats Use print_hex_dump Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ddf79b20ee
commit
9cd31f078e
@@ -85,6 +85,8 @@ IVc. Errata
|
||||
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
@@ -96,12 +98,11 @@ IVc. Errata
|
||||
#include <linux/ethtool.h>
|
||||
#include <linux/mii.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#define NETDRV_VERSION "1.0.1"
|
||||
#define MODNAME "netdrv"
|
||||
#define NETDRV_DRIVER_LOAD_MSG "MyVendor Fast Ethernet driver " NETDRV_VERSION " loaded"
|
||||
#define PFX MODNAME ": "
|
||||
|
||||
static char version[] __devinitdata =
|
||||
KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n"
|
||||
@@ -119,9 +120,14 @@ KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n"
|
||||
|
||||
#ifdef NETDRV_DEBUG
|
||||
/* note: prints function name for you */
|
||||
# define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
|
||||
#define DPRINTK(fmt, args...) \
|
||||
printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
|
||||
#else
|
||||
# define DPRINTK(fmt, args...)
|
||||
#define DPRINTK(fmt, args...) \
|
||||
do { \
|
||||
if (0) \
|
||||
printk(KERN_DEBUG fmt, ##args); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifdef NETDRV_NDEBUG
|
||||
@@ -167,7 +173,9 @@ static int multicast_filter_limit = 32;
|
||||
Threshold is bytes transferred to chip before transmission starts. */
|
||||
#define TX_FIFO_THRESH 256 /* In bytes, rounded down to 32 byte units. */
|
||||
|
||||
/* The following settings are log_2(bytes)-4: 0 == 16 bytes .. 6==1024, 7==end of packet. */
|
||||
/* The following settings are log_2(bytes)-4:
|
||||
0==16 bytes 1==32 2==64 3==128 4==256 5==512 6==1024 7==end of packet.
|
||||
*/
|
||||
#define RX_FIFO_THRESH 6 /* Rx buffer level before first PCI xfer. */
|
||||
#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
|
||||
#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */
|
||||
@@ -177,7 +185,6 @@ static int multicast_filter_limit = 32;
|
||||
/* Time in jiffies before concluding the transmitter is hung. */
|
||||
#define TX_TIMEOUT (6 * HZ)
|
||||
|
||||
|
||||
enum {
|
||||
HAS_CHIP_XCVR = 0x020000,
|
||||
HAS_LNK_CHNG = 0x040000,
|
||||
@@ -186,7 +193,7 @@ enum {
|
||||
#define NETDRV_MIN_IO_SIZE 0x80
|
||||
#define RTL8139B_IO_SIZE 256
|
||||
|
||||
#define NETDRV_CAPS HAS_CHIP_XCVR|HAS_LNK_CHNG
|
||||
#define NETDRV_CAPS (HAS_CHIP_XCVR | HAS_LNK_CHNG)
|
||||
|
||||
typedef enum {
|
||||
RTL8139 = 0,
|
||||
@@ -487,9 +494,12 @@ MODULE_LICENSE("GPL");
|
||||
module_param(multicast_filter_limit, int, 0);
|
||||
module_param(max_interrupt_work, int, 0);
|
||||
module_param_array(media, int, NULL, 0);
|
||||
MODULE_PARM_DESC (multicast_filter_limit, "pci-skeleton maximum number of filtered multicast addresses");
|
||||
MODULE_PARM_DESC (max_interrupt_work, "pci-skeleton maximum events handled per interrupt");
|
||||
MODULE_PARM_DESC (media, "pci-skeleton: Bits 0-3: media type, bit 17: full duplex");
|
||||
MODULE_PARM_DESC(multicast_filter_limit,
|
||||
MODNAME " maximum number of filtered multicast addresses");
|
||||
MODULE_PARM_DESC(max_interrupt_work,
|
||||
MODNAME " maximum events handled per interrupt");
|
||||
MODULE_PARM_DESC(media,
|
||||
MODNAME " Bits 0-3: media type, bit 17: full duplex");
|
||||
|
||||
static int read_eeprom(void *ioaddr, int location, int addr_len);
|
||||
static int netdrv_open(struct net_device *dev);
|
||||
@@ -536,9 +546,21 @@ static void netdrv_hw_start (struct net_device *dev);
|
||||
|
||||
/* write MMIO register, with flush */
|
||||
/* Flush avoids rtl8139 bug w/ posted MMIO writes */
|
||||
#define NETDRV_W8_F(reg, val8) do { writeb ((val8), ioaddr + (reg)); readb (ioaddr + (reg)); } while (0)
|
||||
#define NETDRV_W16_F(reg, val16) do { writew ((val16), ioaddr + (reg)); readw (ioaddr + (reg)); } while (0)
|
||||
#define NETDRV_W32_F(reg, val32) do { writel ((val32), ioaddr + (reg)); readl (ioaddr + (reg)); } while (0)
|
||||
#define NETDRV_W8_F(reg, val8) \
|
||||
do { \
|
||||
writeb((val8), ioaddr + (reg)); \
|
||||
readb(ioaddr + (reg)); \
|
||||
} while (0)
|
||||
#define NETDRV_W16_F(reg, val16) \
|
||||
do { \
|
||||
writew((val16), ioaddr + (reg)); \
|
||||
readw(ioaddr + (reg)); \
|
||||
} while (0)
|
||||
#define NETDRV_W32_F(reg, val32) \
|
||||
do { \
|
||||
writel((val32), ioaddr + (reg)); \
|
||||
readl(ioaddr + (reg)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#ifdef MMIO_FLUSH_AUDIT_COMPLETE
|
||||
@@ -622,8 +644,8 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||
|
||||
/* set this immediately, we need to know before
|
||||
* we talk to the chip directly */
|
||||
DPRINTK("PIO region size == 0x%02X\n", pio_len);
|
||||
DPRINTK("MMIO region size == 0x%02lX\n", mmio_len);
|
||||
DPRINTK("PIO region size == %#02X\n", pio_len);
|
||||
DPRINTK("MMIO region size == %#02lX\n", mmio_len);
|
||||
|
||||
/* make sure PCI base addr 0 is PIO */
|
||||
if (!(pio_flags & IORESOURCE_IO)) {
|
||||
@@ -697,15 +719,13 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
|
||||
dev_printk(KERN_DEBUG, &pdev->dev,
|
||||
"unknown chip version, assuming RTL-8139\n");
|
||||
dev_printk (KERN_DEBUG, &pdev->dev, "TxConfig = 0x%lx\n",
|
||||
dev_printk(KERN_DEBUG, &pdev->dev, "TxConfig = %#lx\n",
|
||||
NETDRV_R32(TxConfig));
|
||||
tp->chipset = 0;
|
||||
|
||||
match:
|
||||
DPRINTK("chipset id(%d) == index %d, '%s'\n",
|
||||
tmp,
|
||||
tp->chipset,
|
||||
rtl_chip_info[tp->chipset].name);
|
||||
tmp, tp->chipset, rtl_chip_info[tp->chipset].name);
|
||||
|
||||
rc = register_netdev(dev);
|
||||
if (rc)
|
||||
@@ -801,15 +821,12 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
|
||||
|
||||
tp->phys[0] = 32;
|
||||
|
||||
printk (KERN_INFO "%s: %s at 0x%lx, %pM IRQ %d\n",
|
||||
dev->name,
|
||||
netdev_info(dev, "%s at %#lx, %pM IRQ %d\n",
|
||||
board_info[ent->driver_data].name,
|
||||
dev->base_addr,
|
||||
dev->dev_addr,
|
||||
dev->irq);
|
||||
dev->base_addr, dev->dev_addr, dev->irq);
|
||||
|
||||
printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n",
|
||||
dev->name, rtl_chip_info[tp->chipset].name);
|
||||
netdev_printk(KERN_DEBUG, dev, "Identified 8139 chip type '%s'\n",
|
||||
rtl_chip_info[tp->chipset].name);
|
||||
|
||||
/* Put the chip into low-power mode. */
|
||||
NETDRV_W8_F(Cfg9346, Cfg9346_Unlock);
|
||||
@@ -824,9 +841,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
if (tp->full_duplex) {
|
||||
printk (KERN_INFO
|
||||
"%s: Media type forced to Full Duplex.\n",
|
||||
dev->name);
|
||||
netdev_info(dev, "Media type forced to Full Duplex\n");
|
||||
mdio_write(dev, tp->phys[0], MII_ADVERTISE, ADVERTISE_FULL);
|
||||
tp->duplex_lock = 1;
|
||||
}
|
||||
@@ -1006,9 +1021,8 @@ static int mdio_read (struct net_device *dev, int phy_id, int location)
|
||||
for (i = 19; i > 0; i--) {
|
||||
writeb(0, mdio_addr);
|
||||
mdio_delay();
|
||||
retval =
|
||||
(retval << 1) | ((readb (mdio_addr) & MDIO_DATA_IN) ? 1
|
||||
: 0);
|
||||
retval = ((retval << 1) | ((readb(mdio_addr) & MDIO_DATA_IN))
|
||||
? 1 : 0);
|
||||
writeb(MDIO_CLK, mdio_addr);
|
||||
mdio_delay();
|
||||
}
|
||||
@@ -1066,9 +1080,7 @@ static int netdrv_open (struct net_device *dev)
|
||||
{
|
||||
struct netdrv_private *tp = netdev_priv(dev);
|
||||
int retval;
|
||||
#ifdef NETDRV_DEBUG
|
||||
void *ioaddr = tp->mmio_addr;
|
||||
#endif
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
@@ -1103,9 +1115,8 @@ static int netdrv_open (struct net_device *dev)
|
||||
netdrv_init_ring(dev);
|
||||
netdrv_hw_start(dev);
|
||||
|
||||
DPRINTK ("%s: netdrv_open() ioaddr %#lx IRQ %d"
|
||||
" GP Pins %2.2x %s-duplex.\n",
|
||||
dev->name, pci_resource_start (tp->pci_dev, 1),
|
||||
netdev_dbg(dev, "ioaddr %#llx IRQ %d GP Pins %02x %s-duplex\n",
|
||||
(unsigned long long)pci_resource_start(tp->pci_dev, 1),
|
||||
dev->irq, NETDRV_R8(MediaStatus),
|
||||
tp->full_duplex ? "full" : "half");
|
||||
|
||||
@@ -1229,9 +1240,7 @@ static void netdrv_timer (unsigned long data)
|
||||
(mii_lpa & 0x01C0) == 0x0040);
|
||||
if (tp->full_duplex != duplex) {
|
||||
tp->full_duplex = duplex;
|
||||
printk (KERN_INFO
|
||||
"%s: Setting %s-duplex based on MII #%d link"
|
||||
" partner ability of %4.4x.\n", dev->name,
|
||||
netdev_info(dev, "Setting %s-duplex based on MII #%d link partner ability of %04x\n",
|
||||
tp->full_duplex ? "full" : "half",
|
||||
tp->phys[0], mii_lpa);
|
||||
NETDRV_W8(Cfg9346, Cfg9346_Unlock);
|
||||
@@ -1240,16 +1249,14 @@ static void netdrv_timer (unsigned long data)
|
||||
}
|
||||
}
|
||||
|
||||
DPRINTK ("%s: Media selection tick, Link partner %4.4x.\n",
|
||||
dev->name, NETDRV_R16 (NWayLPAR));
|
||||
DPRINTK ("%s: Other registers are IntMask %4.4x IntStatus %4.4x"
|
||||
" RxStatus %4.4x.\n", dev->name,
|
||||
netdev_dbg(dev, "Media selection tick, Link partner %04x\n",
|
||||
NETDRV_R16(NWayLPAR));
|
||||
netdev_dbg(dev, "Other registers are IntMask %04x IntStatus %04x RxStatus %04lx\n",
|
||||
NETDRV_R16(IntrMask),
|
||||
NETDRV_R16(IntrStatus),
|
||||
NETDRV_R32(RxEarlyStatus));
|
||||
DPRINTK ("%s: Chip config %2.2x %2.2x.\n",
|
||||
dev->name, NETDRV_R8 (Config0),
|
||||
NETDRV_R8 (Config1));
|
||||
netdev_dbg(dev, "Chip config %02x %02x\n",
|
||||
NETDRV_R8(Config0), NETDRV_R8(Config1));
|
||||
|
||||
tp->timer.expires = jiffies + next_tick;
|
||||
add_timer(&tp->timer);
|
||||
@@ -1289,8 +1296,7 @@ static void netdrv_tx_timeout (struct net_device *dev)
|
||||
u8 tmp8;
|
||||
unsigned long flags;
|
||||
|
||||
DPRINTK ("%s: Transmit timeout, status %2.2x %4.4x "
|
||||
"media %2.2x.\n", dev->name,
|
||||
netdev_dbg(dev, "Transmit timeout, status %02x %04x media %02x\n",
|
||||
NETDRV_R8(ChipCmd),
|
||||
NETDRV_R16(IntrStatus),
|
||||
NETDRV_R8(MediaStatus));
|
||||
@@ -1304,12 +1310,12 @@ static void netdrv_tx_timeout (struct net_device *dev)
|
||||
NETDRV_W16(IntrMask, 0x0000);
|
||||
|
||||
/* Emit info to figure out what went wrong. */
|
||||
printk (KERN_DEBUG "%s: Tx queue start entry %d dirty entry %d.\n",
|
||||
dev->name, atomic_read (&tp->cur_tx),
|
||||
netdev_dbg(dev, "Tx queue start entry %d dirty entry %d\n",
|
||||
atomic_read(&tp->cur_tx),
|
||||
atomic_read(&tp->dirty_tx));
|
||||
for (i = 0; i < NUM_TX_DESC; i++)
|
||||
printk (KERN_DEBUG "%s: Tx descriptor %d is %8.8lx.%s\n",
|
||||
dev->name, i, NETDRV_R32 (TxStatus0 + (i * 4)),
|
||||
netdev_dbg(dev, "Tx descriptor %d is %08lx%s\n",
|
||||
i, NETDRV_R32(TxStatus0 + (i * 4)),
|
||||
i == atomic_read(&tp->dirty_tx) % NUM_TX_DESC ?
|
||||
"(queue head)" : "");
|
||||
|
||||
@@ -1353,8 +1359,8 @@ static int netdrv_start_xmit (struct sk_buff *skb, struct net_device *dev)
|
||||
if ((atomic_read(&tp->cur_tx) - atomic_read(&tp->dirty_tx)) >= NUM_TX_DESC)
|
||||
netif_stop_queue(dev);
|
||||
|
||||
DPRINTK ("%s: Queued Tx packet at %p size %u to slot %d.\n",
|
||||
dev->name, skb->data, skb->len, entry);
|
||||
netdev_dbg(dev, "Queued Tx packet at %p size %u to slot %d\n",
|
||||
skb->data, skb->len, entry);
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
@@ -1386,8 +1392,8 @@ static void netdrv_tx_interrupt (struct net_device *dev,
|
||||
/* Note: TxCarrierLost is always asserted at 100mbps. */
|
||||
if (txstatus & (TxOutOfWindow | TxAborted)) {
|
||||
/* There was an major error, log it. */
|
||||
DPRINTK ("%s: Transmit error, Tx status %8.8x.\n",
|
||||
dev->name, txstatus);
|
||||
netdev_dbg(dev, "Transmit error, Tx status %#08x\n",
|
||||
txstatus);
|
||||
dev->stats.tx_errors++;
|
||||
if (txstatus & TxAborted) {
|
||||
dev->stats.tx_aborted_errors++;
|
||||
@@ -1434,9 +1440,8 @@ static void netdrv_tx_interrupt (struct net_device *dev,
|
||||
|
||||
#ifndef NETDRV_NDEBUG
|
||||
if (atomic_read(&tp->cur_tx) - dirty_tx > NUM_TX_DESC) {
|
||||
printk (KERN_ERR
|
||||
"%s: Out-of-sync dirty pointer, %d vs. %d.\n",
|
||||
dev->name, dirty_tx, atomic_read (&tp->cur_tx));
|
||||
netdev_err(dev, "Out-of-sync dirty pointer, %d vs. %d\n",
|
||||
dirty_tx, atomic_read(&tp->cur_tx));
|
||||
dirty_tx += NUM_TX_DESC;
|
||||
}
|
||||
#endif /* NETDRV_NDEBUG */
|
||||
@@ -1452,13 +1457,11 @@ static void netdrv_rx_err (u32 rx_status, struct net_device *dev,
|
||||
u8 tmp8;
|
||||
int tmp_work = 1000;
|
||||
|
||||
DPRINTK ("%s: Ethernet frame had errors, status %8.8x.\n",
|
||||
dev->name, rx_status);
|
||||
if (rx_status & RxTooLong) {
|
||||
DPRINTK ("%s: Oversized Ethernet frame, status %4.4x!\n",
|
||||
dev->name, rx_status);
|
||||
netdev_dbg(dev, "Ethernet frame had errors, status %08x\n", rx_status);
|
||||
if (rx_status & RxTooLong)
|
||||
netdev_dbg(dev, "Oversized Ethernet frame, status %04x!\n",
|
||||
rx_status);
|
||||
/* A.C.: The chip hangs here. */
|
||||
}
|
||||
dev->stats.rx_errors++;
|
||||
if (rx_status & (RxBadSymbol | RxBadAlign))
|
||||
dev->stats.rx_frame_errors++;
|
||||
@@ -1491,7 +1494,7 @@ static void netdrv_rx_err (u32 rx_status, struct net_device *dev,
|
||||
netdrv_set_rx_mode(dev);
|
||||
|
||||
if (tmp_work <= 0)
|
||||
printk (KERN_WARNING PFX "tx/rx enable wait too long\n");
|
||||
netdev_warn(dev, "tx/rx enable wait too long\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -1510,9 +1513,8 @@ static void netdrv_rx_interrupt (struct net_device *dev,
|
||||
rx_ring = tp->rx_ring;
|
||||
cur_rx = tp->cur_rx;
|
||||
|
||||
DPRINTK ("%s: In netdrv_rx(), current %4.4x BufAddr %4.4x,"
|
||||
" free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx,
|
||||
NETDRV_R16 (RxBufAddr),
|
||||
netdev_dbg(dev, "In netdrv_rx(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
|
||||
cur_rx, NETDRV_R16(RxBufAddr),
|
||||
NETDRV_R16(RxBufPtr), NETDRV_R8(ChipCmd));
|
||||
|
||||
while ((NETDRV_R8(ChipCmd) & RxBufEmpty) == 0) {
|
||||
@@ -1527,18 +1529,11 @@ static void netdrv_rx_interrupt (struct net_device *dev,
|
||||
rx_size = rx_status >> 16;
|
||||
pkt_size = rx_size - 4;
|
||||
|
||||
DPRINTK ("%s: netdrv_rx() status %4.4x, size %4.4x,"
|
||||
" cur %4.4x.\n", dev->name, rx_status,
|
||||
rx_size, cur_rx);
|
||||
netdev_dbg(dev, "netdrv_rx() status %04x, size %04x, cur %04x\n",
|
||||
rx_status, rx_size, cur_rx);
|
||||
#if defined(NETDRV_DEBUG) && (NETDRV_DEBUG > 2)
|
||||
{
|
||||
int i;
|
||||
DPRINTK ("%s: Frame contents ", dev->name);
|
||||
for (i = 0; i < 70; i++)
|
||||
printk (" %2.2x",
|
||||
rx_ring[ring_offset + i]);
|
||||
printk (".\n");
|
||||
}
|
||||
print_hex_dump_bytes("Frame contents: ", HEX_DUMP_OFFSET,
|
||||
&rx_ring[ring_offset], 70);
|
||||
#endif
|
||||
|
||||
/* If Rx err or invalid rx_size/rx_status received
|
||||
@@ -1573,9 +1568,7 @@ static void netdrv_rx_interrupt (struct net_device *dev,
|
||||
dev->stats.rx_bytes += pkt_size;
|
||||
dev->stats.rx_packets++;
|
||||
} else {
|
||||
printk (KERN_WARNING
|
||||
"%s: Memory squeeze, dropping packet.\n",
|
||||
dev->name);
|
||||
netdev_warn(dev, "Memory squeeze, dropping packet\n");
|
||||
dev->stats.rx_dropped++;
|
||||
}
|
||||
|
||||
@@ -1583,9 +1576,8 @@ static void netdrv_rx_interrupt (struct net_device *dev,
|
||||
NETDRV_W16_F(RxBufPtr, cur_rx - 16);
|
||||
}
|
||||
|
||||
DPRINTK ("%s: Done netdrv_rx(), current %4.4x BufAddr %4.4x,"
|
||||
" free to %4.4x, Cmd %2.2x.\n", dev->name, cur_rx,
|
||||
NETDRV_R16 (RxBufAddr),
|
||||
netdev_dbg(dev, "Done netdrv_rx(), current %04x BufAddr %04x, free to %04x, Cmd %02x\n",
|
||||
cur_rx, NETDRV_R16(RxBufAddr),
|
||||
NETDRV_R16(RxBufPtr), NETDRV_R8(ChipCmd));
|
||||
|
||||
tp->cur_rx = cur_rx;
|
||||
@@ -1597,8 +1589,8 @@ static void netdrv_weird_interrupt (struct net_device *dev,
|
||||
void *ioaddr,
|
||||
int status, int link_changed)
|
||||
{
|
||||
printk (KERN_DEBUG "%s: Abnormal interrupt, status %8.8x.\n",
|
||||
dev->name, status);
|
||||
netdev_printk(KERN_DEBUG, dev, "Abnormal interrupt, status %08x\n",
|
||||
status);
|
||||
|
||||
assert(dev != NULL);
|
||||
assert(tp != NULL);
|
||||
@@ -1624,8 +1616,7 @@ static void netdrv_weird_interrupt (struct net_device *dev,
|
||||
}
|
||||
|
||||
/* XXX along with netdrv_rx_err, are we double-counting errors? */
|
||||
if (status &
|
||||
(RxUnderrun | RxOverflow | RxErr | RxFIFOOver))
|
||||
if (status & (RxUnderrun | RxOverflow | RxErr | RxFIFOOver))
|
||||
dev->stats.rx_errors++;
|
||||
|
||||
if (status & (PCSTimeout))
|
||||
@@ -1641,8 +1632,7 @@ static void netdrv_weird_interrupt (struct net_device *dev,
|
||||
u16 pci_cmd_status;
|
||||
pci_read_config_word(tp->pci_dev, PCI_STATUS, &pci_cmd_status);
|
||||
|
||||
printk (KERN_ERR "%s: PCI Bus error %4.4x.\n",
|
||||
dev->name, pci_cmd_status);
|
||||
netdev_err(dev, "PCI Bus error %04x\n", pci_cmd_status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1671,9 +1661,8 @@ static irqreturn_t netdrv_interrupt (int irq, void *dev_instance)
|
||||
/* Acknowledge all of the current interrupt sources ASAP */
|
||||
NETDRV_W16_F(IntrStatus, status);
|
||||
|
||||
DPRINTK ("%s: interrupt status=%#4.4x new intstat=%#4.4x.\n",
|
||||
dev->name, status,
|
||||
NETDRV_R16 (IntrStatus));
|
||||
netdev_dbg(dev, "interrupt status=%#04x new intstat=%#04x\n",
|
||||
status, NETDRV_R16(IntrStatus));
|
||||
|
||||
if ((status &
|
||||
(PCIErr | PCSTimeout | RxUnderrun | RxOverflow |
|
||||
@@ -1696,9 +1685,7 @@ static irqreturn_t netdrv_interrupt (int irq, void *dev_instance)
|
||||
} while (boguscnt > 0);
|
||||
|
||||
if (boguscnt <= 0) {
|
||||
printk (KERN_WARNING
|
||||
"%s: Too much work at interrupt, "
|
||||
"IntrStatus=0x%4.4x.\n", dev->name,
|
||||
netdev_warn(dev, "Too much work at interrupt, IntrStatus=%#04x\n",
|
||||
status);
|
||||
|
||||
/* Clear all interrupt sources. */
|
||||
@@ -1707,8 +1694,8 @@ static irqreturn_t netdrv_interrupt (int irq, void *dev_instance)
|
||||
|
||||
spin_unlock(&tp->lock);
|
||||
|
||||
DPRINTK ("%s: exiting interrupt, intr_status=%#4.4x.\n",
|
||||
dev->name, NETDRV_R16 (IntrStatus));
|
||||
netdev_dbg(dev, "exiting interrupt, intr_status=%#04x\n",
|
||||
NETDRV_R16(IntrStatus));
|
||||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
@@ -1723,8 +1710,8 @@ static int netdrv_close (struct net_device *dev)
|
||||
|
||||
netif_stop_queue(dev);
|
||||
|
||||
DPRINTK ("%s: Shutting down ethercard, status was 0x%4.4x.\n",
|
||||
dev->name, NETDRV_R16 (IntrStatus));
|
||||
netdev_dbg(dev, "Shutting down ethercard, status was %#04x\n",
|
||||
NETDRV_R16(IntrStatus));
|
||||
|
||||
del_timer_sync(&tp->timer);
|
||||
|
||||
@@ -1811,8 +1798,8 @@ static void netdrv_set_rx_mode (struct net_device *dev)
|
||||
|
||||
DPRINTK("ENTER\n");
|
||||
|
||||
DPRINTK ("%s: netdrv_set_rx_mode(%4.4x) done -- Rx config %8.8x.\n",
|
||||
dev->name, dev->flags, NETDRV_R32 (RxConfig));
|
||||
netdev_dbg(dev, "%s(%04x) done -- Rx config %08lx\n",
|
||||
__func__, dev->flags, NETDRV_R32(RxConfig));
|
||||
|
||||
/* Note: do not reorder, GCC is clever about common statements. */
|
||||
if (dev->flags & IFF_PROMISC) {
|
||||
|
Reference in New Issue
Block a user