Commit 3b4e5551 authored by Joe Perches's avatar Joe Perches Committed by Michael Grzeschik

arcnet: Coalesce string fragments

Using coalesced strings helps grep for specific messages.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
parent 7f5e760c
...@@ -90,13 +90,11 @@ static int __init arcrimi_probe(struct net_device *dev) ...@@ -90,13 +90,11 @@ static int __init arcrimi_probe(struct net_device *dev)
dev->dev_addr[0], dev->mem_start, dev->irq); dev->dev_addr[0], dev->mem_start, dev->irq);
if (dev->mem_start <= 0 || dev->irq <= 0) { if (dev->mem_start <= 0 || dev->irq <= 0) {
BUGLVL(D_NORMAL) printk("No autoprobe for RIM I; you " BUGLVL(D_NORMAL) printk("No autoprobe for RIM I; you must specify the shmem and irq!\n");
"must specify the shmem and irq!\n");
return -ENODEV; return -ENODEV;
} }
if (dev->dev_addr[0] == 0) { if (dev->dev_addr[0] == 0) {
BUGLVL(D_NORMAL) printk("You need to specify your card's station " BUGLVL(D_NORMAL) printk("You need to specify your card's station ID!\n");
"ID!\n");
return -ENODEV; return -ENODEV;
} }
/* /*
...@@ -225,8 +223,7 @@ static int __init arcrimi_found(struct net_device *dev) ...@@ -225,8 +223,7 @@ static int __init arcrimi_found(struct net_device *dev)
/* get and check the station ID from offset 1 in shmem */ /* get and check the station ID from offset 1 in shmem */
dev->dev_addr[0] = readb(lp->mem_start + 1); dev->dev_addr[0] = readb(lp->mem_start + 1);
BUGMSG(D_NORMAL, "ARCnet RIM I: station %02Xh found at IRQ %d, " BUGMSG(D_NORMAL, "ARCnet RIM I: station %02Xh found at IRQ %d, ShMem %lXh (%ld*%d bytes)\n",
"ShMem %lXh (%ld*%d bytes).\n",
dev->dev_addr[0], dev->dev_addr[0],
dev->irq, dev->mem_start, dev->irq, dev->mem_start,
(dev->mem_end - dev->mem_start + 1) / mirror_size, mirror_size); (dev->mem_end - dev->mem_start + 1) / mirror_size, mirror_size);
......
...@@ -416,11 +416,9 @@ int arcnet_open(struct net_device *dev) ...@@ -416,11 +416,9 @@ int arcnet_open(struct net_device *dev)
lp->hw.open(dev); lp->hw.open(dev);
if (dev->dev_addr[0] == 0) if (dev->dev_addr[0] == 0)
BUGMSG(D_NORMAL, "WARNING! Station address 00 is reserved " BUGMSG(D_NORMAL, "WARNING! Station address 00 is reserved for broadcasts!\n");
"for broadcasts!\n");
else if (dev->dev_addr[0] == 255) else if (dev->dev_addr[0] == 255)
BUGMSG(D_NORMAL, "WARNING! Station address FF may confuse " BUGMSG(D_NORMAL, "WARNING! Station address FF may confuse DOS networking programs!\n");
"DOS networking programs!\n");
BUGMSG(D_DEBUG, "%s: %d: %s\n", __FILE__, __LINE__, __func__); BUGMSG(D_DEBUG, "%s: %d: %s\n", __FILE__, __LINE__, __func__);
if (ASTATUS() & RESETflag) { if (ASTATUS() & RESETflag) {
...@@ -580,8 +578,8 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb, ...@@ -580,8 +578,8 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
if (proto->continue_tx && if (proto->continue_tx &&
proto->continue_tx(dev, txbuf)) { proto->continue_tx(dev, txbuf)) {
BUGMSG(D_NORMAL, BUGMSG(D_NORMAL,
"bug! continue_tx finished the first time! " "bug! continue_tx finished the first time! (proto='%c')\n",
"(proto='%c')\n", proto->suffix); proto->suffix);
} }
} }
retval = NETDEV_TX_OK; retval = NETDEV_TX_OK;
...@@ -779,15 +777,13 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id) ...@@ -779,15 +777,13 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
if (!(status & TXACKflag)) { if (!(status & TXACKflag)) {
if (lp->lasttrans_dest != 0) { if (lp->lasttrans_dest != 0) {
BUGMSG(D_EXTRA, BUGMSG(D_EXTRA,
"transmit was not acknowledged! " "transmit was not acknowledged! (status=%Xh, dest=%02Xh)\n",
"(status=%Xh, dest=%02Xh)\n",
status, lp->lasttrans_dest); status, lp->lasttrans_dest);
dev->stats.tx_errors++; dev->stats.tx_errors++;
dev->stats.tx_carrier_errors++; dev->stats.tx_carrier_errors++;
} else { } else {
BUGMSG(D_DURING, BUGMSG(D_DURING,
"broadcast was not acknowledged; that's normal " "broadcast was not acknowledged; that's normal (status=%Xh, dest=%02Xh)\n",
"(status=%Xh, dest=%02Xh)\n",
status, lp->lasttrans_dest); status, lp->lasttrans_dest);
} }
} }
...@@ -948,8 +944,7 @@ static void arcnet_rx(struct net_device *dev, int bufnum) ...@@ -948,8 +944,7 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
lp->hw.copy_from_card(dev, bufnum, ofs, soft, length); lp->hw.copy_from_card(dev, bufnum, ofs, soft, length);
} }
BUGMSG(D_DURING, "Buffer #%d: received packet from %02Xh to %02Xh " BUGMSG(D_DURING, "Buffer #%d: received packet from %02Xh to %02Xh (%d+4 bytes)\n",
"(%d+4 bytes)\n",
bufnum, pkt.hard.source, pkt.hard.dest, length); bufnum, pkt.hard.source, pkt.hard.dest, length);
dev->stats.rx_packets++; dev->stats.rx_packets++;
...@@ -964,8 +959,8 @@ static void arcnet_rx(struct net_device *dev, int bufnum) ...@@ -964,8 +959,8 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
if (oldp != newp) { if (oldp != newp) {
BUGMSG(D_PROTO, BUGMSG(D_PROTO,
"got protocol %02Xh; encap for host %02Xh is now '%c'" "got protocol %02Xh; encap for host %02Xh is now '%c' (was '%c')\n",
" (was '%c')\n", soft->proto, pkt.hard.source, soft->proto, pkt.hard.source,
newp->suffix, oldp->suffix); newp->suffix, oldp->suffix);
} }
} }
......
...@@ -58,8 +58,7 @@ static int __init com20020isa_probe(struct net_device *dev) ...@@ -58,8 +58,7 @@ static int __init com20020isa_probe(struct net_device *dev)
ioaddr = dev->base_addr; ioaddr = dev->base_addr;
if (!ioaddr) { if (!ioaddr) {
BUGMSG(D_NORMAL, "No autoprobe (yet) for IO mapped cards; you " BUGMSG(D_NORMAL, "No autoprobe (yet) for IO mapped cards; you must specify the base address!\n");
"must specify the base address!\n");
return -ENODEV; return -ENODEV;
} }
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "arcnet (COM20020)")) {
......
...@@ -150,8 +150,7 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -150,8 +150,7 @@ static int __init com90io_probe(struct net_device *dev)
BUGLVL(D_NORMAL) printk("E-mail me if you actually test this driver, please!\n"); BUGLVL(D_NORMAL) printk("E-mail me if you actually test this driver, please!\n");
if (!ioaddr) { if (!ioaddr) {
BUGMSG(D_NORMAL, "No autoprobe for IO mapped cards; you " BUGMSG(D_NORMAL, "No autoprobe for IO mapped cards; you must specify the base address!\n");
"must specify the base address!\n");
return -ENODEV; return -ENODEV;
} }
if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) { if (!request_region(ioaddr, ARCNET_TOTAL_SIZE, "com90io probe")) {
...@@ -192,8 +191,8 @@ static int __init com90io_probe(struct net_device *dev) ...@@ -192,8 +191,8 @@ static int __init com90io_probe(struct net_device *dev)
outb(0, _ADDR_LO); outb(0, _ADDR_LO);
if ((status = inb(_MEMDATA)) != 0xd1) { if ((status = inb(_MEMDATA)) != 0xd1) {
BUGMSG(D_INIT_REASONS, "Signature byte not found" BUGMSG(D_INIT_REASONS, "Signature byte not found (%Xh instead).\n",
" (%Xh instead).\n", status); status);
goto err_out; goto err_out;
} }
if (!dev->irq) { if (!dev->irq) {
......
...@@ -525,8 +525,7 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem ...@@ -525,8 +525,7 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem, void __iomem
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
BUGMSG(D_NORMAL, "COM90xx station %02Xh found at %03lXh, IRQ %d, " BUGMSG(D_NORMAL, "COM90xx station %02Xh found at %03lXh, IRQ %d, ShMem %lXh (%ld*%xh).\n",
"ShMem %lXh (%ld*%xh).\n",
dev->dev_addr[0], dev->dev_addr[0],
dev->base_addr, dev->irq, dev->mem_start, dev->base_addr, dev->irq, dev->mem_start,
(dev->mem_end - dev->mem_start + 1) / mirror_size, mirror_size); (dev->mem_end - dev->mem_start + 1) / mirror_size, mirror_size);
......
...@@ -261,8 +261,7 @@ static void rx(struct net_device *dev, int bufnum, ...@@ -261,8 +261,7 @@ static void rx(struct net_device *dev, int bufnum,
BUGMSG(D_RX, "brand new splitpacket (splitflag=%d)\n", BUGMSG(D_RX, "brand new splitpacket (splitflag=%d)\n",
soft->split_flag); soft->split_flag);
if (in->skb) { /* already assembling one! */ if (in->skb) { /* already assembling one! */
BUGMSG(D_EXTRA, "aborting previous (seq=%d) assembly " BUGMSG(D_EXTRA, "aborting previous (seq=%d) assembly (splitflag=%d, seq=%d)\n",
"(splitflag=%d, seq=%d)\n",
in->sequence, soft->split_flag, in->sequence, soft->split_flag,
soft->sequence); soft->sequence);
dev->stats.rx_errors++; dev->stats.rx_errors++;
...@@ -306,8 +305,7 @@ static void rx(struct net_device *dev, int bufnum, ...@@ -306,8 +305,7 @@ static void rx(struct net_device *dev, int bufnum,
*/ */
if (!in->skb) { if (!in->skb) {
if (lp->rfc1201.aborted_seq != soft->sequence) { if (lp->rfc1201.aborted_seq != soft->sequence) {
BUGMSG(D_EXTRA, "can't continue split without starting " BUGMSG(D_EXTRA, "can't continue split without starting first! (splitflag=%d, seq=%d, aborted=%d)\n",
"first! (splitflag=%d, seq=%d, aborted=%d)\n",
soft->split_flag, soft->sequence, soft->split_flag, soft->sequence,
lp->rfc1201.aborted_seq); lp->rfc1201.aborted_seq);
dev->stats.rx_errors++; dev->stats.rx_errors++;
...@@ -326,8 +324,7 @@ static void rx(struct net_device *dev, int bufnum, ...@@ -326,8 +324,7 @@ static void rx(struct net_device *dev, int bufnum,
return; return;
} }
/* "bad" duplicate, kill reassembly */ /* "bad" duplicate, kill reassembly */
BUGMSG(D_EXTRA, "out-of-order splitpacket, reassembly " BUGMSG(D_EXTRA, "out-of-order splitpacket, reassembly (seq=%d) aborted (splitflag=%d, seq=%d)\n",
"(seq=%d) aborted (splitflag=%d, seq=%d)\n",
in->sequence, soft->split_flag, soft->sequence); in->sequence, soft->split_flag, soft->sequence);
lp->rfc1201.aborted_seq = soft->sequence; lp->rfc1201.aborted_seq = soft->sequence;
dev_kfree_skb_irq(in->skb); dev_kfree_skb_irq(in->skb);
...@@ -487,8 +484,8 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, ...@@ -487,8 +484,8 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
out->numsegs = (out->dataleft + maxsegsize - 1) / maxsegsize; out->numsegs = (out->dataleft + maxsegsize - 1) / maxsegsize;
out->segnum = 0; out->segnum = 0;
BUGMSG(D_DURING, "rfc1201 prep_tx: ready for %d-segment split " BUGMSG(D_DURING, "rfc1201 prep_tx: ready for %d-segment split (%d bytes, seq=%d)\n",
"(%d bytes, seq=%d)\n", out->numsegs, out->length, out->numsegs, out->length,
pkt->soft.rfc1201.sequence); pkt->soft.rfc1201.sequence);
return 0; /* not done */ return 0; /* not done */
......
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