diff options
author | Joe Perches <joe@perches.com> | 2011-06-26 15:01:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-27 03:09:47 -0400 |
commit | 23efcb738ea51befe0674e0685fc6cfe353aa553 (patch) | |
tree | f5bbf62acc9bfa2b771b8ecb6ece5cbb771e9e98 /drivers/net/wan | |
parent | c75bb2c6f0cf455c23e60f14d780e841dd47f801 (diff) |
wan: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/hostess_sv11.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/lapbether.c | 18 | ||||
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 4 | ||||
-rw-r--r-- | drivers/net/wan/sbni.c | 67 | ||||
-rw-r--r-- | drivers/net/wan/sealevel.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 47 | ||||
-rw-r--r-- | drivers/net/wan/z85230.c | 34 |
7 files changed, 96 insertions, 96 deletions
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c index e817583e6ec5..3d80e4267de8 100644 --- a/drivers/net/wan/hostess_sv11.c +++ b/drivers/net/wan/hostess_sv11.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl> | 20 | * Generic HDLC port Copyright (C) 2008 Krzysztof Halasa <khc@pm.waw.pl> |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #include <linux/module.h> | 25 | #include <linux/module.h> |
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
@@ -192,8 +194,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq) | |||
192 | */ | 194 | */ |
193 | 195 | ||
194 | if (!request_region(iobase, 8, "Comtrol SV11")) { | 196 | if (!request_region(iobase, 8, "Comtrol SV11")) { |
195 | printk(KERN_WARNING "hostess: I/O 0x%X already in use.\n", | 197 | pr_warn("I/O 0x%X already in use\n", iobase); |
196 | iobase); | ||
197 | return NULL; | 198 | return NULL; |
198 | } | 199 | } |
199 | 200 | ||
@@ -221,7 +222,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq) | |||
221 | 222 | ||
222 | if (request_irq(irq, z8530_interrupt, IRQF_DISABLED, | 223 | if (request_irq(irq, z8530_interrupt, IRQF_DISABLED, |
223 | "Hostess SV11", sv) < 0) { | 224 | "Hostess SV11", sv) < 0) { |
224 | printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq); | 225 | pr_warn("IRQ %d already in use\n", irq); |
225 | goto err_irq; | 226 | goto err_irq; |
226 | } | 227 | } |
227 | 228 | ||
@@ -255,7 +256,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq) | |||
255 | */ | 256 | */ |
256 | 257 | ||
257 | if (z8530_init(sv)) { | 258 | if (z8530_init(sv)) { |
258 | printk(KERN_ERR "Z8530 series device not found.\n"); | 259 | pr_err("Z8530 series device not found\n"); |
259 | enable_irq(irq); | 260 | enable_irq(irq); |
260 | goto free_dma; | 261 | goto free_dma; |
261 | } | 262 | } |
@@ -282,7 +283,7 @@ static struct z8530_dev *sv11_init(int iobase, int irq) | |||
282 | netdev->irq = irq; | 283 | netdev->irq = irq; |
283 | 284 | ||
284 | if (register_hdlc_device(netdev)) { | 285 | if (register_hdlc_device(netdev)) { |
285 | printk(KERN_ERR "hostess: unable to register HDLC device.\n"); | 286 | pr_err("unable to register HDLC device\n"); |
286 | free_netdev(netdev); | 287 | free_netdev(netdev); |
287 | goto free_dma; | 288 | goto free_dma; |
288 | } | 289 | } |
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index eec463f99c09..a817081737a0 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * 2000-11-14 Henner Eisen dev_hold/put, NETDEV_GOING_DOWN support | 20 | * 2000-11-14 Henner Eisen dev_hold/put, NETDEV_GOING_DOWN support |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
24 | #include <linux/types.h> | 26 | #include <linux/types.h> |
25 | #include <linux/socket.h> | 27 | #include <linux/socket.h> |
@@ -165,13 +167,11 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb, | |||
165 | break; | 167 | break; |
166 | case X25_IFACE_CONNECT: | 168 | case X25_IFACE_CONNECT: |
167 | if ((err = lapb_connect_request(dev)) != LAPB_OK) | 169 | if ((err = lapb_connect_request(dev)) != LAPB_OK) |
168 | printk(KERN_ERR "lapbeth: lapb_connect_request " | 170 | pr_err("lapb_connect_request error: %d\n", err); |
169 | "error: %d\n", err); | ||
170 | goto drop; | 171 | goto drop; |
171 | case X25_IFACE_DISCONNECT: | 172 | case X25_IFACE_DISCONNECT: |
172 | if ((err = lapb_disconnect_request(dev)) != LAPB_OK) | 173 | if ((err = lapb_disconnect_request(dev)) != LAPB_OK) |
173 | printk(KERN_ERR "lapbeth: lapb_disconnect_request " | 174 | pr_err("lapb_disconnect_request err: %d\n", err); |
174 | "err: %d\n", err); | ||
175 | /* Fall thru */ | 175 | /* Fall thru */ |
176 | default: | 176 | default: |
177 | goto drop; | 177 | goto drop; |
@@ -180,7 +180,7 @@ static netdev_tx_t lapbeth_xmit(struct sk_buff *skb, | |||
180 | skb_pull(skb, 1); | 180 | skb_pull(skb, 1); |
181 | 181 | ||
182 | if ((err = lapb_data_request(dev, skb)) != LAPB_OK) { | 182 | if ((err = lapb_data_request(dev, skb)) != LAPB_OK) { |
183 | printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err); | 183 | pr_err("lapb_data_request error - %d\n", err); |
184 | goto drop; | 184 | goto drop; |
185 | } | 185 | } |
186 | out: | 186 | out: |
@@ -220,7 +220,7 @@ static void lapbeth_connected(struct net_device *dev, int reason) | |||
220 | struct sk_buff *skb = dev_alloc_skb(1); | 220 | struct sk_buff *skb = dev_alloc_skb(1); |
221 | 221 | ||
222 | if (!skb) { | 222 | if (!skb) { |
223 | printk(KERN_ERR "lapbeth: out of memory\n"); | 223 | pr_err("out of memory\n"); |
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | 226 | ||
@@ -237,7 +237,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason) | |||
237 | struct sk_buff *skb = dev_alloc_skb(1); | 237 | struct sk_buff *skb = dev_alloc_skb(1); |
238 | 238 | ||
239 | if (!skb) { | 239 | if (!skb) { |
240 | printk(KERN_ERR "lapbeth: out of memory\n"); | 240 | pr_err("out of memory\n"); |
241 | return; | 241 | return; |
242 | } | 242 | } |
243 | 243 | ||
@@ -277,7 +277,7 @@ static int lapbeth_open(struct net_device *dev) | |||
277 | int err; | 277 | int err; |
278 | 278 | ||
279 | if ((err = lapb_register(dev, &lapbeth_callbacks)) != LAPB_OK) { | 279 | if ((err = lapb_register(dev, &lapbeth_callbacks)) != LAPB_OK) { |
280 | printk(KERN_ERR "lapbeth: lapb_register error - %d\n", err); | 280 | pr_err("lapb_register error: %d\n", err); |
281 | return -ENODEV; | 281 | return -ENODEV; |
282 | } | 282 | } |
283 | 283 | ||
@@ -292,7 +292,7 @@ static int lapbeth_close(struct net_device *dev) | |||
292 | netif_stop_queue(dev); | 292 | netif_stop_queue(dev); |
293 | 293 | ||
294 | if ((err = lapb_unregister(dev)) != LAPB_OK) | 294 | if ((err = lapb_unregister(dev)) != LAPB_OK) |
295 | printk(KERN_ERR "lapbeth: lapb_unregister error - %d\n", err); | 295 | pr_err("lapb_unregister error: %d\n", err); |
296 | 296 | ||
297 | return 0; | 297 | return 0; |
298 | } | 298 | } |
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 9617d3d0ee39..1eeedd6a10b1 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -212,6 +212,8 @@ static const char rcsid[] = | |||
212 | * | 212 | * |
213 | */ | 213 | */ |
214 | 214 | ||
215 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
216 | |||
215 | #include <linux/module.h> | 217 | #include <linux/module.h> |
216 | #include <linux/kernel.h> | 218 | #include <linux/kernel.h> |
217 | #include <linux/mm.h> | 219 | #include <linux/mm.h> |
@@ -3242,7 +3244,7 @@ static inline void show_version(void) | |||
3242 | rcsdate++; | 3244 | rcsdate++; |
3243 | tmp = strrchr(rcsdate, ' '); | 3245 | tmp = strrchr(rcsdate, ' '); |
3244 | *tmp = '\0'; | 3246 | *tmp = '\0'; |
3245 | printk(KERN_INFO "Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate); | 3247 | pr_info("Cyclades-PC300 driver %s %s\n", rcsvers, rcsdate); |
3246 | } /* show_version */ | 3248 | } /* show_version */ |
3247 | 3249 | ||
3248 | static const struct net_device_ops cpc_netdev_ops = { | 3250 | static const struct net_device_ops cpc_netdev_ops = { |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index cff13a9597cd..40e95facdb6c 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -37,6 +37,8 @@ | |||
37 | * Known problem: this driver wasn't tested on multiprocessor machine. | 37 | * Known problem: this driver wasn't tested on multiprocessor machine. |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
41 | |||
40 | #include <linux/module.h> | 42 | #include <linux/module.h> |
41 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
42 | #include <linux/ptrace.h> | 44 | #include <linux/ptrace.h> |
@@ -200,8 +202,8 @@ sbni_isa_probe( struct net_device *dev ) | |||
200 | 202 | ||
201 | return 0; | 203 | return 0; |
202 | else { | 204 | else { |
203 | printk( KERN_ERR "sbni: base address 0x%lx is busy, or adapter " | 205 | pr_err("base address 0x%lx is busy, or adapter is malfunctional!\n", |
204 | "is malfunctional!\n", dev->base_addr ); | 206 | dev->base_addr); |
205 | return -ENODEV; | 207 | return -ENODEV; |
206 | } | 208 | } |
207 | } | 209 | } |
@@ -226,7 +228,6 @@ static void __init sbni_devsetup(struct net_device *dev) | |||
226 | int __init sbni_probe(int unit) | 228 | int __init sbni_probe(int unit) |
227 | { | 229 | { |
228 | struct net_device *dev; | 230 | struct net_device *dev; |
229 | static unsigned version_printed __initdata = 0; | ||
230 | int err; | 231 | int err; |
231 | 232 | ||
232 | dev = alloc_netdev(sizeof(struct net_local), "sbni", sbni_devsetup); | 233 | dev = alloc_netdev(sizeof(struct net_local), "sbni", sbni_devsetup); |
@@ -250,8 +251,7 @@ int __init sbni_probe(int unit) | |||
250 | free_netdev(dev); | 251 | free_netdev(dev); |
251 | return err; | 252 | return err; |
252 | } | 253 | } |
253 | if( version_printed++ == 0 ) | 254 | pr_info_once("%s", version); |
254 | printk( KERN_INFO "%s", version ); | ||
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
@@ -326,9 +326,9 @@ sbni_pci_probe( struct net_device *dev ) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | if (pci_irq_line <= 0 || pci_irq_line >= nr_irqs) | 328 | if (pci_irq_line <= 0 || pci_irq_line >= nr_irqs) |
329 | printk( KERN_WARNING | 329 | pr_warn( |
330 | " WARNING: The PCI BIOS assigned this PCI card to IRQ %d, which is unlikely to work!.\n" | 330 | "WARNING: The PCI BIOS assigned this PCI card to IRQ %d, which is unlikely to work!.\n" |
331 | " You should use the PCI BIOS setup to assign a valid IRQ line.\n", | 331 | "You should use the PCI BIOS setup to assign a valid IRQ line.\n", |
332 | pci_irq_line ); | 332 | pci_irq_line ); |
333 | 333 | ||
334 | /* avoiding re-enable dual adapters */ | 334 | /* avoiding re-enable dual adapters */ |
@@ -372,8 +372,7 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq ) | |||
372 | outb( 0, ioaddr + CSR0 ); | 372 | outb( 0, ioaddr + CSR0 ); |
373 | 373 | ||
374 | if( !irq ) { | 374 | if( !irq ) { |
375 | printk( KERN_ERR "%s: can't detect device irq!\n", | 375 | pr_err("%s: can't detect device irq!\n", dev->name); |
376 | dev->name ); | ||
377 | release_region( ioaddr, SBNI_IO_EXTENT ); | 376 | release_region( ioaddr, SBNI_IO_EXTENT ); |
378 | return NULL; | 377 | return NULL; |
379 | } | 378 | } |
@@ -386,7 +385,7 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq ) | |||
386 | /* Fill in sbni-specific dev fields. */ | 385 | /* Fill in sbni-specific dev fields. */ |
387 | nl = netdev_priv(dev); | 386 | nl = netdev_priv(dev); |
388 | if( !nl ) { | 387 | if( !nl ) { |
389 | printk( KERN_ERR "%s: unable to get memory!\n", dev->name ); | 388 | pr_err("%s: unable to get memory!\n", dev->name); |
390 | release_region( ioaddr, SBNI_IO_EXTENT ); | 389 | release_region( ioaddr, SBNI_IO_EXTENT ); |
391 | return NULL; | 390 | return NULL; |
392 | } | 391 | } |
@@ -415,21 +414,21 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq ) | |||
415 | if( inb( ioaddr + CSR0 ) & 0x01 ) | 414 | if( inb( ioaddr + CSR0 ) & 0x01 ) |
416 | nl->state |= FL_SLOW_MODE; | 415 | nl->state |= FL_SLOW_MODE; |
417 | 416 | ||
418 | printk( KERN_NOTICE "%s: ioaddr %#lx, irq %d, " | 417 | pr_notice("%s: ioaddr %#lx, irq %d, MAC: 00:ff:01:%02x:%02x:%02x\n", |
419 | "MAC: 00:ff:01:%02x:%02x:%02x\n", | 418 | dev->name, dev->base_addr, dev->irq, |
420 | dev->name, dev->base_addr, dev->irq, | 419 | ((u8 *)dev->dev_addr)[3], |
421 | ((u8 *) dev->dev_addr) [3], | 420 | ((u8 *)dev->dev_addr)[4], |
422 | ((u8 *) dev->dev_addr) [4], | 421 | ((u8 *)dev->dev_addr)[5]); |
423 | ((u8 *) dev->dev_addr) [5] ); | ||
424 | 422 | ||
425 | printk( KERN_NOTICE "%s: speed %d, receive level ", dev->name, | 423 | pr_notice("%s: speed %d", |
426 | ( (nl->state & FL_SLOW_MODE) ? 500000 : 2000000) | 424 | dev->name, |
427 | / (1 << nl->csr1.rate) ); | 425 | ((nl->state & FL_SLOW_MODE) ? 500000 : 2000000) |
426 | / (1 << nl->csr1.rate)); | ||
428 | 427 | ||
429 | if( nl->delta_rxl == 0 ) | 428 | if( nl->delta_rxl == 0 ) |
430 | printk( "0x%x (fixed)\n", nl->cur_rxl_index ); | 429 | pr_cont(", receive level 0x%x (fixed)\n", nl->cur_rxl_index); |
431 | else | 430 | else |
432 | printk( "(auto)\n"); | 431 | pr_cont(", receive level (auto)\n"); |
433 | 432 | ||
434 | #ifdef CONFIG_SBNI_MULTILINE | 433 | #ifdef CONFIG_SBNI_MULTILINE |
435 | nl->master = dev; | 434 | nl->master = dev; |
@@ -568,7 +567,7 @@ handle_channel( struct net_device *dev ) | |||
568 | */ | 567 | */ |
569 | csr0 = inb( ioaddr + CSR0 ); | 568 | csr0 = inb( ioaddr + CSR0 ); |
570 | if( !(csr0 & TR_RDY) || (csr0 & RC_RDY) ) | 569 | if( !(csr0 & TR_RDY) || (csr0 & RC_RDY) ) |
571 | printk( KERN_ERR "%s: internal error!\n", dev->name ); | 570 | netdev_err(dev, "internal error!\n"); |
572 | 571 | ||
573 | /* if state & FL_NEED_RESEND != 0 then tx_frameno != 0 */ | 572 | /* if state & FL_NEED_RESEND != 0 then tx_frameno != 0 */ |
574 | if( req_ans || nl->tx_frameno != 0 ) | 573 | if( req_ans || nl->tx_frameno != 0 ) |
@@ -851,7 +850,7 @@ prepare_to_send( struct sk_buff *skb, struct net_device *dev ) | |||
851 | 850 | ||
852 | /* nl->tx_buf_p == NULL here! */ | 851 | /* nl->tx_buf_p == NULL here! */ |
853 | if( nl->tx_buf_p ) | 852 | if( nl->tx_buf_p ) |
854 | printk( KERN_ERR "%s: memory leak!\n", dev->name ); | 853 | netdev_err(dev, "memory leak!\n"); |
855 | 854 | ||
856 | nl->outpos = 0; | 855 | nl->outpos = 0; |
857 | nl->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND); | 856 | nl->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND); |
@@ -1179,16 +1178,15 @@ sbni_open( struct net_device *dev ) | |||
1179 | 1178 | ||
1180 | ((struct net_local *) (netdev_priv(*p))) | 1179 | ((struct net_local *) (netdev_priv(*p))) |
1181 | ->second = dev; | 1180 | ->second = dev; |
1182 | printk( KERN_NOTICE "%s: using shared irq " | 1181 | netdev_notice(dev, "using shared irq with %s\n", |
1183 | "with %s\n", dev->name, (*p)->name ); | 1182 | (*p)->name); |
1184 | nl->state |= FL_SECONDARY; | 1183 | nl->state |= FL_SECONDARY; |
1185 | goto handler_attached; | 1184 | goto handler_attached; |
1186 | } | 1185 | } |
1187 | } | 1186 | } |
1188 | 1187 | ||
1189 | if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) { | 1188 | if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) { |
1190 | printk( KERN_ERR "%s: unable to get IRQ %d.\n", | 1189 | netdev_err(dev, "unable to get IRQ %d\n", dev->irq); |
1191 | dev->name, dev->irq ); | ||
1192 | return -EAGAIN; | 1190 | return -EAGAIN; |
1193 | } | 1191 | } |
1194 | 1192 | ||
@@ -1220,8 +1218,8 @@ sbni_close( struct net_device *dev ) | |||
1220 | struct net_local *nl = netdev_priv(dev); | 1218 | struct net_local *nl = netdev_priv(dev); |
1221 | 1219 | ||
1222 | if( nl->second && nl->second->flags & IFF_UP ) { | 1220 | if( nl->second && nl->second->flags & IFF_UP ) { |
1223 | printk( KERN_NOTICE "Secondary channel (%s) is active!\n", | 1221 | netdev_notice(dev, "Secondary channel (%s) is active!\n", |
1224 | nl->second->name ); | 1222 | nl->second->name); |
1225 | return -EBUSY; | 1223 | return -EBUSY; |
1226 | } | 1224 | } |
1227 | 1225 | ||
@@ -1363,8 +1361,8 @@ sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd ) | |||
1363 | return -EFAULT; | 1361 | return -EFAULT; |
1364 | slave_dev = dev_get_by_name(&init_net, slave_name ); | 1362 | slave_dev = dev_get_by_name(&init_net, slave_name ); |
1365 | if( !slave_dev || !(slave_dev->flags & IFF_UP) ) { | 1363 | if( !slave_dev || !(slave_dev->flags & IFF_UP) ) { |
1366 | printk( KERN_ERR "%s: trying to enslave non-active " | 1364 | netdev_err(dev, "trying to enslave non-active device %s\n", |
1367 | "device %s\n", dev->name, slave_name ); | 1365 | slave_name); |
1368 | return -EPERM; | 1366 | return -EPERM; |
1369 | } | 1367 | } |
1370 | 1368 | ||
@@ -1417,8 +1415,7 @@ enslave( struct net_device *dev, struct net_device *slave_dev ) | |||
1417 | 1415 | ||
1418 | spin_unlock( &snl->lock ); | 1416 | spin_unlock( &snl->lock ); |
1419 | spin_unlock( &nl->lock ); | 1417 | spin_unlock( &nl->lock ); |
1420 | printk( KERN_NOTICE "%s: slave device (%s) attached.\n", | 1418 | netdev_notice(dev, "slave device (%s) attached\n", slave_dev->name); |
1421 | dev->name, slave_dev->name ); | ||
1422 | return 0; | 1419 | return 0; |
1423 | } | 1420 | } |
1424 | 1421 | ||
@@ -1547,7 +1544,7 @@ sbni_setup( char *p ) | |||
1547 | break; | 1544 | break; |
1548 | } | 1545 | } |
1549 | bad_param: | 1546 | bad_param: |
1550 | printk( KERN_ERR "Error in sbni kernel parameter!\n" ); | 1547 | pr_err("Error in sbni kernel parameter!\n"); |
1551 | return 0; | 1548 | return 0; |
1552 | } | 1549 | } |
1553 | 1550 | ||
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index e91457d6023e..0b4fd05e1508 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
@@ -190,7 +192,7 @@ static int slvl_setup(struct slvl_device *sv, int iobase, int irq) | |||
190 | dev->irq = irq; | 192 | dev->irq = irq; |
191 | 193 | ||
192 | if (register_hdlc_device(dev)) { | 194 | if (register_hdlc_device(dev)) { |
193 | printk(KERN_ERR "sealevel: unable to register HDLC device\n"); | 195 | pr_err("unable to register HDLC device\n"); |
194 | free_netdev(dev); | 196 | free_netdev(dev); |
195 | return -1; | 197 | return -1; |
196 | } | 198 | } |
@@ -215,8 +217,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, | |||
215 | */ | 217 | */ |
216 | 218 | ||
217 | if (!request_region(iobase, 8, "Sealevel 4021")) { | 219 | if (!request_region(iobase, 8, "Sealevel 4021")) { |
218 | printk(KERN_WARNING "sealevel: I/O 0x%X already in use.\n", | 220 | pr_warn("I/O 0x%X already in use\n", iobase); |
219 | iobase); | ||
220 | return NULL; | 221 | return NULL; |
221 | } | 222 | } |
222 | 223 | ||
@@ -267,7 +268,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, | |||
267 | 268 | ||
268 | if (request_irq(irq, z8530_interrupt, IRQF_DISABLED, | 269 | if (request_irq(irq, z8530_interrupt, IRQF_DISABLED, |
269 | "SeaLevel", dev) < 0) { | 270 | "SeaLevel", dev) < 0) { |
270 | printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq); | 271 | pr_warn("IRQ %d already in use\n", irq); |
271 | goto err_request_irq; | 272 | goto err_request_irq; |
272 | } | 273 | } |
273 | 274 | ||
@@ -292,7 +293,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq, | |||
292 | */ | 293 | */ |
293 | 294 | ||
294 | if (z8530_init(dev) != 0) { | 295 | if (z8530_init(dev) != 0) { |
295 | printk(KERN_ERR "Z8530 series device not found.\n"); | 296 | pr_err("Z8530 series device not found\n"); |
296 | enable_irq(irq); | 297 | enable_irq(irq); |
297 | goto free_hw; | 298 | goto free_hw; |
298 | } | 299 | } |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 24297b274cd4..46ceb3ae9073 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -14,6 +14,8 @@ | |||
14 | * 2000-10-29 Henner Eisen lapb_data_indication() return status. | 14 | * 2000-10-29 Henner Eisen lapb_data_indication() return status. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
18 | 20 | ||
19 | #include <asm/system.h> | 21 | #include <asm/system.h> |
@@ -96,7 +98,7 @@ static struct x25_asy *x25_asy_alloc(void) | |||
96 | x25_asy_devs[i] = dev; | 98 | x25_asy_devs[i] = dev; |
97 | return sl; | 99 | return sl; |
98 | } else { | 100 | } else { |
99 | printk(KERN_WARNING "x25_asy_alloc() - register_netdev() failure.\n"); | 101 | pr_warn("%s(): register_netdev() failure\n", __func__); |
100 | free_netdev(dev); | 102 | free_netdev(dev); |
101 | } | 103 | } |
102 | } | 104 | } |
@@ -114,8 +116,7 @@ static void x25_asy_free(struct x25_asy *sl) | |||
114 | sl->xbuff = NULL; | 116 | sl->xbuff = NULL; |
115 | 117 | ||
116 | if (!test_and_clear_bit(SLF_INUSE, &sl->flags)) | 118 | if (!test_and_clear_bit(SLF_INUSE, &sl->flags)) |
117 | printk(KERN_ERR "%s: x25_asy_free for already free unit.\n", | 119 | netdev_err(sl->dev, "x25_asy_free for already free unit\n"); |
118 | sl->dev->name); | ||
119 | } | 120 | } |
120 | 121 | ||
121 | static int x25_asy_change_mtu(struct net_device *dev, int newmtu) | 122 | static int x25_asy_change_mtu(struct net_device *dev, int newmtu) |
@@ -128,8 +129,7 @@ static int x25_asy_change_mtu(struct net_device *dev, int newmtu) | |||
128 | rbuff = kmalloc(len + 4, GFP_ATOMIC); | 129 | rbuff = kmalloc(len + 4, GFP_ATOMIC); |
129 | 130 | ||
130 | if (xbuff == NULL || rbuff == NULL) { | 131 | if (xbuff == NULL || rbuff == NULL) { |
131 | printk(KERN_WARNING "%s: unable to grow X.25 buffers, MTU change cancelled.\n", | 132 | netdev_warn(dev, "unable to grow X.25 buffers, MTU change cancelled\n"); |
132 | dev->name); | ||
133 | kfree(xbuff); | 133 | kfree(xbuff); |
134 | kfree(rbuff); | 134 | kfree(rbuff); |
135 | return -ENOMEM; | 135 | return -ENOMEM; |
@@ -198,8 +198,7 @@ static void x25_asy_bump(struct x25_asy *sl) | |||
198 | 198 | ||
199 | skb = dev_alloc_skb(count+1); | 199 | skb = dev_alloc_skb(count+1); |
200 | if (skb == NULL) { | 200 | if (skb == NULL) { |
201 | printk(KERN_WARNING "%s: memory squeeze, dropping packet.\n", | 201 | netdev_warn(sl->dev, "memory squeeze, dropping packet\n"); |
202 | sl->dev->name); | ||
203 | dev->stats.rx_dropped++; | 202 | dev->stats.rx_dropped++; |
204 | return; | 203 | return; |
205 | } | 204 | } |
@@ -287,9 +286,9 @@ static void x25_asy_timeout(struct net_device *dev) | |||
287 | /* May be we must check transmitter timeout here ? | 286 | /* May be we must check transmitter timeout here ? |
288 | * 14 Oct 1994 Dmitry Gorodchanin. | 287 | * 14 Oct 1994 Dmitry Gorodchanin. |
289 | */ | 288 | */ |
290 | printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name, | 289 | netdev_warn(dev, "transmit timed out, %s?\n", |
291 | (tty_chars_in_buffer(sl->tty) || sl->xleft) ? | 290 | (tty_chars_in_buffer(sl->tty) || sl->xleft) ? |
292 | "bad line quality" : "driver error"); | 291 | "bad line quality" : "driver error"); |
293 | sl->xleft = 0; | 292 | sl->xleft = 0; |
294 | clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); | 293 | clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags); |
295 | x25_asy_unlock(sl); | 294 | x25_asy_unlock(sl); |
@@ -306,8 +305,7 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb, | |||
306 | int err; | 305 | int err; |
307 | 306 | ||
308 | if (!netif_running(sl->dev)) { | 307 | if (!netif_running(sl->dev)) { |
309 | printk(KERN_ERR "%s: xmit call when iface is down\n", | 308 | netdev_err(dev, "xmit call when iface is down\n"); |
310 | dev->name); | ||
311 | kfree_skb(skb); | 309 | kfree_skb(skb); |
312 | return NETDEV_TX_OK; | 310 | return NETDEV_TX_OK; |
313 | } | 311 | } |
@@ -318,13 +316,15 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb, | |||
318 | case X25_IFACE_CONNECT: /* Connection request .. do nothing */ | 316 | case X25_IFACE_CONNECT: /* Connection request .. do nothing */ |
319 | err = lapb_connect_request(dev); | 317 | err = lapb_connect_request(dev); |
320 | if (err != LAPB_OK) | 318 | if (err != LAPB_OK) |
321 | printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err); | 319 | netdev_err(dev, "lapb_connect_request error: %d\n", |
320 | err); | ||
322 | kfree_skb(skb); | 321 | kfree_skb(skb); |
323 | return NETDEV_TX_OK; | 322 | return NETDEV_TX_OK; |
324 | case X25_IFACE_DISCONNECT: /* do nothing - hang up ?? */ | 323 | case X25_IFACE_DISCONNECT: /* do nothing - hang up ?? */ |
325 | err = lapb_disconnect_request(dev); | 324 | err = lapb_disconnect_request(dev); |
326 | if (err != LAPB_OK) | 325 | if (err != LAPB_OK) |
327 | printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err); | 326 | netdev_err(dev, "lapb_disconnect_request error: %d\n", |
327 | err); | ||
328 | default: | 328 | default: |
329 | kfree_skb(skb); | 329 | kfree_skb(skb); |
330 | return NETDEV_TX_OK; | 330 | return NETDEV_TX_OK; |
@@ -343,7 +343,7 @@ static netdev_tx_t x25_asy_xmit(struct sk_buff *skb, | |||
343 | 343 | ||
344 | err = lapb_data_request(dev, skb); | 344 | err = lapb_data_request(dev, skb); |
345 | if (err != LAPB_OK) { | 345 | if (err != LAPB_OK) { |
346 | printk(KERN_ERR "x25_asy: lapb_data_request error - %d\n", err); | 346 | netdev_err(dev, "lapb_data_request error: %d\n", err); |
347 | kfree_skb(skb); | 347 | kfree_skb(skb); |
348 | return NETDEV_TX_OK; | 348 | return NETDEV_TX_OK; |
349 | } | 349 | } |
@@ -378,7 +378,7 @@ static void x25_asy_data_transmit(struct net_device *dev, struct sk_buff *skb) | |||
378 | spin_lock(&sl->lock); | 378 | spin_lock(&sl->lock); |
379 | if (netif_queue_stopped(sl->dev) || sl->tty == NULL) { | 379 | if (netif_queue_stopped(sl->dev) || sl->tty == NULL) { |
380 | spin_unlock(&sl->lock); | 380 | spin_unlock(&sl->lock); |
381 | printk(KERN_ERR "x25_asy: tbusy drop\n"); | 381 | netdev_err(dev, "tbusy drop\n"); |
382 | kfree_skb(skb); | 382 | kfree_skb(skb); |
383 | return; | 383 | return; |
384 | } | 384 | } |
@@ -404,7 +404,7 @@ static void x25_asy_connected(struct net_device *dev, int reason) | |||
404 | 404 | ||
405 | skb = dev_alloc_skb(1); | 405 | skb = dev_alloc_skb(1); |
406 | if (skb == NULL) { | 406 | if (skb == NULL) { |
407 | printk(KERN_ERR "x25_asy: out of memory\n"); | 407 | netdev_err(dev, "out of memory\n"); |
408 | return; | 408 | return; |
409 | } | 409 | } |
410 | 410 | ||
@@ -423,7 +423,7 @@ static void x25_asy_disconnected(struct net_device *dev, int reason) | |||
423 | 423 | ||
424 | skb = dev_alloc_skb(1); | 424 | skb = dev_alloc_skb(1); |
425 | if (skb == NULL) { | 425 | if (skb == NULL) { |
426 | printk(KERN_ERR "x25_asy: out of memory\n"); | 426 | netdev_err(dev, "out of memory\n"); |
427 | return; | 427 | return; |
428 | } | 428 | } |
429 | 429 | ||
@@ -603,8 +603,8 @@ static void x25_asy_close_tty(struct tty_struct *tty) | |||
603 | 603 | ||
604 | err = lapb_unregister(sl->dev); | 604 | err = lapb_unregister(sl->dev); |
605 | if (err != LAPB_OK) | 605 | if (err != LAPB_OK) |
606 | printk(KERN_ERR "x25_asy_close: lapb_unregister error -%d\n", | 606 | pr_err("x25_asy_close: lapb_unregister error: %d\n", |
607 | err); | 607 | err); |
608 | 608 | ||
609 | tty->disc_data = NULL; | 609 | tty->disc_data = NULL; |
610 | sl->tty = NULL; | 610 | sl->tty = NULL; |
@@ -782,14 +782,13 @@ static int __init init_x25_asy(void) | |||
782 | if (x25_asy_maxdev < 4) | 782 | if (x25_asy_maxdev < 4) |
783 | x25_asy_maxdev = 4; /* Sanity */ | 783 | x25_asy_maxdev = 4; /* Sanity */ |
784 | 784 | ||
785 | printk(KERN_INFO "X.25 async: version 0.00 ALPHA " | 785 | pr_info("X.25 async: version 0.00 ALPHA (dynamic channels, max=%d)\n", |
786 | "(dynamic channels, max=%d).\n", x25_asy_maxdev); | 786 | x25_asy_maxdev); |
787 | 787 | ||
788 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), | 788 | x25_asy_devs = kcalloc(x25_asy_maxdev, sizeof(struct net_device *), |
789 | GFP_KERNEL); | 789 | GFP_KERNEL); |
790 | if (!x25_asy_devs) { | 790 | if (!x25_asy_devs) { |
791 | printk(KERN_WARNING "X25 async: Can't allocate x25_asy_ctrls[] " | 791 | pr_warn("Can't allocate x25_asy_ctrls[] array! Uaargh! (-> No X.25 available)\n"); |
792 | "array! Uaargh! (-> No X.25 available)\n"); | ||
793 | return -ENOMEM; | 792 | return -ENOMEM; |
794 | } | 793 | } |
795 | 794 | ||
diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c index 0806232e0f8f..0e5769061702 100644 --- a/drivers/net/wan/z85230.c +++ b/drivers/net/wan/z85230.c | |||
@@ -36,6 +36,8 @@ | |||
36 | * Synchronous mode without DMA is unlikely to pass about 2400 baud. | 36 | * Synchronous mode without DMA is unlikely to pass about 2400 baud. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
40 | |||
39 | #include <linux/module.h> | 41 | #include <linux/module.h> |
40 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
41 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
@@ -365,7 +367,7 @@ static void z8530_rx(struct z8530_channel *c) | |||
365 | c->count=0; | 367 | c->count=0; |
366 | if(stat&Rx_OVR) | 368 | if(stat&Rx_OVR) |
367 | { | 369 | { |
368 | printk(KERN_WARNING "%s: overrun\n", c->dev->name); | 370 | pr_warn("%s: overrun\n", c->dev->name); |
369 | c->rx_overrun++; | 371 | c->rx_overrun++; |
370 | } | 372 | } |
371 | if(stat&CRC_ERR) | 373 | if(stat&CRC_ERR) |
@@ -464,12 +466,12 @@ static void z8530_status(struct z8530_channel *chan) | |||
464 | if (altered & chan->dcdcheck) | 466 | if (altered & chan->dcdcheck) |
465 | { | 467 | { |
466 | if (status & chan->dcdcheck) { | 468 | if (status & chan->dcdcheck) { |
467 | printk(KERN_INFO "%s: DCD raised\n", chan->dev->name); | 469 | pr_info("%s: DCD raised\n", chan->dev->name); |
468 | write_zsreg(chan, R3, chan->regs[3] | RxENABLE); | 470 | write_zsreg(chan, R3, chan->regs[3] | RxENABLE); |
469 | if (chan->netdevice) | 471 | if (chan->netdevice) |
470 | netif_carrier_on(chan->netdevice); | 472 | netif_carrier_on(chan->netdevice); |
471 | } else { | 473 | } else { |
472 | printk(KERN_INFO "%s: DCD lost\n", chan->dev->name); | 474 | pr_info("%s: DCD lost\n", chan->dev->name); |
473 | write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE); | 475 | write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE); |
474 | z8530_flush_fifo(chan); | 476 | z8530_flush_fifo(chan); |
475 | if (chan->netdevice) | 477 | if (chan->netdevice) |
@@ -538,12 +540,12 @@ static void z8530_dma_tx(struct z8530_channel *chan) | |||
538 | { | 540 | { |
539 | if(!chan->dma_tx) | 541 | if(!chan->dma_tx) |
540 | { | 542 | { |
541 | printk(KERN_WARNING "Hey who turned the DMA off?\n"); | 543 | pr_warn("Hey who turned the DMA off?\n"); |
542 | z8530_tx(chan); | 544 | z8530_tx(chan); |
543 | return; | 545 | return; |
544 | } | 546 | } |
545 | /* This shouldn't occur in DMA mode */ | 547 | /* This shouldn't occur in DMA mode */ |
546 | printk(KERN_ERR "DMA tx - bogus event!\n"); | 548 | pr_err("DMA tx - bogus event!\n"); |
547 | z8530_tx(chan); | 549 | z8530_tx(chan); |
548 | } | 550 | } |
549 | 551 | ||
@@ -585,12 +587,12 @@ static void z8530_dma_status(struct z8530_channel *chan) | |||
585 | if (altered & chan->dcdcheck) | 587 | if (altered & chan->dcdcheck) |
586 | { | 588 | { |
587 | if (status & chan->dcdcheck) { | 589 | if (status & chan->dcdcheck) { |
588 | printk(KERN_INFO "%s: DCD raised\n", chan->dev->name); | 590 | pr_info("%s: DCD raised\n", chan->dev->name); |
589 | write_zsreg(chan, R3, chan->regs[3] | RxENABLE); | 591 | write_zsreg(chan, R3, chan->regs[3] | RxENABLE); |
590 | if (chan->netdevice) | 592 | if (chan->netdevice) |
591 | netif_carrier_on(chan->netdevice); | 593 | netif_carrier_on(chan->netdevice); |
592 | } else { | 594 | } else { |
593 | printk(KERN_INFO "%s:DCD lost\n", chan->dev->name); | 595 | pr_info("%s: DCD lost\n", chan->dev->name); |
594 | write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE); | 596 | write_zsreg(chan, R3, chan->regs[3] & ~RxENABLE); |
595 | z8530_flush_fifo(chan); | 597 | z8530_flush_fifo(chan); |
596 | if (chan->netdevice) | 598 | if (chan->netdevice) |
@@ -712,7 +714,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id) | |||
712 | 714 | ||
713 | if(locker) | 715 | if(locker) |
714 | { | 716 | { |
715 | printk(KERN_ERR "IRQ re-enter\n"); | 717 | pr_err("IRQ re-enter\n"); |
716 | return IRQ_NONE; | 718 | return IRQ_NONE; |
717 | } | 719 | } |
718 | locker=1; | 720 | locker=1; |
@@ -758,7 +760,8 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id) | |||
758 | } | 760 | } |
759 | spin_unlock(&dev->lock); | 761 | spin_unlock(&dev->lock); |
760 | if(work==5000) | 762 | if(work==5000) |
761 | printk(KERN_ERR "%s: interrupt jammed - abort(0x%X)!\n", dev->name, intr); | 763 | pr_err("%s: interrupt jammed - abort(0x%X)!\n", |
764 | dev->name, intr); | ||
762 | /* Ok all done */ | 765 | /* Ok all done */ |
763 | locker=0; | 766 | locker=0; |
764 | return IRQ_HANDLED; | 767 | return IRQ_HANDLED; |
@@ -1225,7 +1228,7 @@ static const char *z8530_type_name[]={ | |||
1225 | 1228 | ||
1226 | void z8530_describe(struct z8530_dev *dev, char *mapping, unsigned long io) | 1229 | void z8530_describe(struct z8530_dev *dev, char *mapping, unsigned long io) |
1227 | { | 1230 | { |
1228 | printk(KERN_INFO "%s: %s found at %s 0x%lX, IRQ %d.\n", | 1231 | pr_info("%s: %s found at %s 0x%lX, IRQ %d\n", |
1229 | dev->name, | 1232 | dev->name, |
1230 | z8530_type_name[dev->type], | 1233 | z8530_type_name[dev->type], |
1231 | mapping, | 1234 | mapping, |
@@ -1621,8 +1624,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
1621 | else | 1624 | else |
1622 | /* Can't occur as we dont reenable the DMA irq until | 1625 | /* Can't occur as we dont reenable the DMA irq until |
1623 | after the flip is done */ | 1626 | after the flip is done */ |
1624 | printk(KERN_WARNING "%s: DMA flip overrun!\n", | 1627 | netdev_warn(c->netdevice, "DMA flip overrun!\n"); |
1625 | c->netdevice->name); | ||
1626 | 1628 | ||
1627 | release_dma_lock(flags); | 1629 | release_dma_lock(flags); |
1628 | 1630 | ||
@@ -1637,8 +1639,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
1637 | skb = dev_alloc_skb(ct); | 1639 | skb = dev_alloc_skb(ct); |
1638 | if (skb == NULL) { | 1640 | if (skb == NULL) { |
1639 | c->netdevice->stats.rx_dropped++; | 1641 | c->netdevice->stats.rx_dropped++; |
1640 | printk(KERN_WARNING "%s: Memory squeeze.\n", | 1642 | netdev_warn(c->netdevice, "Memory squeeze\n"); |
1641 | c->netdevice->name); | ||
1642 | } else { | 1643 | } else { |
1643 | skb_put(skb, ct); | 1644 | skb_put(skb, ct); |
1644 | skb_copy_to_linear_data(skb, rxb, ct); | 1645 | skb_copy_to_linear_data(skb, rxb, ct); |
@@ -1678,8 +1679,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
1678 | 1679 | ||
1679 | c->skb2 = dev_alloc_skb(c->mtu); | 1680 | c->skb2 = dev_alloc_skb(c->mtu); |
1680 | if (c->skb2 == NULL) | 1681 | if (c->skb2 == NULL) |
1681 | printk(KERN_WARNING "%s: memory squeeze.\n", | 1682 | netdev_warn(c->netdevice, "memory squeeze\n"); |
1682 | c->netdevice->name); | ||
1683 | else | 1683 | else |
1684 | skb_put(c->skb2, c->mtu); | 1684 | skb_put(c->skb2, c->mtu); |
1685 | c->netdevice->stats.rx_packets++; | 1685 | c->netdevice->stats.rx_packets++; |
@@ -1693,7 +1693,7 @@ static void z8530_rx_done(struct z8530_channel *c) | |||
1693 | c->rx_function(c, skb); | 1693 | c->rx_function(c, skb); |
1694 | } else { | 1694 | } else { |
1695 | c->netdevice->stats.rx_dropped++; | 1695 | c->netdevice->stats.rx_dropped++; |
1696 | printk(KERN_ERR "%s: Lost a frame\n", c->netdevice->name); | 1696 | netdev_err(c->netdevice, "Lost a frame\n"); |
1697 | } | 1697 | } |
1698 | } | 1698 | } |
1699 | 1699 | ||