tulip/pnic2.c: Use dev_<level> and pr_<level>
Convert printks to dev_<level> where a dev is available Convert printks to pr_<level> where not Coalesce format strings Change print formats with %d.dx to %0dx Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1df8bbd142
commit
22086a1172
|
@ -87,8 +87,8 @@ void pnic2_timer(unsigned long data)
|
||||||
int next_tick = 60*HZ;
|
int next_tick = 60*HZ;
|
||||||
|
|
||||||
if (tulip_debug > 3)
|
if (tulip_debug > 3)
|
||||||
printk(KERN_INFO"%s: PNIC2 negotiation status %8.8x.\n",
|
dev_info(&dev->dev, "PNIC2 negotiation status %08x\n",
|
||||||
dev->name,ioread32(ioaddr + CSR12));
|
ioread32(ioaddr + CSR12));
|
||||||
|
|
||||||
if (next_tick) {
|
if (next_tick) {
|
||||||
mod_timer(&tp->timer, RUN_AT(next_tick));
|
mod_timer(&tp->timer, RUN_AT(next_tick));
|
||||||
|
@ -125,8 +125,8 @@ void pnic2_start_nway(struct net_device *dev)
|
||||||
csr14 |= 0x00001184;
|
csr14 |= 0x00001184;
|
||||||
|
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, "
|
printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, csr14=%08x\n",
|
||||||
"csr14=%8.8x.\n", dev->name, csr14);
|
dev->name, csr14);
|
||||||
|
|
||||||
/* tell pnic2_lnk_change we are doing an nway negotiation */
|
/* tell pnic2_lnk_change we are doing an nway negotiation */
|
||||||
dev->if_port = 0;
|
dev->if_port = 0;
|
||||||
|
@ -137,8 +137,8 @@ void pnic2_start_nway(struct net_device *dev)
|
||||||
|
|
||||||
tp->csr6 = ioread32(ioaddr + CSR6);
|
tp->csr6 = ioread32(ioaddr + CSR6);
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_DEBUG "%s: On Entry to Nway, "
|
printk(KERN_DEBUG "%s: On Entry to Nway, csr6=%08x\n",
|
||||||
"csr6=%8.8x.\n", dev->name, tp->csr6);
|
dev->name, tp->csr6);
|
||||||
|
|
||||||
/* mask off any bits not to touch
|
/* mask off any bits not to touch
|
||||||
* comment at top of file explains mask value
|
* comment at top of file explains mask value
|
||||||
|
@ -181,9 +181,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
int csr12 = ioread32(ioaddr + CSR12);
|
int csr12 = ioread32(ioaddr + CSR12);
|
||||||
|
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_INFO"%s: PNIC2 link status interrupt %8.8x, "
|
dev_info(&dev->dev,
|
||||||
" CSR5 %x, %8.8x.\n", dev->name, csr12,
|
"PNIC2 link status interrupt %08x, CSR5 %x, %08x\n",
|
||||||
csr5, ioread32(ioaddr + CSR14));
|
csr12, csr5, ioread32(ioaddr + CSR14));
|
||||||
|
|
||||||
/* If NWay finished and we have a negotiated partner capability.
|
/* If NWay finished and we have a negotiated partner capability.
|
||||||
* check bits 14:12 for bit pattern 101 - all is good
|
* check bits 14:12 for bit pattern 101 - all is good
|
||||||
|
@ -215,9 +215,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
else if (negotiated & 0x0020) dev->if_port = 0;
|
else if (negotiated & 0x0020) dev->if_port = 0;
|
||||||
else {
|
else {
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_INFO "%s: funny autonegotiate result "
|
dev_info(&dev->dev,
|
||||||
"csr12 %8.8x advertising %4.4x\n",
|
"funny autonegotiate result csr12 %08x advertising %04x\n",
|
||||||
dev->name, csr12, tp->sym_advertise);
|
csr12, tp->sym_advertise);
|
||||||
tp->nwayset = 0;
|
tp->nwayset = 0;
|
||||||
/* so check if 100baseTx link state is okay */
|
/* so check if 100baseTx link state is okay */
|
||||||
if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180))
|
if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180))
|
||||||
|
@ -231,10 +231,11 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
|
|
||||||
if (tulip_debug > 1) {
|
if (tulip_debug > 1) {
|
||||||
if (tp->nwayset)
|
if (tp->nwayset)
|
||||||
printk(KERN_INFO "%s: Switching to %s based on link "
|
dev_info(&dev->dev,
|
||||||
"negotiation %4.4x & %4.4x = %4.4x.\n",
|
"Switching to %s based on link negotiation %04x & %04x = %04x\n",
|
||||||
dev->name, medianame[dev->if_port],
|
medianame[dev->if_port],
|
||||||
tp->sym_advertise, tp->lpar, negotiated);
|
tp->sym_advertise, tp->lpar,
|
||||||
|
negotiated);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remember to turn off bit 7 - autonegotiate
|
/* remember to turn off bit 7 - autonegotiate
|
||||||
|
@ -270,9 +271,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
iowrite32(1, ioaddr + CSR13);
|
iowrite32(1, ioaddr + CSR13);
|
||||||
|
|
||||||
if (tulip_debug > 2)
|
if (tulip_debug > 2)
|
||||||
printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 "
|
printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n",
|
||||||
"%8.8x.\n", dev->name, tp->csr6,
|
dev->name, tp->csr6,
|
||||||
ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12));
|
ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12));
|
||||||
|
|
||||||
/* now the following actually writes out the
|
/* now the following actually writes out the
|
||||||
* new csr6 values
|
* new csr6 values
|
||||||
|
@ -282,9 +283,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_INFO "%s: Autonegotiation failed, "
|
dev_info(&dev->dev,
|
||||||
"using %s, link beat status %4.4x.\n",
|
"Autonegotiation failed, using %s, link beat status %04x\n",
|
||||||
dev->name, medianame[dev->if_port], csr12);
|
medianame[dev->if_port], csr12);
|
||||||
|
|
||||||
/* remember to turn off bit 7 - autonegotiate
|
/* remember to turn off bit 7 - autonegotiate
|
||||||
* enable so we don't forget
|
* enable so we don't forget
|
||||||
|
@ -339,9 +340,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
/* we are at 100mb and a potential link change occurred */
|
/* we are at 100mb and a potential link change occurred */
|
||||||
|
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n",
|
dev_info(&dev->dev, "PNIC2 %s link beat %s\n",
|
||||||
dev->name, medianame[dev->if_port],
|
medianame[dev->if_port],
|
||||||
(csr12 & 2) ? "failed" : "good");
|
(csr12 & 2) ? "failed" : "good");
|
||||||
|
|
||||||
/* check 100 link beat */
|
/* check 100 link beat */
|
||||||
|
|
||||||
|
@ -364,9 +365,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
/* we are at 10mb and a potential link change occurred */
|
/* we are at 10mb and a potential link change occurred */
|
||||||
|
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n",
|
dev_info(&dev->dev, "PNIC2 %s link beat %s\n",
|
||||||
dev->name, medianame[dev->if_port],
|
medianame[dev->if_port],
|
||||||
(csr12 & 4) ? "failed" : "good");
|
(csr12 & 4) ? "failed" : "good");
|
||||||
|
|
||||||
|
|
||||||
tp->nway = 0;
|
tp->nway = 0;
|
||||||
|
@ -385,7 +386,7 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
|
||||||
|
|
||||||
|
|
||||||
if (tulip_debug > 1)
|
if (tulip_debug > 1)
|
||||||
printk(KERN_INFO"%s: PNIC2 Link Change Default?\n",dev->name);
|
dev_info(&dev->dev, "PNIC2 Link Change Default?\n");
|
||||||
|
|
||||||
/* if all else fails default to trying 10baseT-HD */
|
/* if all else fails default to trying 10baseT-HD */
|
||||||
dev->if_port = 0;
|
dev->if_port = 0;
|
||||||
|
|
Reference in New Issue