Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183771
b: refs/heads/master
c: 22086a1
h: refs/heads/master
i:
  183769: bcc0f6a
  183767: 85a9fd1
v: v3
  • Loading branch information
Joe Perches authored and David S. Miller committed Feb 1, 2010
1 parent 7301fd2 commit 55771f9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1df8bbd1420705277cd382b1386cda724d61a678
refs/heads/master: 22086a1172b69b9f6200e169dc99a252a204affb
59 changes: 30 additions & 29 deletions trunk/drivers/net/tulip/pnic2.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ void pnic2_timer(unsigned long data)
int next_tick = 60*HZ;

if (tulip_debug > 3)
printk(KERN_INFO"%s: PNIC2 negotiation status %8.8x.\n",
dev->name,ioread32(ioaddr + CSR12));
dev_info(&dev->dev, "PNIC2 negotiation status %08x\n",
ioread32(ioaddr + CSR12));

if (next_tick) {
mod_timer(&tp->timer, RUN_AT(next_tick));
Expand Down Expand Up @@ -125,8 +125,8 @@ void pnic2_start_nway(struct net_device *dev)
csr14 |= 0x00001184;

if (tulip_debug > 1)
printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, "
"csr14=%8.8x.\n", dev->name, csr14);
printk(KERN_DEBUG "%s: Restarting PNIC2 autonegotiation, csr14=%08x\n",
dev->name, csr14);

/* tell pnic2_lnk_change we are doing an nway negotiation */
dev->if_port = 0;
Expand All @@ -137,8 +137,8 @@ void pnic2_start_nway(struct net_device *dev)

tp->csr6 = ioread32(ioaddr + CSR6);
if (tulip_debug > 1)
printk(KERN_DEBUG "%s: On Entry to Nway, "
"csr6=%8.8x.\n", dev->name, tp->csr6);
printk(KERN_DEBUG "%s: On Entry to Nway, csr6=%08x\n",
dev->name, tp->csr6);

/* mask off any bits not to touch
* comment at top of file explains mask value
Expand Down Expand Up @@ -181,9 +181,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
int csr12 = ioread32(ioaddr + CSR12);

if (tulip_debug > 1)
printk(KERN_INFO"%s: PNIC2 link status interrupt %8.8x, "
" CSR5 %x, %8.8x.\n", dev->name, csr12,
csr5, ioread32(ioaddr + CSR14));
dev_info(&dev->dev,
"PNIC2 link status interrupt %08x, CSR5 %x, %08x\n",
csr12, csr5, ioread32(ioaddr + CSR14));

/* If NWay finished and we have a negotiated partner capability.
* check bits 14:12 for bit pattern 101 - all is good
Expand Down Expand Up @@ -215,9 +215,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
else if (negotiated & 0x0020) dev->if_port = 0;
else {
if (tulip_debug > 1)
printk(KERN_INFO "%s: funny autonegotiate result "
"csr12 %8.8x advertising %4.4x\n",
dev->name, csr12, tp->sym_advertise);
dev_info(&dev->dev,
"funny autonegotiate result csr12 %08x advertising %04x\n",
csr12, tp->sym_advertise);
tp->nwayset = 0;
/* so check if 100baseTx link state is okay */
if ((csr12 & 2) == 0 && (tp->sym_advertise & 0x0180))
Expand All @@ -231,10 +231,11 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)

if (tulip_debug > 1) {
if (tp->nwayset)
printk(KERN_INFO "%s: Switching to %s based on link "
"negotiation %4.4x & %4.4x = %4.4x.\n",
dev->name, medianame[dev->if_port],
tp->sym_advertise, tp->lpar, negotiated);
dev_info(&dev->dev,
"Switching to %s based on link negotiation %04x & %04x = %04x\n",
medianame[dev->if_port],
tp->sym_advertise, tp->lpar,
negotiated);
}

/* remember to turn off bit 7 - autonegotiate
Expand Down Expand Up @@ -270,9 +271,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
iowrite32(1, ioaddr + CSR13);

if (tulip_debug > 2)
printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 "
"%8.8x.\n", dev->name, tp->csr6,
ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12));
printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n",
dev->name, tp->csr6,
ioread32(ioaddr + CSR6), ioread32(ioaddr + CSR12));

/* now the following actually writes out the
* new csr6 values
Expand All @@ -282,9 +283,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
return;

} else {
printk(KERN_INFO "%s: Autonegotiation failed, "
"using %s, link beat status %4.4x.\n",
dev->name, medianame[dev->if_port], csr12);
dev_info(&dev->dev,
"Autonegotiation failed, using %s, link beat status %04x\n",
medianame[dev->if_port], csr12);

/* remember to turn off bit 7 - autonegotiate
* enable so we don't forget
Expand Down Expand Up @@ -339,9 +340,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
/* we are at 100mb and a potential link change occurred */

if (tulip_debug > 1)
printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n",
dev->name, medianame[dev->if_port],
(csr12 & 2) ? "failed" : "good");
dev_info(&dev->dev, "PNIC2 %s link beat %s\n",
medianame[dev->if_port],
(csr12 & 2) ? "failed" : "good");

/* check 100 link beat */

Expand All @@ -364,9 +365,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
/* we are at 10mb and a potential link change occurred */

if (tulip_debug > 1)
printk(KERN_INFO"%s: PNIC2 %s link beat %s.\n",
dev->name, medianame[dev->if_port],
(csr12 & 4) ? "failed" : "good");
dev_info(&dev->dev, "PNIC2 %s link beat %s\n",
medianame[dev->if_port],
(csr12 & 4) ? "failed" : "good");


tp->nway = 0;
Expand All @@ -385,7 +386,7 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)


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 */
dev->if_port = 0;
Expand Down

0 comments on commit 55771f9

Please sign in to comment.