aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-28 15:59:18 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-01 02:26:52 -0500
commit985a63ed3faf0faaba840d806f5ca4d360d13ad3 (patch)
tree4046a7eaf762e1436f3d6e1b21e1554299ea5ff9
parentd60bec4eb7076acfc940cca3f9f219e7653a1466 (diff)
tulip/21142.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>
-rw-r--r--drivers/net/tulip/21142.c76
1 files changed, 39 insertions, 37 deletions
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c
index 9f6742fad6ca..007d8e75666d 100644
--- a/drivers/net/tulip/21142.c
+++ b/drivers/net/tulip/21142.c
@@ -43,8 +43,8 @@ void t21142_media_task(struct work_struct *work)
43 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) 43 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000)
44 csr12 |= 6; 44 csr12 |= 6;
45 if (tulip_debug > 2) 45 if (tulip_debug > 2)
46 printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", 46 dev_info(&dev->dev, "21143 negotiation status %08x, %s\n",
47 dev->name, csr12, medianame[dev->if_port]); 47 csr12, medianame[dev->if_port]);
48 if (tulip_media_cap[dev->if_port] & MediaIsMII) { 48 if (tulip_media_cap[dev->if_port] & MediaIsMII) {
49 if (tulip_check_duplex(dev) < 0) { 49 if (tulip_check_duplex(dev) < 0) {
50 netif_carrier_off(dev); 50 netif_carrier_off(dev);
@@ -56,23 +56,26 @@ void t21142_media_task(struct work_struct *work)
56 } else if (tp->nwayset) { 56 } else if (tp->nwayset) {
57 /* Don't screw up a negotiated session! */ 57 /* Don't screw up a negotiated session! */
58 if (tulip_debug > 1) 58 if (tulip_debug > 1)
59 printk(KERN_INFO"%s: Using NWay-set %s media, csr12 %8.8x.\n", 59 dev_info(&dev->dev,
60 dev->name, medianame[dev->if_port], csr12); 60 "Using NWay-set %s media, csr12 %08x\n",
61 medianame[dev->if_port], csr12);
61 } else if (tp->medialock) { 62 } else if (tp->medialock) {
62 ; 63 ;
63 } else if (dev->if_port == 3) { 64 } else if (dev->if_port == 3) {
64 if (csr12 & 2) { /* No 100mbps link beat, revert to 10mbps. */ 65 if (csr12 & 2) { /* No 100mbps link beat, revert to 10mbps. */
65 if (tulip_debug > 1) 66 if (tulip_debug > 1)
66 printk(KERN_INFO"%s: No 21143 100baseTx link beat, %8.8x, " 67 dev_info(&dev->dev,
67 "trying NWay.\n", dev->name, csr12); 68 "No 21143 100baseTx link beat, %08x, trying NWay\n",
69 csr12);
68 t21142_start_nway(dev); 70 t21142_start_nway(dev);
69 next_tick = 3*HZ; 71 next_tick = 3*HZ;
70 } 72 }
71 } else if ((csr12 & 0x7000) != 0x5000) { 73 } else if ((csr12 & 0x7000) != 0x5000) {
72 /* Negotiation failed. Search media types. */ 74 /* Negotiation failed. Search media types. */
73 if (tulip_debug > 1) 75 if (tulip_debug > 1)
74 printk(KERN_INFO"%s: 21143 negotiation failed, status %8.8x.\n", 76 dev_info(&dev->dev,
75 dev->name, csr12); 77 "21143 negotiation failed, status %08x\n",
78 csr12);
76 if (!(csr12 & 4)) { /* 10mbps link beat good. */ 79 if (!(csr12 & 4)) { /* 10mbps link beat good. */
77 new_csr6 = 0x82420000; 80 new_csr6 = 0x82420000;
78 dev->if_port = 0; 81 dev->if_port = 0;
@@ -90,8 +93,8 @@ void t21142_media_task(struct work_struct *work)
90 iowrite32(1, ioaddr + CSR13); 93 iowrite32(1, ioaddr + CSR13);
91 } 94 }
92 if (tulip_debug > 1) 95 if (tulip_debug > 1)
93 printk(KERN_INFO"%s: Testing new 21143 media %s.\n", 96 dev_info(&dev->dev, "Testing new 21143 media %s\n",
94 dev->name, medianame[dev->if_port]); 97 medianame[dev->if_port]);
95 if (new_csr6 != (tp->csr6 & ~0x00D5)) { 98 if (new_csr6 != (tp->csr6 & ~0x00D5)) {
96 tp->csr6 &= 0x00D5; 99 tp->csr6 &= 0x00D5;
97 tp->csr6 |= new_csr6; 100 tp->csr6 |= new_csr6;
@@ -119,8 +122,8 @@ void t21142_start_nway(struct net_device *dev)
119 tp->nway = tp->mediasense = 1; 122 tp->nway = tp->mediasense = 1;
120 tp->nwayset = tp->lpar = 0; 123 tp->nwayset = tp->lpar = 0;
121 if (tulip_debug > 1) 124 if (tulip_debug > 1)
122 printk(KERN_DEBUG "%s: Restarting 21143 autonegotiation, csr14=%8.8x.\n", 125 printk(KERN_DEBUG "%s: Restarting 21143 autonegotiation, csr14=%08x\n",
123 dev->name, csr14); 126 dev->name, csr14);
124 iowrite32(0x0001, ioaddr + CSR13); 127 iowrite32(0x0001, ioaddr + CSR13);
125 udelay(100); 128 udelay(100);
126 iowrite32(csr14, ioaddr + CSR14); 129 iowrite32(csr14, ioaddr + CSR14);
@@ -147,8 +150,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
147 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) 150 if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000)
148 csr12 |= 6; 151 csr12 |= 6;
149 if (tulip_debug > 1) 152 if (tulip_debug > 1)
150 printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " 153 dev_info(&dev->dev,
151 "%8.8x.\n", dev->name, csr12, csr5, csr14); 154 "21143 link status interrupt %08x, CSR5 %x, %08x\n",
155 csr12, csr5, csr14);
152 156
153 /* If NWay finished and we have a negotiated partner capability. */ 157 /* If NWay finished and we have a negotiated partner capability. */
154 if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { 158 if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) {
@@ -171,14 +175,15 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
171 175
172 if (tulip_debug > 1) { 176 if (tulip_debug > 1) {
173 if (tp->nwayset) 177 if (tp->nwayset)
174 printk(KERN_INFO "%s: Switching to %s based on link " 178 dev_info(&dev->dev,
175 "negotiation %4.4x & %4.4x = %4.4x.\n", 179 "Switching to %s based on link negotiation %04x & %04x = %04x\n",
176 dev->name, medianame[dev->if_port], tp->sym_advertise, 180 medianame[dev->if_port],
177 tp->lpar, negotiated); 181 tp->sym_advertise, tp->lpar,
182 negotiated);
178 else 183 else
179 printk(KERN_INFO "%s: Autonegotiation failed, using %s," 184 dev_info(&dev->dev,
180 " link beat status %4.4x.\n", 185 "Autonegotiation failed, using %s, link beat status %04x\n",
181 dev->name, medianame[dev->if_port], csr12); 186 medianame[dev->if_port], csr12);
182 } 187 }
183 188
184 if (tp->mtable) { 189 if (tp->mtable) {
@@ -201,14 +206,14 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
201#if 0 /* Restart shouldn't be needed. */ 206#if 0 /* Restart shouldn't be needed. */
202 iowrite32(tp->csr6 | RxOn, ioaddr + CSR6); 207 iowrite32(tp->csr6 | RxOn, ioaddr + CSR6);
203 if (tulip_debug > 2) 208 if (tulip_debug > 2)
204 printk(KERN_DEBUG "%s: Restarting Tx and Rx, CSR5 is %8.8x.\n", 209 printk(KERN_DEBUG "%s: Restarting Tx and Rx, CSR5 is %08x\n",
205 dev->name, ioread32(ioaddr + CSR5)); 210 dev->name, ioread32(ioaddr + CSR5));
206#endif 211#endif
207 tulip_start_rxtx(tp); 212 tulip_start_rxtx(tp);
208 if (tulip_debug > 2) 213 if (tulip_debug > 2)
209 printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 %8.8x.\n", 214 printk(KERN_DEBUG "%s: Setting CSR6 %08x/%x CSR12 %08x\n",
210 dev->name, tp->csr6, ioread32(ioaddr + CSR6), 215 dev->name, tp->csr6, ioread32(ioaddr + CSR6),
211 ioread32(ioaddr + CSR12)); 216 ioread32(ioaddr + CSR12));
212 } else if ((tp->nwayset && (csr5 & 0x08000000) && 217 } else if ((tp->nwayset && (csr5 & 0x08000000) &&
213 (dev->if_port == 3 || dev->if_port == 5) && 218 (dev->if_port == 3 || dev->if_port == 5) &&
214 (csr12 & 2) == 2) || 219 (csr12 & 2) == 2) ||
@@ -220,9 +225,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
220 add_timer(&tp->timer); 225 add_timer(&tp->timer);
221 } else if (dev->if_port == 3 || dev->if_port == 5) { 226 } else if (dev->if_port == 3 || dev->if_port == 5) {
222 if (tulip_debug > 1) 227 if (tulip_debug > 1)
223 printk(KERN_INFO"%s: 21143 %s link beat %s.\n", 228 dev_info(&dev->dev, "21143 %s link beat %s\n",
224 dev->name, medianame[dev->if_port], 229 medianame[dev->if_port],
225 (csr12 & 2) ? "failed" : "good"); 230 (csr12 & 2) ? "failed" : "good");
226 if ((csr12 & 2) && ! tp->medialock) { 231 if ((csr12 & 2) && ! tp->medialock) {
227 del_timer_sync(&tp->timer); 232 del_timer_sync(&tp->timer);
228 t21142_start_nway(dev); 233 t21142_start_nway(dev);
@@ -232,21 +237,18 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
232 iowrite32(csr14 & ~0x080, ioaddr + CSR14); 237 iowrite32(csr14 & ~0x080, ioaddr + CSR14);
233 } else if (dev->if_port == 0 || dev->if_port == 4) { 238 } else if (dev->if_port == 0 || dev->if_port == 4) {
234 if ((csr12 & 4) == 0) 239 if ((csr12 & 4) == 0)
235 printk(KERN_INFO"%s: 21143 10baseT link beat good.\n", 240 dev_info(&dev->dev, "21143 10baseT link beat good\n");
236 dev->name);
237 } else if (!(csr12 & 4)) { /* 10mbps link beat good. */ 241 } else if (!(csr12 & 4)) { /* 10mbps link beat good. */
238 if (tulip_debug) 242 if (tulip_debug)
239 printk(KERN_INFO"%s: 21143 10mbps sensed media.\n", 243 dev_info(&dev->dev, "21143 10mbps sensed media\n");
240 dev->name);
241 dev->if_port = 0; 244 dev->if_port = 0;
242 } else if (tp->nwayset) { 245 } else if (tp->nwayset) {
243 if (tulip_debug) 246 if (tulip_debug)
244 printk(KERN_INFO"%s: 21143 using NWay-set %s, csr6 %8.8x.\n", 247 dev_info(&dev->dev, "21143 using NWay-set %s, csr6 %08x\n",
245 dev->name, medianame[dev->if_port], tp->csr6); 248 medianame[dev->if_port], tp->csr6);
246 } else { /* 100mbps link beat good. */ 249 } else { /* 100mbps link beat good. */
247 if (tulip_debug) 250 if (tulip_debug)
248 printk(KERN_INFO"%s: 21143 100baseTx sensed media.\n", 251 dev_info(&dev->dev, "21143 100baseTx sensed media\n");
249 dev->name);
250 dev->if_port = 3; 252 dev->if_port = 3;
251 tp->csr6 = 0x838E0000 | (tp->csr6 & 0x20ff); 253 tp->csr6 = 0x838E0000 | (tp->csr6 & 0x20ff);
252 iowrite32(0x0003FF7F, ioaddr + CSR14); 254 iowrite32(0x0003FF7F, ioaddr + CSR14);