sunhme: Convert printk(KERN_FOO ...) to pr_foo(...)
This is a mostly-mechanical translation of the existing printks into pr_foos. In several places, I have pasted messages which were broken over several lines to allow for easier grepping. Signed-off-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
30931367ba
commit
0bc1f45410
@ -145,7 +145,7 @@ static __inline__ void tx_dump_log(void)
|
|||||||
|
|
||||||
this = txlog_cur_entry;
|
this = txlog_cur_entry;
|
||||||
for (i = 0; i < TX_LOG_LEN; i++) {
|
for (i = 0; i < TX_LOG_LEN; i++) {
|
||||||
printk("TXLOG[%d]: j[%08x] tx[N(%d)O(%d)] action[%08x] stat[%08x]\n", i,
|
pr_err("TXLOG[%d]: j[%08x] tx[N(%d)O(%d)] action[%08x] stat[%08x]\n", i,
|
||||||
tx_log[this].tstamp,
|
tx_log[this].tstamp,
|
||||||
tx_log[this].tx_new, tx_log[this].tx_old,
|
tx_log[this].tx_new, tx_log[this].tx_old,
|
||||||
tx_log[this].action, tx_log[this].status);
|
tx_log[this].action, tx_log[this].status);
|
||||||
@ -436,7 +436,7 @@ static int happy_meal_tcvr_read(struct happy_meal *hp,
|
|||||||
while (!(hme_read32(hp, tregs + TCVR_FRAME) & 0x10000) && --tries)
|
while (!(hme_read32(hp, tregs + TCVR_FRAME) & 0x10000) && --tries)
|
||||||
udelay(20);
|
udelay(20);
|
||||||
if (!tries) {
|
if (!tries) {
|
||||||
printk(KERN_ERR "happy meal: Aieee, transceiver MIF read bolixed\n");
|
pr_err("happy meal: Aieee, transceiver MIF read bolixed\n");
|
||||||
return TCVR_FAILURE;
|
return TCVR_FAILURE;
|
||||||
}
|
}
|
||||||
retval = hme_read32(hp, tregs + TCVR_FRAME) & 0xffff;
|
retval = hme_read32(hp, tregs + TCVR_FRAME) & 0xffff;
|
||||||
@ -469,7 +469,7 @@ static void happy_meal_tcvr_write(struct happy_meal *hp,
|
|||||||
|
|
||||||
/* Anything else? */
|
/* Anything else? */
|
||||||
if (!tries)
|
if (!tries)
|
||||||
printk(KERN_ERR "happy meal: Aieee, transceiver MIF write bolixed\n");
|
pr_err("happy meal: Aieee, transceiver MIF write bolixed\n");
|
||||||
|
|
||||||
/* Fifty-two cents is your change, have a nice day. */
|
/* Fifty-two cents is your change, have a nice day. */
|
||||||
}
|
}
|
||||||
@ -647,8 +647,8 @@ static void happy_meal_timer(struct timer_list *t)
|
|||||||
/* Enter force mode. */
|
/* Enter force mode. */
|
||||||
do_force_mode:
|
do_force_mode:
|
||||||
hp->sw_bmcr = happy_meal_tcvr_read(hp, tregs, MII_BMCR);
|
hp->sw_bmcr = happy_meal_tcvr_read(hp, tregs, MII_BMCR);
|
||||||
printk(KERN_NOTICE "%s: Auto-Negotiation unsuccessful, trying force link mode\n",
|
pr_notice("%s: Auto-Negotiation unsuccessful, trying force link mode\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
hp->sw_bmcr = BMCR_SPEED100;
|
hp->sw_bmcr = BMCR_SPEED100;
|
||||||
happy_meal_tcvr_write(hp, tregs, MII_BMCR, hp->sw_bmcr);
|
happy_meal_tcvr_write(hp, tregs, MII_BMCR, hp->sw_bmcr);
|
||||||
|
|
||||||
@ -707,8 +707,8 @@ static void happy_meal_timer(struct timer_list *t)
|
|||||||
restart_timer = 0;
|
restart_timer = 0;
|
||||||
} else {
|
} else {
|
||||||
if (hp->timer_ticks >= 10) {
|
if (hp->timer_ticks >= 10) {
|
||||||
printk(KERN_NOTICE "%s: Auto negotiation successful, link still "
|
pr_notice("%s: Auto negotiation successful, link still not completely up.\n",
|
||||||
"not completely up.\n", hp->dev->name);
|
hp->dev->name);
|
||||||
hp->timer_ticks = 0;
|
hp->timer_ticks = 0;
|
||||||
restart_timer = 1;
|
restart_timer = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -763,14 +763,14 @@ static void happy_meal_timer(struct timer_list *t)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Let the user know... */
|
/* Let the user know... */
|
||||||
printk(KERN_NOTICE "%s: Link down, cable problem?\n",
|
pr_notice("%s: Link down, cable problem?\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
|
|
||||||
ret = happy_meal_init(hp);
|
ret = happy_meal_init(hp);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/* ho hum... */
|
/* ho hum... */
|
||||||
printk(KERN_ERR "%s: Error, cannot re-init the "
|
pr_err("%s: Error, cannot re-init the Happy Meal.\n",
|
||||||
"Happy Meal.\n", hp->dev->name);
|
hp->dev->name);
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -792,7 +792,7 @@ static void happy_meal_timer(struct timer_list *t)
|
|||||||
case asleep:
|
case asleep:
|
||||||
default:
|
default:
|
||||||
/* Can't happens.... */
|
/* Can't happens.... */
|
||||||
printk(KERN_ERR "%s: Aieee, link timer is asleep but we got one anyways!\n",
|
pr_err("%s: Aieee, link timer is asleep but we got one anyways!\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
restart_timer = 0;
|
restart_timer = 0;
|
||||||
hp->timer_ticks = 0;
|
hp->timer_ticks = 0;
|
||||||
@ -826,7 +826,7 @@ static void happy_meal_tx_reset(struct happy_meal *hp, void __iomem *bregs)
|
|||||||
|
|
||||||
/* Lettuce, tomato, buggy hardware (no extra charge)? */
|
/* Lettuce, tomato, buggy hardware (no extra charge)? */
|
||||||
if (!tries)
|
if (!tries)
|
||||||
printk(KERN_ERR "happy meal: Transceiver BigMac ATTACK!");
|
pr_err("happy meal: Transceiver BigMac ATTACK!");
|
||||||
|
|
||||||
/* Take care. */
|
/* Take care. */
|
||||||
HMD("done\n");
|
HMD("done\n");
|
||||||
@ -846,7 +846,7 @@ static void happy_meal_rx_reset(struct happy_meal *hp, void __iomem *bregs)
|
|||||||
|
|
||||||
/* Will that be all? */
|
/* Will that be all? */
|
||||||
if (!tries)
|
if (!tries)
|
||||||
printk(KERN_ERR "happy meal: Receiver BigMac ATTACK!");
|
pr_err("happy meal: Receiver BigMac ATTACK!");
|
||||||
|
|
||||||
/* Don't forget your vik_1137125_wa. Have a nice day. */
|
/* Don't forget your vik_1137125_wa. Have a nice day. */
|
||||||
HMD("done\n");
|
HMD("done\n");
|
||||||
@ -868,7 +868,7 @@ static void happy_meal_stop(struct happy_meal *hp, void __iomem *gregs)
|
|||||||
|
|
||||||
/* Come back next week when we are "Sun Microelectronics". */
|
/* Come back next week when we are "Sun Microelectronics". */
|
||||||
if (!tries)
|
if (!tries)
|
||||||
printk(KERN_ERR "happy meal: Fry guys.");
|
pr_err("happy meal: Fry guys.");
|
||||||
|
|
||||||
/* Remember: "Different name, same old buggy as shit hardware." */
|
/* Remember: "Different name, same old buggy as shit hardware." */
|
||||||
HMD("done\n");
|
HMD("done\n");
|
||||||
@ -1086,7 +1086,7 @@ static void happy_meal_transceiver_check(struct happy_meal *hp, void __iomem *tr
|
|||||||
hp->tcvr_type = internal;
|
hp->tcvr_type = internal;
|
||||||
ASD("<internal>\n");
|
ASD("<internal>\n");
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "happy meal: Transceiver and a coke please.");
|
pr_err("happy meal: Transceiver and a coke please.");
|
||||||
hp->tcvr_type = none; /* Grrr... */
|
hp->tcvr_type = none; /* Grrr... */
|
||||||
ASD("<none>\n");
|
ASD("<none>\n");
|
||||||
}
|
}
|
||||||
@ -1311,10 +1311,10 @@ happy_meal_begin_auto_negotiation(struct happy_meal *hp,
|
|||||||
udelay(10);
|
udelay(10);
|
||||||
}
|
}
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
printk(KERN_ERR "%s: Happy Meal would not start auto negotiation "
|
pr_err("%s: Happy Meal would not start auto negotiation BMCR=0x%04x\n",
|
||||||
"BMCR=0x%04x\n", hp->dev->name, hp->sw_bmcr);
|
hp->dev->name, hp->sw_bmcr);
|
||||||
printk(KERN_NOTICE "%s: Performing force link detection.\n",
|
pr_notice("%s: Performing force link detection.\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
goto force_link;
|
goto force_link;
|
||||||
} else {
|
} else {
|
||||||
hp->timer_state = arbwait;
|
hp->timer_state = arbwait;
|
||||||
@ -1583,8 +1583,8 @@ static int happy_meal_init(struct happy_meal *hp)
|
|||||||
regtmp = hme_read32(hp, erxregs + ERX_CFG);
|
regtmp = hme_read32(hp, erxregs + ERX_CFG);
|
||||||
hme_write32(hp, erxregs + ERX_CFG, ERX_CFG_DEFAULT(RX_OFFSET));
|
hme_write32(hp, erxregs + ERX_CFG, ERX_CFG_DEFAULT(RX_OFFSET));
|
||||||
if (hme_read32(hp, erxregs + ERX_CFG) != ERX_CFG_DEFAULT(RX_OFFSET)) {
|
if (hme_read32(hp, erxregs + ERX_CFG) != ERX_CFG_DEFAULT(RX_OFFSET)) {
|
||||||
printk(KERN_ERR "happy meal: Eieee, rx config register gets greasy fries.\n");
|
pr_err("happy meal: Eieee, rx config register gets greasy fries.\n");
|
||||||
printk(KERN_ERR "happy meal: Trying to set %08x, reread gives %08x\n",
|
pr_err("happy meal: Trying to set %08x, reread gives %08x\n",
|
||||||
ERX_CFG_DEFAULT(RX_OFFSET), regtmp);
|
ERX_CFG_DEFAULT(RX_OFFSET), regtmp);
|
||||||
/* XXX Should return failure here... */
|
/* XXX Should return failure here... */
|
||||||
}
|
}
|
||||||
@ -1722,24 +1722,26 @@ static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)
|
|||||||
GREG_STAT_MIFIRQ | GREG_STAT_TXEACK | GREG_STAT_TXLERR |
|
GREG_STAT_MIFIRQ | GREG_STAT_TXEACK | GREG_STAT_TXLERR |
|
||||||
GREG_STAT_TXPERR | GREG_STAT_TXTERR | GREG_STAT_SLVERR |
|
GREG_STAT_TXPERR | GREG_STAT_TXTERR | GREG_STAT_SLVERR |
|
||||||
GREG_STAT_SLVPERR))
|
GREG_STAT_SLVPERR))
|
||||||
printk(KERN_ERR "%s: Error interrupt for happy meal, status = %08x\n",
|
pr_err("%s: Error interrupt for happy meal, status = %08x\n",
|
||||||
hp->dev->name, status);
|
hp->dev->name, status);
|
||||||
|
|
||||||
if (status & GREG_STAT_RFIFOVF) {
|
if (status & GREG_STAT_RFIFOVF) {
|
||||||
/* Receive FIFO overflow is harmless and the hardware will take
|
/* Receive FIFO overflow is harmless and the hardware will take
|
||||||
care of it, just some packets are lost. Who cares. */
|
care of it, just some packets are lost. Who cares. */
|
||||||
printk(KERN_DEBUG "%s: Happy Meal receive FIFO overflow.\n", hp->dev->name);
|
pr_debug("%s: Happy Meal receive FIFO overflow.\n",
|
||||||
|
hp->dev->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & GREG_STAT_STSTERR) {
|
if (status & GREG_STAT_STSTERR) {
|
||||||
/* BigMAC SQE link test failed. */
|
/* BigMAC SQE link test failed. */
|
||||||
printk(KERN_ERR "%s: Happy Meal BigMAC SQE test failed.\n", hp->dev->name);
|
pr_err("%s: Happy Meal BigMAC SQE test failed.\n",
|
||||||
|
hp->dev->name);
|
||||||
reset = 1;
|
reset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & GREG_STAT_TFIFO_UND) {
|
if (status & GREG_STAT_TFIFO_UND) {
|
||||||
/* Transmit FIFO underrun, again DMA error likely. */
|
/* Transmit FIFO underrun, again DMA error likely. */
|
||||||
printk(KERN_ERR "%s: Happy Meal transmitter FIFO underrun, DMA error.\n",
|
pr_err("%s: Happy Meal transmitter FIFO underrun, DMA error.\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
reset = 1;
|
reset = 1;
|
||||||
}
|
}
|
||||||
@ -1748,7 +1750,8 @@ static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)
|
|||||||
/* Driver error, tried to transmit something larger
|
/* Driver error, tried to transmit something larger
|
||||||
* than ethernet max mtu.
|
* than ethernet max mtu.
|
||||||
*/
|
*/
|
||||||
printk(KERN_ERR "%s: Happy Meal MAX Packet size error.\n", hp->dev->name);
|
pr_err("%s: Happy Meal MAX Packet size error.\n",
|
||||||
|
hp->dev->name);
|
||||||
reset = 1;
|
reset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1758,14 +1761,13 @@ static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)
|
|||||||
* faster than the interrupt handler could keep up
|
* faster than the interrupt handler could keep up
|
||||||
* with.
|
* with.
|
||||||
*/
|
*/
|
||||||
printk(KERN_INFO "%s: Happy Meal out of receive "
|
pr_info("%s: Happy Meal out of receive descriptors, packet dropped.\n",
|
||||||
"descriptors, packet dropped.\n",
|
hp->dev->name);
|
||||||
hp->dev->name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & (GREG_STAT_RXERR|GREG_STAT_RXPERR|GREG_STAT_RXTERR)) {
|
if (status & (GREG_STAT_RXERR|GREG_STAT_RXPERR|GREG_STAT_RXTERR)) {
|
||||||
/* All sorts of DMA receive errors. */
|
/* All sorts of DMA receive errors. */
|
||||||
printk(KERN_ERR "%s: Happy Meal rx DMA errors [ ", hp->dev->name);
|
pr_err("%s: Happy Meal rx DMA errors [ ", hp->dev->name);
|
||||||
if (status & GREG_STAT_RXERR)
|
if (status & GREG_STAT_RXERR)
|
||||||
printk("GenericError ");
|
printk("GenericError ");
|
||||||
if (status & GREG_STAT_RXPERR)
|
if (status & GREG_STAT_RXPERR)
|
||||||
@ -1780,20 +1782,20 @@ static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)
|
|||||||
/* Driver bug, didn't set EOP bit in tx descriptor given
|
/* Driver bug, didn't set EOP bit in tx descriptor given
|
||||||
* to the happy meal.
|
* to the happy meal.
|
||||||
*/
|
*/
|
||||||
printk(KERN_ERR "%s: EOP not set in happy meal transmit descriptor!\n",
|
pr_err("%s: EOP not set in happy meal transmit descriptor!\n",
|
||||||
hp->dev->name);
|
hp->dev->name);
|
||||||
reset = 1;
|
reset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status & GREG_STAT_MIFIRQ) {
|
if (status & GREG_STAT_MIFIRQ) {
|
||||||
/* MIF signalled an interrupt, were we polling it? */
|
/* MIF signalled an interrupt, were we polling it? */
|
||||||
printk(KERN_ERR "%s: Happy Meal MIF interrupt.\n", hp->dev->name);
|
pr_err("%s: Happy Meal MIF interrupt.\n", hp->dev->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status &
|
if (status &
|
||||||
(GREG_STAT_TXEACK|GREG_STAT_TXLERR|GREG_STAT_TXPERR|GREG_STAT_TXTERR)) {
|
(GREG_STAT_TXEACK|GREG_STAT_TXLERR|GREG_STAT_TXPERR|GREG_STAT_TXTERR)) {
|
||||||
/* All sorts of transmit DMA errors. */
|
/* All sorts of transmit DMA errors. */
|
||||||
printk(KERN_ERR "%s: Happy Meal tx DMA errors [ ", hp->dev->name);
|
pr_err("%s: Happy Meal tx DMA errors [ ", hp->dev->name);
|
||||||
if (status & GREG_STAT_TXEACK)
|
if (status & GREG_STAT_TXEACK)
|
||||||
printk("GenericError ");
|
printk("GenericError ");
|
||||||
if (status & GREG_STAT_TXLERR)
|
if (status & GREG_STAT_TXLERR)
|
||||||
@ -1810,14 +1812,14 @@ static int happy_meal_is_not_so_happy(struct happy_meal *hp, u32 status)
|
|||||||
/* Bus or parity error when cpu accessed happy meal registers
|
/* Bus or parity error when cpu accessed happy meal registers
|
||||||
* or it's internal FIFO's. Should never see this.
|
* or it's internal FIFO's. Should never see this.
|
||||||
*/
|
*/
|
||||||
printk(KERN_ERR "%s: Happy Meal register access SBUS slave (%s) error.\n",
|
pr_err("%s: Happy Meal register access SBUS slave (%s) error.\n",
|
||||||
hp->dev->name,
|
hp->dev->name,
|
||||||
(status & GREG_STAT_SLVPERR) ? "parity" : "generic");
|
(status & GREG_STAT_SLVPERR) ? "parity" : "generic");
|
||||||
reset = 1;
|
reset = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
printk(KERN_NOTICE "%s: Resetting...\n", hp->dev->name);
|
pr_notice("%s: Resetting...\n", hp->dev->name);
|
||||||
happy_meal_init(hp);
|
happy_meal_init(hp);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1829,22 +1831,25 @@ static void happy_meal_mif_interrupt(struct happy_meal *hp)
|
|||||||
{
|
{
|
||||||
void __iomem *tregs = hp->tcvregs;
|
void __iomem *tregs = hp->tcvregs;
|
||||||
|
|
||||||
printk(KERN_INFO "%s: Link status change.\n", hp->dev->name);
|
pr_info("%s: Link status change.\n", hp->dev->name);
|
||||||
hp->sw_bmcr = happy_meal_tcvr_read(hp, tregs, MII_BMCR);
|
hp->sw_bmcr = happy_meal_tcvr_read(hp, tregs, MII_BMCR);
|
||||||
hp->sw_lpa = happy_meal_tcvr_read(hp, tregs, MII_LPA);
|
hp->sw_lpa = happy_meal_tcvr_read(hp, tregs, MII_LPA);
|
||||||
|
|
||||||
/* Use the fastest transmission protocol possible. */
|
/* Use the fastest transmission protocol possible. */
|
||||||
if (hp->sw_lpa & LPA_100FULL) {
|
if (hp->sw_lpa & LPA_100FULL) {
|
||||||
printk(KERN_INFO "%s: Switching to 100Mbps at full duplex.", hp->dev->name);
|
pr_info("%s: Switching to 100Mbps at full duplex.",
|
||||||
|
hp->dev->name);
|
||||||
hp->sw_bmcr |= (BMCR_FULLDPLX | BMCR_SPEED100);
|
hp->sw_bmcr |= (BMCR_FULLDPLX | BMCR_SPEED100);
|
||||||
} else if (hp->sw_lpa & LPA_100HALF) {
|
} else if (hp->sw_lpa & LPA_100HALF) {
|
||||||
printk(KERN_INFO "%s: Switching to 100MBps at half duplex.", hp->dev->name);
|
pr_info("%s: Switching to 100MBps at half duplex.",
|
||||||
|
hp->dev->name);
|
||||||
hp->sw_bmcr |= BMCR_SPEED100;
|
hp->sw_bmcr |= BMCR_SPEED100;
|
||||||
} else if (hp->sw_lpa & LPA_10FULL) {
|
} else if (hp->sw_lpa & LPA_10FULL) {
|
||||||
printk(KERN_INFO "%s: Switching to 10MBps at full duplex.", hp->dev->name);
|
pr_info("%s: Switching to 10MBps at full duplex.",
|
||||||
|
hp->dev->name);
|
||||||
hp->sw_bmcr |= BMCR_FULLDPLX;
|
hp->sw_bmcr |= BMCR_FULLDPLX;
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO "%s: Using 10Mbps at half duplex.", hp->dev->name);
|
pr_info("%s: Using 10Mbps at half duplex.", hp->dev->name);
|
||||||
}
|
}
|
||||||
happy_meal_tcvr_write(hp, tregs, MII_BMCR, hp->sw_bmcr);
|
happy_meal_tcvr_write(hp, tregs, MII_BMCR, hp->sw_bmcr);
|
||||||
|
|
||||||
@ -2022,7 +2027,8 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
|
|||||||
}
|
}
|
||||||
hp->rx_new = elem;
|
hp->rx_new = elem;
|
||||||
if (drops)
|
if (drops)
|
||||||
printk(KERN_INFO "%s: Memory squeeze, deferring packet.\n", hp->dev->name);
|
pr_info("%s: Memory squeeze, deferring packet.\n",
|
||||||
|
hp->dev->name);
|
||||||
RXD(">");
|
RXD(">");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2130,7 +2136,7 @@ static int happy_meal_open(struct net_device *dev)
|
|||||||
dev->name, dev);
|
dev->name, dev);
|
||||||
if (res) {
|
if (res) {
|
||||||
HMD("EAGAIN\n");
|
HMD("EAGAIN\n");
|
||||||
printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n",
|
pr_err("happy_meal(SBUS): Can't order irq %d to go.\n",
|
||||||
hp->irq);
|
hp->irq);
|
||||||
|
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
@ -2175,12 +2181,12 @@ static void happy_meal_tx_timeout(struct net_device *dev, unsigned int txqueue)
|
|||||||
{
|
{
|
||||||
struct happy_meal *hp = netdev_priv(dev);
|
struct happy_meal *hp = netdev_priv(dev);
|
||||||
|
|
||||||
printk (KERN_ERR "%s: transmit timed out, resetting\n", dev->name);
|
pr_err("%s: transmit timed out, resetting\n", dev->name);
|
||||||
tx_dump_log();
|
tx_dump_log();
|
||||||
printk (KERN_ERR "%s: Happy Status %08x TX[%08x:%08x]\n", dev->name,
|
pr_err("%s: Happy Status %08x TX[%08x:%08x]\n", dev->name,
|
||||||
hme_read32(hp, hp->gregs + GREG_STAT),
|
hme_read32(hp, hp->gregs + GREG_STAT),
|
||||||
hme_read32(hp, hp->etxregs + ETX_CFG),
|
hme_read32(hp, hp->etxregs + ETX_CFG),
|
||||||
hme_read32(hp, hp->bigmacregs + BMAC_TXCFG));
|
hme_read32(hp, hp->bigmacregs + BMAC_TXCFG));
|
||||||
|
|
||||||
spin_lock_irq(&hp->happy_lock);
|
spin_lock_irq(&hp->happy_lock);
|
||||||
happy_meal_init(hp);
|
happy_meal_init(hp);
|
||||||
@ -2230,7 +2236,7 @@ static netdev_tx_t happy_meal_start_xmit(struct sk_buff *skb,
|
|||||||
if (TX_BUFFS_AVAIL(hp) <= (skb_shinfo(skb)->nr_frags + 1)) {
|
if (TX_BUFFS_AVAIL(hp) <= (skb_shinfo(skb)->nr_frags + 1)) {
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
spin_unlock_irq(&hp->happy_lock);
|
spin_unlock_irq(&hp->happy_lock);
|
||||||
printk(KERN_ERR "%s: BUG! Tx Ring full when queue awake!\n",
|
pr_err("%s: BUG! Tx Ring full when queue awake!\n",
|
||||||
dev->name);
|
dev->name);
|
||||||
return NETDEV_TX_BUSY;
|
return NETDEV_TX_BUSY;
|
||||||
}
|
}
|
||||||
@ -2527,8 +2533,8 @@ static int __init quattro_sbus_register_irqs(void)
|
|||||||
IRQF_SHARED, "Quattro",
|
IRQF_SHARED, "Quattro",
|
||||||
qp);
|
qp);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
printk(KERN_ERR "Quattro HME: IRQ registration "
|
pr_err("Quattro HME: IRQ registration error %d.\n",
|
||||||
"error %d.\n", err);
|
err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2636,7 +2642,7 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
|
|||||||
SET_NETDEV_DEV(dev, &op->dev);
|
SET_NETDEV_DEV(dev, &op->dev);
|
||||||
|
|
||||||
if (hme_version_printed++ == 0)
|
if (hme_version_printed++ == 0)
|
||||||
printk(KERN_INFO "%s", version);
|
pr_info("%s", version);
|
||||||
|
|
||||||
/* If user did not specify a MAC address specifically, use
|
/* If user did not specify a MAC address specifically, use
|
||||||
* the Quattro local-mac-address property...
|
* the Quattro local-mac-address property...
|
||||||
@ -2679,35 +2685,35 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
|
|||||||
hp->gregs = of_ioremap(&op->resource[0], 0,
|
hp->gregs = of_ioremap(&op->resource[0], 0,
|
||||||
GREG_REG_SIZE, "HME Global Regs");
|
GREG_REG_SIZE, "HME Global Regs");
|
||||||
if (!hp->gregs) {
|
if (!hp->gregs) {
|
||||||
printk(KERN_ERR "happymeal: Cannot map global registers.\n");
|
pr_err("happymeal: Cannot map global registers.\n");
|
||||||
goto err_out_free_netdev;
|
goto err_out_free_netdev;
|
||||||
}
|
}
|
||||||
|
|
||||||
hp->etxregs = of_ioremap(&op->resource[1], 0,
|
hp->etxregs = of_ioremap(&op->resource[1], 0,
|
||||||
ETX_REG_SIZE, "HME TX Regs");
|
ETX_REG_SIZE, "HME TX Regs");
|
||||||
if (!hp->etxregs) {
|
if (!hp->etxregs) {
|
||||||
printk(KERN_ERR "happymeal: Cannot map MAC TX registers.\n");
|
pr_err("happymeal: Cannot map MAC TX registers.\n");
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
hp->erxregs = of_ioremap(&op->resource[2], 0,
|
hp->erxregs = of_ioremap(&op->resource[2], 0,
|
||||||
ERX_REG_SIZE, "HME RX Regs");
|
ERX_REG_SIZE, "HME RX Regs");
|
||||||
if (!hp->erxregs) {
|
if (!hp->erxregs) {
|
||||||
printk(KERN_ERR "happymeal: Cannot map MAC RX registers.\n");
|
pr_err("happymeal: Cannot map MAC RX registers.\n");
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
hp->bigmacregs = of_ioremap(&op->resource[3], 0,
|
hp->bigmacregs = of_ioremap(&op->resource[3], 0,
|
||||||
BMAC_REG_SIZE, "HME BIGMAC Regs");
|
BMAC_REG_SIZE, "HME BIGMAC Regs");
|
||||||
if (!hp->bigmacregs) {
|
if (!hp->bigmacregs) {
|
||||||
printk(KERN_ERR "happymeal: Cannot map BIGMAC registers.\n");
|
pr_err("happymeal: Cannot map BIGMAC registers.\n");
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
hp->tcvregs = of_ioremap(&op->resource[4], 0,
|
hp->tcvregs = of_ioremap(&op->resource[4], 0,
|
||||||
TCVR_REG_SIZE, "HME Tranceiver Regs");
|
TCVR_REG_SIZE, "HME Tranceiver Regs");
|
||||||
if (!hp->tcvregs) {
|
if (!hp->tcvregs) {
|
||||||
printk(KERN_ERR "happymeal: Cannot map TCVR registers.\n");
|
pr_err("happymeal: Cannot map TCVR registers.\n");
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2774,19 +2780,18 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
|
|||||||
|
|
||||||
err = register_netdev(hp->dev);
|
err = register_netdev(hp->dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "happymeal: Cannot register net device, "
|
pr_err("happymeal: Cannot register net device, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_free_coherent;
|
goto err_out_free_coherent;
|
||||||
}
|
}
|
||||||
|
|
||||||
platform_set_drvdata(op, hp);
|
platform_set_drvdata(op, hp);
|
||||||
|
|
||||||
if (qfe_slot != -1)
|
if (qfe_slot != -1)
|
||||||
printk(KERN_INFO "%s: Quattro HME slot %d (SBUS) 10/100baseT Ethernet ",
|
pr_info("%s: Quattro HME slot %d (SBUS) 10/100baseT Ethernet ",
|
||||||
dev->name, qfe_slot);
|
dev->name, qfe_slot);
|
||||||
else
|
else
|
||||||
printk(KERN_INFO "%s: HAPPY MEAL (SBUS) 10/100baseT Ethernet ",
|
pr_info("%s: HAPPY MEAL (SBUS) 10/100baseT Ethernet ",
|
||||||
dev->name);
|
dev->name);
|
||||||
|
|
||||||
printk("%pM\n", dev->dev_addr);
|
printk("%pM\n", dev->dev_addr);
|
||||||
|
|
||||||
@ -2975,7 +2980,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
if ((pci_resource_flags(pdev, 0) & IORESOURCE_IO) != 0) {
|
if ((pci_resource_flags(pdev, 0) & IORESOURCE_IO) != 0) {
|
||||||
printk(KERN_ERR "happymeal(PCI): Cannot find proper PCI device base address.\n");
|
pr_err("happymeal(PCI): Cannot find proper PCI device base address.\n");
|
||||||
goto err_out_clear_quattro;
|
goto err_out_clear_quattro;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2983,15 +2988,14 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||||||
pci_resource_len(pdev, 0), DRV_NAME);
|
pci_resource_len(pdev, 0), DRV_NAME);
|
||||||
if (IS_ERR(hpreg_res)) {
|
if (IS_ERR(hpreg_res)) {
|
||||||
err = PTR_ERR(hpreg_res);
|
err = PTR_ERR(hpreg_res);
|
||||||
printk(KERN_ERR "happymeal(PCI): Cannot obtain PCI resources, "
|
pr_err("happymeal(PCI): Cannot obtain PCI resources, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_clear_quattro;
|
goto err_out_clear_quattro;
|
||||||
}
|
}
|
||||||
|
|
||||||
hpreg_base = pcim_iomap(pdev, 0, 0x8000);
|
hpreg_base = pcim_iomap(pdev, 0, 0x8000);
|
||||||
if (!hpreg_base) {
|
if (!hpreg_base) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
printk(KERN_ERR "happymeal(PCI): Unable to remap card memory.\n");
|
pr_err("happymeal(PCI): Unable to remap card memory.\n");
|
||||||
goto err_out_clear_quattro;
|
goto err_out_clear_quattro;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3099,8 +3103,7 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
err = devm_register_netdev(&pdev->dev, dev);
|
err = devm_register_netdev(&pdev->dev, dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
printk(KERN_ERR "happymeal(PCI): Cannot register net device, "
|
pr_err("happymeal(PCI): Cannot register net device, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_clear_quattro;
|
goto err_out_clear_quattro;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3114,7 +3117,8 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||||||
int i = simple_strtoul(dev->name + 3, NULL, 10);
|
int i = simple_strtoul(dev->name + 3, NULL, 10);
|
||||||
sprintf(prom_name, "-%d", i + 3);
|
sprintf(prom_name, "-%d", i + 3);
|
||||||
}
|
}
|
||||||
printk(KERN_INFO "%s%s: Quattro HME (PCI/CheerIO) 10/100baseT Ethernet ", dev->name, prom_name);
|
pr_info("%s%s: Quattro HME (PCI/CheerIO) 10/100baseT Ethernet ",
|
||||||
|
dev->name, prom_name);
|
||||||
if (qpdev->vendor == PCI_VENDOR_ID_DEC &&
|
if (qpdev->vendor == PCI_VENDOR_ID_DEC &&
|
||||||
qpdev->device == PCI_DEVICE_ID_DEC_21153)
|
qpdev->device == PCI_DEVICE_ID_DEC_21153)
|
||||||
printk("DEC 21153 PCI Bridge\n");
|
printk("DEC 21153 PCI Bridge\n");
|
||||||
@ -3124,11 +3128,11 @@ static int happy_meal_pci_probe(struct pci_dev *pdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (qfe_slot != -1)
|
if (qfe_slot != -1)
|
||||||
printk(KERN_INFO "%s: Quattro HME slot %d (PCI/CheerIO) 10/100baseT Ethernet ",
|
pr_info("%s: Quattro HME slot %d (PCI/CheerIO) 10/100baseT Ethernet ",
|
||||||
dev->name, qfe_slot);
|
dev->name, qfe_slot);
|
||||||
else
|
else
|
||||||
printk(KERN_INFO "%s: HAPPY MEAL (PCI/CheerIO) 10/100BaseT Ethernet ",
|
pr_info("%s: HAPPY MEAL (PCI/CheerIO) 10/100BaseT Ethernet ",
|
||||||
dev->name);
|
dev->name);
|
||||||
|
|
||||||
printk("%pM\n", dev->dev_addr);
|
printk("%pM\n", dev->dev_addr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user