diff options
Diffstat (limited to 'drivers/net/tulip/timer.c')
-rw-r--r-- | drivers/net/tulip/timer.c | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/drivers/net/tulip/timer.c b/drivers/net/tulip/timer.c index a0e084223082..36c2725ec886 100644 --- a/drivers/net/tulip/timer.c +++ b/drivers/net/tulip/timer.c | |||
@@ -28,11 +28,11 @@ void tulip_media_task(struct work_struct *work) | |||
28 | unsigned long flags; | 28 | unsigned long flags; |
29 | 29 | ||
30 | if (tulip_debug > 2) { | 30 | if (tulip_debug > 2) { |
31 | printk(KERN_DEBUG "%s: Media selection tick, %s, status %8.8x mode" | 31 | printk(KERN_DEBUG "%s: Media selection tick, %s, status %08x mode %08x SIA %08x %08x %08x %08x\n", |
32 | " %8.8x SIA %8.8x %8.8x %8.8x %8.8x.\n", | 32 | dev->name, medianame[dev->if_port], |
33 | dev->name, medianame[dev->if_port], ioread32(ioaddr + CSR5), | 33 | ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR6), |
34 | ioread32(ioaddr + CSR6), csr12, ioread32(ioaddr + CSR13), | 34 | csr12, ioread32(ioaddr + CSR13), |
35 | ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15)); | 35 | ioread32(ioaddr + CSR14), ioread32(ioaddr + CSR15)); |
36 | } | 36 | } |
37 | switch (tp->chip_id) { | 37 | switch (tp->chip_id) { |
38 | case DC21140: | 38 | case DC21140: |
@@ -48,9 +48,9 @@ void tulip_media_task(struct work_struct *work) | |||
48 | Assume this a generic MII or SYM transceiver. */ | 48 | Assume this a generic MII or SYM transceiver. */ |
49 | next_tick = 60*HZ; | 49 | next_tick = 60*HZ; |
50 | if (tulip_debug > 2) | 50 | if (tulip_debug > 2) |
51 | printk(KERN_DEBUG "%s: network media monitor CSR6 %8.8x " | 51 | printk(KERN_DEBUG "%s: network media monitor CSR6 %08x CSR12 0x%02x\n", |
52 | "CSR12 0x%2.2x.\n", | 52 | dev->name, |
53 | dev->name, ioread32(ioaddr + CSR6), csr12 & 0xff); | 53 | ioread32(ioaddr + CSR6), csr12 & 0xff); |
54 | break; | 54 | break; |
55 | } | 55 | } |
56 | mleaf = &tp->mtable->mleaf[tp->cur_index]; | 56 | mleaf = &tp->mtable->mleaf[tp->cur_index]; |
@@ -62,9 +62,8 @@ void tulip_media_task(struct work_struct *work) | |||
62 | s8 bitnum = p[offset]; | 62 | s8 bitnum = p[offset]; |
63 | if (p[offset+1] & 0x80) { | 63 | if (p[offset+1] & 0x80) { |
64 | if (tulip_debug > 1) | 64 | if (tulip_debug > 1) |
65 | printk(KERN_DEBUG"%s: Transceiver monitor tick " | 65 | printk(KERN_DEBUG "%s: Transceiver monitor tick CSR12=%#02x, no media sense\n", |
66 | "CSR12=%#2.2x, no media sense.\n", | 66 | dev->name, csr12); |
67 | dev->name, csr12); | ||
68 | if (mleaf->type == 4) { | 67 | if (mleaf->type == 4) { |
69 | if (mleaf->media == 3 && (csr12 & 0x02)) | 68 | if (mleaf->media == 3 && (csr12 & 0x02)) |
70 | goto select_next_media; | 69 | goto select_next_media; |
@@ -72,16 +71,16 @@ void tulip_media_task(struct work_struct *work) | |||
72 | break; | 71 | break; |
73 | } | 72 | } |
74 | if (tulip_debug > 2) | 73 | if (tulip_debug > 2) |
75 | printk(KERN_DEBUG "%s: Transceiver monitor tick: CSR12=%#2.2x" | 74 | printk(KERN_DEBUG "%s: Transceiver monitor tick: CSR12=%#02x bit %d is %d, expecting %d\n", |
76 | " bit %d is %d, expecting %d.\n", | 75 | dev->name, csr12, (bitnum >> 1) & 7, |
77 | dev->name, csr12, (bitnum >> 1) & 7, | 76 | (csr12 & (1 << ((bitnum >> 1) & 7))) != 0, |
78 | (csr12 & (1 << ((bitnum >> 1) & 7))) != 0, | 77 | (bitnum >= 0)); |
79 | (bitnum >= 0)); | ||
80 | /* Check that the specified bit has the proper value. */ | 78 | /* Check that the specified bit has the proper value. */ |
81 | if ((bitnum < 0) != | 79 | if ((bitnum < 0) != |
82 | ((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) { | 80 | ((csr12 & (1 << ((bitnum >> 1) & 7))) != 0)) { |
83 | if (tulip_debug > 2) | 81 | if (tulip_debug > 2) |
84 | printk(KERN_DEBUG "%s: Link beat detected for %s.\n", dev->name, | 82 | printk(KERN_DEBUG "%s: Link beat detected for %s\n", |
83 | dev->name, | ||
85 | medianame[mleaf->media & MEDIA_MASK]); | 84 | medianame[mleaf->media & MEDIA_MASK]); |
86 | if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */ | 85 | if ((p[2] & 0x61) == 0x01) /* Bogus Znyx board. */ |
87 | goto actually_mii; | 86 | goto actually_mii; |
@@ -100,9 +99,9 @@ void tulip_media_task(struct work_struct *work) | |||
100 | if (tulip_media_cap[dev->if_port] & MediaIsFD) | 99 | if (tulip_media_cap[dev->if_port] & MediaIsFD) |
101 | goto select_next_media; /* Skip FD entries. */ | 100 | goto select_next_media; /* Skip FD entries. */ |
102 | if (tulip_debug > 1) | 101 | if (tulip_debug > 1) |
103 | printk(KERN_DEBUG "%s: No link beat on media %s," | 102 | printk(KERN_DEBUG "%s: No link beat on media %s, trying transceiver type %s\n", |
104 | " trying transceiver type %s.\n", | 103 | dev->name, |
105 | dev->name, medianame[mleaf->media & MEDIA_MASK], | 104 | medianame[mleaf->media & MEDIA_MASK], |
106 | medianame[tp->mtable->mleaf[tp->cur_index].media]); | 105 | medianame[tp->mtable->mleaf[tp->cur_index].media]); |
107 | tulip_select_media(dev, 0); | 106 | tulip_select_media(dev, 0); |
108 | /* Restart the transmit process. */ | 107 | /* Restart the transmit process. */ |
@@ -151,8 +150,8 @@ void mxic_timer(unsigned long data) | |||
151 | int next_tick = 60*HZ; | 150 | int next_tick = 60*HZ; |
152 | 151 | ||
153 | if (tulip_debug > 3) { | 152 | if (tulip_debug > 3) { |
154 | printk(KERN_INFO"%s: MXIC negotiation status %8.8x.\n", dev->name, | 153 | dev_info(&dev->dev, "MXIC negotiation status %08x\n", |
155 | ioread32(ioaddr + CSR12)); | 154 | ioread32(ioaddr + CSR12)); |
156 | } | 155 | } |
157 | if (next_tick) { | 156 | if (next_tick) { |
158 | mod_timer(&tp->timer, RUN_AT(next_tick)); | 157 | mod_timer(&tp->timer, RUN_AT(next_tick)); |
@@ -167,11 +166,10 @@ void comet_timer(unsigned long data) | |||
167 | int next_tick = 60*HZ; | 166 | int next_tick = 60*HZ; |
168 | 167 | ||
169 | if (tulip_debug > 1) | 168 | if (tulip_debug > 1) |
170 | printk(KERN_DEBUG "%s: Comet link status %4.4x partner capability " | 169 | printk(KERN_DEBUG "%s: Comet link status %04x partner capability %04x\n", |
171 | "%4.4x.\n", | 170 | dev->name, |
172 | dev->name, | 171 | tulip_mdio_read(dev, tp->phys[0], 1), |
173 | tulip_mdio_read(dev, tp->phys[0], 1), | 172 | tulip_mdio_read(dev, tp->phys[0], 5)); |
174 | tulip_mdio_read(dev, tp->phys[0], 5)); | ||
175 | /* mod_timer synchronizes us with potential add_timer calls | 173 | /* mod_timer synchronizes us with potential add_timer calls |
176 | * from interrupts. | 174 | * from interrupts. |
177 | */ | 175 | */ |