diff options
author | Joe Perches <joe@perches.com> | 2010-01-26 06:40:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-27 00:15:56 -0500 |
commit | 99824461ea72ca0044cc6508f02c0e1cabf37ba5 (patch) | |
tree | 8672e525869778c9d4c12fe3982306387995bf2a /net/atm/lec.c | |
parent | b747caf365b4121903b26d1cd65454c7bc607184 (diff) |
net/atm: Convert printk to pr_<level>
Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__
Remove function names from output
Use single line pr_debug instead of broken multiple uses without newline
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r-- | net/atm/lec.c | 192 |
1 files changed, 82 insertions, 110 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c index 42749b7b917c..6873813c3c99 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * Marko Kiiskila <mkiiskila@yahoo.com> | 4 | * Marko Kiiskila <mkiiskila@yahoo.com> |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ | ||
8 | |||
7 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
8 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
9 | #include <linux/capability.h> | 11 | #include <linux/capability.h> |
@@ -242,7 +244,7 @@ lec_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
242 | 244 | ||
243 | static void lec_tx_timeout(struct net_device *dev) | 245 | static void lec_tx_timeout(struct net_device *dev) |
244 | { | 246 | { |
245 | printk(KERN_INFO "%s: tx timeout\n", dev->name); | 247 | pr_info("%s\n", dev->name); |
246 | dev->trans_start = jiffies; | 248 | dev->trans_start = jiffies; |
247 | netif_wake_queue(dev); | 249 | netif_wake_queue(dev); |
248 | } | 250 | } |
@@ -266,7 +268,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb, | |||
266 | int i = 0; | 268 | int i = 0; |
267 | #endif /* DUMP_PACKETS >0 */ | 269 | #endif /* DUMP_PACKETS >0 */ |
268 | 270 | ||
269 | pr_debug("lec_start_xmit called\n"); | 271 | pr_debug("called\n"); |
270 | if (!priv->lecd) { | 272 | if (!priv->lecd) { |
271 | printk("%s:No lecd attached\n", dev->name); | 273 | printk("%s:No lecd attached\n", dev->name); |
272 | dev->stats.tx_errors++; | 274 | dev->stats.tx_errors++; |
@@ -276,8 +278,8 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb, | |||
276 | } | 278 | } |
277 | 279 | ||
278 | pr_debug("skbuff head:%lx data:%lx tail:%lx end:%lx\n", | 280 | pr_debug("skbuff head:%lx data:%lx tail:%lx end:%lx\n", |
279 | (long)skb->head, (long)skb->data, (long)skb_tail_pointer(skb), | 281 | (long)skb->head, (long)skb->data, (long)skb_tail_pointer(skb), |
280 | (long)skb_end_pointer(skb)); | 282 | (long)skb_end_pointer(skb)); |
281 | #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) | 283 | #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) |
282 | if (memcmp(skb->data, bridge_ula_lec, sizeof(bridge_ula_lec)) == 0) | 284 | if (memcmp(skb->data, bridge_ula_lec, sizeof(bridge_ula_lec)) == 0) |
283 | lec_handle_bridge(skb, dev); | 285 | lec_handle_bridge(skb, dev); |
@@ -286,7 +288,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb, | |||
286 | /* Make sure we have room for lec_id */ | 288 | /* Make sure we have room for lec_id */ |
287 | if (skb_headroom(skb) < 2) { | 289 | if (skb_headroom(skb) < 2) { |
288 | 290 | ||
289 | pr_debug("lec_start_xmit: reallocating skb\n"); | 291 | pr_debug("reallocating skb\n"); |
290 | skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN); | 292 | skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN); |
291 | kfree_skb(skb); | 293 | kfree_skb(skb); |
292 | if (skb2 == NULL) | 294 | if (skb2 == NULL) |
@@ -367,19 +369,16 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb, | |||
367 | #endif | 369 | #endif |
368 | entry = NULL; | 370 | entry = NULL; |
369 | vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry); | 371 | vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry); |
370 | pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n", dev->name, | 372 | pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n", |
371 | vcc, vcc ? vcc->flags : 0, entry); | 373 | dev->name, vcc, vcc ? vcc->flags : 0, entry); |
372 | if (!vcc || !test_bit(ATM_VF_READY, &vcc->flags)) { | 374 | if (!vcc || !test_bit(ATM_VF_READY, &vcc->flags)) { |
373 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { | 375 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { |
374 | pr_debug("%s:lec_start_xmit: queuing packet, ", | 376 | pr_debug("%s:queuing packet, MAC address %pM\n", |
375 | dev->name); | 377 | dev->name, lec_h->h_dest); |
376 | pr_debug("MAC address %pM\n", lec_h->h_dest); | ||
377 | skb_queue_tail(&entry->tx_wait, skb); | 378 | skb_queue_tail(&entry->tx_wait, skb); |
378 | } else { | 379 | } else { |
379 | pr_debug | 380 | pr_debug("%s:tx queue full or no arp entry, dropping, MAC address: %pM\n", |
380 | ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", | 381 | dev->name, lec_h->h_dest); |
381 | dev->name); | ||
382 | pr_debug("MAC address %pM\n", lec_h->h_dest); | ||
383 | dev->stats.tx_dropped++; | 382 | dev->stats.tx_dropped++; |
384 | dev_kfree_skb(skb); | 383 | dev_kfree_skb(skb); |
385 | } | 384 | } |
@@ -390,8 +389,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb, | |||
390 | #endif /* DUMP_PACKETS > 0 */ | 389 | #endif /* DUMP_PACKETS > 0 */ |
391 | 390 | ||
392 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { | 391 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { |
393 | pr_debug("lec.c: emptying tx queue, "); | 392 | pr_debug("emptying tx queue, MAC address %pM\n", lec_h->h_dest); |
394 | pr_debug("MAC address %pM\n", lec_h->h_dest); | ||
395 | lec_send(vcc, skb2); | 393 | lec_send(vcc, skb2); |
396 | } | 394 | } |
397 | 395 | ||
@@ -477,10 +475,10 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
477 | mesg->content.normal.atm_addr, | 475 | mesg->content.normal.atm_addr, |
478 | mesg->content.normal.flag, | 476 | mesg->content.normal.flag, |
479 | mesg->content.normal.targetless_le_arp); | 477 | mesg->content.normal.targetless_le_arp); |
480 | pr_debug("lec: in l_arp_update\n"); | 478 | pr_debug("in l_arp_update\n"); |
481 | if (mesg->sizeoftlvs != 0) { /* LANE2 3.1.5 */ | 479 | if (mesg->sizeoftlvs != 0) { /* LANE2 3.1.5 */ |
482 | pr_debug("lec: LANE2 3.1.5, got tlvs, size %d\n", | 480 | pr_debug("LANE2 3.1.5, got tlvs, size %d\n", |
483 | mesg->sizeoftlvs); | 481 | mesg->sizeoftlvs); |
484 | lane2_associate_ind(dev, mesg->content.normal.mac_addr, | 482 | lane2_associate_ind(dev, mesg->content.normal.mac_addr, |
485 | tmp, mesg->sizeoftlvs); | 483 | tmp, mesg->sizeoftlvs); |
486 | } | 484 | } |
@@ -531,9 +529,8 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
531 | struct sk_buff *skb2; | 529 | struct sk_buff *skb2; |
532 | struct sock *sk; | 530 | struct sock *sk; |
533 | 531 | ||
534 | pr_debug | 532 | pr_debug("%s: entry found, responding to zeppelin\n", |
535 | ("%s: entry found, responding to zeppelin\n", | 533 | dev->name); |
536 | dev->name); | ||
537 | skb2 = | 534 | skb2 = |
538 | alloc_skb(sizeof(struct atmlec_msg), | 535 | alloc_skb(sizeof(struct atmlec_msg), |
539 | GFP_ATOMIC); | 536 | GFP_ATOMIC); |
@@ -633,7 +630,7 @@ send_to_lecd(struct lec_priv *priv, atmlec_msg_type type, | |||
633 | sk->sk_data_ready(sk, skb->len); | 630 | sk->sk_data_ready(sk, skb->len); |
634 | 631 | ||
635 | if (data != NULL) { | 632 | if (data != NULL) { |
636 | pr_debug("lec: about to send %d bytes of data\n", data->len); | 633 | pr_debug("about to send %d bytes of data\n", data->len); |
637 | atm_force_charge(priv->lecd, data->truesize); | 634 | atm_force_charge(priv->lecd, data->truesize); |
638 | skb_queue_tail(&sk->sk_receive_queue, data); | 635 | skb_queue_tail(&sk->sk_receive_queue, data); |
639 | sk->sk_data_ready(sk, skb->len); | 636 | sk->sk_data_ready(sk, skb->len); |
@@ -692,35 +689,27 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb) | |||
692 | struct lec_priv *priv = netdev_priv(dev); | 689 | struct lec_priv *priv = netdev_priv(dev); |
693 | 690 | ||
694 | #if DUMP_PACKETS >0 | 691 | #if DUMP_PACKETS >0 |
695 | int i = 0; | 692 | printk(KERN_DEBUG "%s: vcc vpi:%d vci:%d\n", |
696 | char buf[300]; | 693 | dev->name, vcc->vpi, vcc->vci); |
697 | |||
698 | printk("%s: lec_push vcc vpi:%d vci:%d\n", dev->name, | ||
699 | vcc->vpi, vcc->vci); | ||
700 | #endif | 694 | #endif |
701 | if (!skb) { | 695 | if (!skb) { |
702 | pr_debug("%s: null skb\n", dev->name); | 696 | pr_debug("%s: null skb\n", dev->name); |
703 | lec_vcc_close(priv, vcc); | 697 | lec_vcc_close(priv, vcc); |
704 | return; | 698 | return; |
705 | } | 699 | } |
706 | #if DUMP_PACKETS > 0 | ||
707 | printk("%s: rcv datalen:%ld lecid:%4.4x\n", dev->name, | ||
708 | skb->len, priv->lecid); | ||
709 | #if DUMP_PACKETS >= 2 | 700 | #if DUMP_PACKETS >= 2 |
710 | for (i = 0; i < skb->len && i < 99; i++) { | 701 | #define MAX_SKB_DUMP 99 |
711 | sprintf(buf + i * 3, "%2.2x ", 0xff & skb->data[i]); | ||
712 | } | ||
713 | #elif DUMP_PACKETS >= 1 | 702 | #elif DUMP_PACKETS >= 1 |
714 | for (i = 0; i < skb->len && i < 30; i++) { | 703 | #define MAX_SKB_DUMP 30 |
715 | sprintf(buf + i * 3, "%2.2x ", 0xff & skb->data[i]); | 704 | #endif |
716 | } | 705 | #if DUMP_PACKETS > 0 |
717 | #endif /* DUMP_PACKETS >= 1 */ | 706 | printk(KERN_DEBUG "%s: rcv datalen:%ld lecid:%4.4x\n", |
718 | if (i == skb->len) | 707 | dev->name, skb->len, priv->lecid); |
719 | printk("%s\n", buf); | 708 | print_hex_dump(KERN_DEBUG, "", DUMP_OFFSET, 16, 1, |
720 | else | 709 | skb->data, min(MAX_SKB_DUMP, skb->len), true); |
721 | printk("%s...\n", buf); | ||
722 | #endif /* DUMP_PACKETS > 0 */ | 710 | #endif /* DUMP_PACKETS > 0 */ |
723 | if (memcmp(skb->data, lec_ctrl_magic, 4) == 0) { /* Control frame, to daemon */ | 711 | if (memcmp(skb->data, lec_ctrl_magic, 4) == 0) { |
712 | /* Control frame, to daemon */ | ||
724 | struct sock *sk = sk_atm(vcc); | 713 | struct sock *sk = sk_atm(vcc); |
725 | 714 | ||
726 | pr_debug("%s: To daemon\n", dev->name); | 715 | pr_debug("%s: To daemon\n", dev->name); |
@@ -801,7 +790,7 @@ static void lec_pop(struct atm_vcc *vcc, struct sk_buff *skb) | |||
801 | struct net_device *dev = skb->dev; | 790 | struct net_device *dev = skb->dev; |
802 | 791 | ||
803 | if (vpriv == NULL) { | 792 | if (vpriv == NULL) { |
804 | printk("lec_pop(): vpriv = NULL!?!?!?\n"); | 793 | pr_info("vpriv = NULL!?!?!?\n"); |
805 | return; | 794 | return; |
806 | } | 795 | } |
807 | 796 | ||
@@ -822,11 +811,8 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg) | |||
822 | 811 | ||
823 | /* Lecd must be up in this case */ | 812 | /* Lecd must be up in this case */ |
824 | bytes_left = copy_from_user(&ioc_data, arg, sizeof(struct atmlec_ioc)); | 813 | bytes_left = copy_from_user(&ioc_data, arg, sizeof(struct atmlec_ioc)); |
825 | if (bytes_left != 0) { | 814 | if (bytes_left != 0) |
826 | printk | 815 | pr_info("copy from user failed for %d bytes\n", bytes_left); |
827 | ("lec: lec_vcc_attach, copy from user failed for %d bytes\n", | ||
828 | bytes_left); | ||
829 | } | ||
830 | if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF || | 816 | if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF || |
831 | !dev_lec[ioc_data.dev_num]) | 817 | !dev_lec[ioc_data.dev_num]) |
832 | return -EINVAL; | 818 | return -EINVAL; |
@@ -1199,7 +1185,7 @@ static int __init lane_module_init(void) | |||
1199 | 1185 | ||
1200 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); | 1186 | p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); |
1201 | if (!p) { | 1187 | if (!p) { |
1202 | printk(KERN_ERR "Unable to initialize /proc/net/atm/lec\n"); | 1188 | pr_err("Unable to initialize /proc/net/atm/lec\n"); |
1203 | return -ENOMEM; | 1189 | return -ENOMEM; |
1204 | } | 1190 | } |
1205 | #endif | 1191 | #endif |
@@ -1381,7 +1367,7 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr, | |||
1381 | #if 0 | 1367 | #if 0 |
1382 | #define pr_debug(format,args...) | 1368 | #define pr_debug(format,args...) |
1383 | /* | 1369 | /* |
1384 | #define pr_debug printk | 1370 | #define pr_debug printk |
1385 | */ | 1371 | */ |
1386 | #endif | 1372 | #endif |
1387 | #define DEBUG_ARP_TABLE 0 | 1373 | #define DEBUG_ARP_TABLE 0 |
@@ -1450,10 +1436,7 @@ lec_arp_add(struct lec_priv *priv, struct lec_arp_table *entry) | |||
1450 | tmp = &priv->lec_arp_tables[HASH(entry->mac_addr[ETH_ALEN - 1])]; | 1436 | tmp = &priv->lec_arp_tables[HASH(entry->mac_addr[ETH_ALEN - 1])]; |
1451 | hlist_add_head(&entry->next, tmp); | 1437 | hlist_add_head(&entry->next, tmp); |
1452 | 1438 | ||
1453 | pr_debug("LEC_ARP: Added entry:%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", | 1439 | pr_debug("Added entry:%pM\n", entry->mac_addr); |
1454 | 0xff & entry->mac_addr[0], 0xff & entry->mac_addr[1], | ||
1455 | 0xff & entry->mac_addr[2], 0xff & entry->mac_addr[3], | ||
1456 | 0xff & entry->mac_addr[4], 0xff & entry->mac_addr[5]); | ||
1457 | } | 1440 | } |
1458 | 1441 | ||
1459 | /* | 1442 | /* |
@@ -1492,10 +1475,7 @@ lec_arp_remove(struct lec_priv *priv, struct lec_arp_table *to_remove) | |||
1492 | } | 1475 | } |
1493 | skb_queue_purge(&to_remove->tx_wait); /* FIXME: good place for this? */ | 1476 | skb_queue_purge(&to_remove->tx_wait); /* FIXME: good place for this? */ |
1494 | 1477 | ||
1495 | pr_debug("LEC_ARP: Removed entry:%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", | 1478 | pr_debug("Removed entry:%pM\n", to_remove->mac_addr); |
1496 | 0xff & to_remove->mac_addr[0], 0xff & to_remove->mac_addr[1], | ||
1497 | 0xff & to_remove->mac_addr[2], 0xff & to_remove->mac_addr[3], | ||
1498 | 0xff & to_remove->mac_addr[4], 0xff & to_remove->mac_addr[5]); | ||
1499 | return 0; | 1479 | return 0; |
1500 | } | 1480 | } |
1501 | 1481 | ||
@@ -1714,9 +1694,7 @@ static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, | |||
1714 | struct hlist_head *head; | 1694 | struct hlist_head *head; |
1715 | struct lec_arp_table *entry; | 1695 | struct lec_arp_table *entry; |
1716 | 1696 | ||
1717 | pr_debug("LEC_ARP: lec_arp_find :%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", | 1697 | pr_debug("%pM\n", mac_addr); |
1718 | mac_addr[0] & 0xff, mac_addr[1] & 0xff, mac_addr[2] & 0xff, | ||
1719 | mac_addr[3] & 0xff, mac_addr[4] & 0xff, mac_addr[5] & 0xff); | ||
1720 | 1698 | ||
1721 | head = &priv->lec_arp_tables[HASH(mac_addr[ETH_ALEN - 1])]; | 1699 | head = &priv->lec_arp_tables[HASH(mac_addr[ETH_ALEN - 1])]; |
1722 | hlist_for_each_entry(entry, node, head, next) { | 1700 | hlist_for_each_entry(entry, node, head, next) { |
@@ -1755,7 +1733,7 @@ static void lec_arp_expire_arp(unsigned long data) | |||
1755 | 1733 | ||
1756 | entry = (struct lec_arp_table *)data; | 1734 | entry = (struct lec_arp_table *)data; |
1757 | 1735 | ||
1758 | pr_debug("lec_arp_expire_arp\n"); | 1736 | pr_debug("\n"); |
1759 | if (entry->status == ESI_ARP_PENDING) { | 1737 | if (entry->status == ESI_ARP_PENDING) { |
1760 | if (entry->no_tries <= entry->priv->max_retry_count) { | 1738 | if (entry->no_tries <= entry->priv->max_retry_count) { |
1761 | if (entry->is_rdesc) | 1739 | if (entry->is_rdesc) |
@@ -1779,10 +1757,10 @@ static void lec_arp_expire_vcc(unsigned long data) | |||
1779 | 1757 | ||
1780 | del_timer(&to_remove->timer); | 1758 | del_timer(&to_remove->timer); |
1781 | 1759 | ||
1782 | pr_debug("LEC_ARP %p %p: lec_arp_expire_vcc vpi:%d vci:%d\n", | 1760 | pr_debug("%p %p: vpi:%d vci:%d\n", |
1783 | to_remove, priv, | 1761 | to_remove, priv, |
1784 | to_remove->vcc ? to_remove->recv_vcc->vpi : 0, | 1762 | to_remove->vcc ? to_remove->recv_vcc->vpi : 0, |
1785 | to_remove->vcc ? to_remove->recv_vcc->vci : 0); | 1763 | to_remove->vcc ? to_remove->recv_vcc->vci : 0); |
1786 | 1764 | ||
1787 | spin_lock_irqsave(&priv->lec_arp_lock, flags); | 1765 | spin_lock_irqsave(&priv->lec_arp_lock, flags); |
1788 | hlist_del(&to_remove->next); | 1766 | hlist_del(&to_remove->next); |
@@ -1819,7 +1797,7 @@ static void lec_arp_check_expire(struct work_struct *work) | |||
1819 | unsigned long time_to_check; | 1797 | unsigned long time_to_check; |
1820 | int i; | 1798 | int i; |
1821 | 1799 | ||
1822 | pr_debug("lec_arp_check_expire %p\n", priv); | 1800 | pr_debug("%p\n", priv); |
1823 | now = jiffies; | 1801 | now = jiffies; |
1824 | restart: | 1802 | restart: |
1825 | spin_lock_irqsave(&priv->lec_arp_lock, flags); | 1803 | spin_lock_irqsave(&priv->lec_arp_lock, flags); |
@@ -1832,12 +1810,12 @@ restart: | |||
1832 | time_to_check = priv->aging_time; | 1810 | time_to_check = priv->aging_time; |
1833 | 1811 | ||
1834 | pr_debug("About to expire: %lx - %lx > %lx\n", | 1812 | pr_debug("About to expire: %lx - %lx > %lx\n", |
1835 | now, entry->last_used, time_to_check); | 1813 | now, entry->last_used, time_to_check); |
1836 | if (time_after(now, entry->last_used + time_to_check) | 1814 | if (time_after(now, entry->last_used + time_to_check) |
1837 | && !(entry->flags & LEC_PERMANENT_FLAG) | 1815 | && !(entry->flags & LEC_PERMANENT_FLAG) |
1838 | && !(entry->mac_addr[0] & 0x01)) { /* LANE2: 7.1.20 */ | 1816 | && !(entry->mac_addr[0] & 0x01)) { /* LANE2: 7.1.20 */ |
1839 | /* Remove entry */ | 1817 | /* Remove entry */ |
1840 | pr_debug("LEC:Entry timed out\n"); | 1818 | pr_debug("Entry timed out\n"); |
1841 | lec_arp_remove(priv, entry); | 1819 | lec_arp_remove(priv, entry); |
1842 | lec_arp_put(entry); | 1820 | lec_arp_put(entry); |
1843 | } else { | 1821 | } else { |
@@ -1934,7 +1912,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | |||
1934 | entry->packets_flooded < | 1912 | entry->packets_flooded < |
1935 | priv->maximum_unknown_frame_count) { | 1913 | priv->maximum_unknown_frame_count) { |
1936 | entry->packets_flooded++; | 1914 | entry->packets_flooded++; |
1937 | pr_debug("LEC_ARP: Flooding..\n"); | 1915 | pr_debug("Flooding..\n"); |
1938 | found = priv->mcast_vcc; | 1916 | found = priv->mcast_vcc; |
1939 | goto out; | 1917 | goto out; |
1940 | } | 1918 | } |
@@ -1945,13 +1923,13 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | |||
1945 | */ | 1923 | */ |
1946 | lec_arp_hold(entry); | 1924 | lec_arp_hold(entry); |
1947 | *ret_entry = entry; | 1925 | *ret_entry = entry; |
1948 | pr_debug("lec: entry->status %d entry->vcc %p\n", entry->status, | 1926 | pr_debug("entry->status %d entry->vcc %p\n", entry->status, |
1949 | entry->vcc); | 1927 | entry->vcc); |
1950 | found = NULL; | 1928 | found = NULL; |
1951 | } else { | 1929 | } else { |
1952 | /* No matching entry was found */ | 1930 | /* No matching entry was found */ |
1953 | entry = make_entry(priv, mac_to_find); | 1931 | entry = make_entry(priv, mac_to_find); |
1954 | pr_debug("LEC_ARP: Making entry\n"); | 1932 | pr_debug("Making entry\n"); |
1955 | if (!entry) { | 1933 | if (!entry) { |
1956 | found = priv->mcast_vcc; | 1934 | found = priv->mcast_vcc; |
1957 | goto out; | 1935 | goto out; |
@@ -1988,7 +1966,7 @@ lec_addr_delete(struct lec_priv *priv, const unsigned char *atm_addr, | |||
1988 | struct lec_arp_table *entry; | 1966 | struct lec_arp_table *entry; |
1989 | int i; | 1967 | int i; |
1990 | 1968 | ||
1991 | pr_debug("lec_addr_delete\n"); | 1969 | pr_debug("\n"); |
1992 | spin_lock_irqsave(&priv->lec_arp_lock, flags); | 1970 | spin_lock_irqsave(&priv->lec_arp_lock, flags); |
1993 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { | 1971 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { |
1994 | hlist_for_each_entry_safe(entry, node, next, &priv->lec_arp_tables[i], next) { | 1972 | hlist_for_each_entry_safe(entry, node, next, &priv->lec_arp_tables[i], next) { |
@@ -2019,10 +1997,8 @@ lec_arp_update(struct lec_priv *priv, const unsigned char *mac_addr, | |||
2019 | struct lec_arp_table *entry, *tmp; | 1997 | struct lec_arp_table *entry, *tmp; |
2020 | int i; | 1998 | int i; |
2021 | 1999 | ||
2022 | pr_debug("lec:%s", (targetless_le_arp) ? "targetless " : " "); | 2000 | pr_debug("%smac:%pM\n", |
2023 | pr_debug("lec_arp_update mac:%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", | 2001 | (targetless_le_arp) ? "targetless " : "", mac_addr); |
2024 | mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], | ||
2025 | mac_addr[4], mac_addr[5]); | ||
2026 | 2002 | ||
2027 | spin_lock_irqsave(&priv->lec_arp_lock, flags); | 2003 | spin_lock_irqsave(&priv->lec_arp_lock, flags); |
2028 | entry = lec_arp_find(priv, mac_addr); | 2004 | entry = lec_arp_find(priv, mac_addr); |
@@ -2149,19 +2125,17 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
2149 | * Vcc which we don't want to make default vcc, | 2125 | * Vcc which we don't want to make default vcc, |
2150 | * attach it anyway. | 2126 | * attach it anyway. |
2151 | */ | 2127 | */ |
2152 | pr_debug | 2128 | pr_debug("LEC_ARP:Attaching data direct, not default: %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", |
2153 | ("LEC_ARP:Attaching data direct, not default: " | 2129 | ioc_data->atm_addr[0], ioc_data->atm_addr[1], |
2154 | "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", | 2130 | ioc_data->atm_addr[2], ioc_data->atm_addr[3], |
2155 | ioc_data->atm_addr[0], ioc_data->atm_addr[1], | 2131 | ioc_data->atm_addr[4], ioc_data->atm_addr[5], |
2156 | ioc_data->atm_addr[2], ioc_data->atm_addr[3], | 2132 | ioc_data->atm_addr[6], ioc_data->atm_addr[7], |
2157 | ioc_data->atm_addr[4], ioc_data->atm_addr[5], | 2133 | ioc_data->atm_addr[8], ioc_data->atm_addr[9], |
2158 | ioc_data->atm_addr[6], ioc_data->atm_addr[7], | 2134 | ioc_data->atm_addr[10], ioc_data->atm_addr[11], |
2159 | ioc_data->atm_addr[8], ioc_data->atm_addr[9], | 2135 | ioc_data->atm_addr[12], ioc_data->atm_addr[13], |
2160 | ioc_data->atm_addr[10], ioc_data->atm_addr[11], | 2136 | ioc_data->atm_addr[14], ioc_data->atm_addr[15], |
2161 | ioc_data->atm_addr[12], ioc_data->atm_addr[13], | 2137 | ioc_data->atm_addr[16], ioc_data->atm_addr[17], |
2162 | ioc_data->atm_addr[14], ioc_data->atm_addr[15], | 2138 | ioc_data->atm_addr[18], ioc_data->atm_addr[19]); |
2163 | ioc_data->atm_addr[16], ioc_data->atm_addr[17], | ||
2164 | ioc_data->atm_addr[18], ioc_data->atm_addr[19]); | ||
2165 | entry = make_entry(priv, bus_mac); | 2139 | entry = make_entry(priv, bus_mac); |
2166 | if (entry == NULL) | 2140 | if (entry == NULL) |
2167 | goto out; | 2141 | goto out; |
@@ -2177,19 +2151,17 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
2177 | dump_arp_table(priv); | 2151 | dump_arp_table(priv); |
2178 | goto out; | 2152 | goto out; |
2179 | } | 2153 | } |
2180 | pr_debug | 2154 | pr_debug("LEC_ARP:Attaching data direct, default: %2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", |
2181 | ("LEC_ARP:Attaching data direct, default: " | 2155 | ioc_data->atm_addr[0], ioc_data->atm_addr[1], |
2182 | "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x\n", | 2156 | ioc_data->atm_addr[2], ioc_data->atm_addr[3], |
2183 | ioc_data->atm_addr[0], ioc_data->atm_addr[1], | 2157 | ioc_data->atm_addr[4], ioc_data->atm_addr[5], |
2184 | ioc_data->atm_addr[2], ioc_data->atm_addr[3], | 2158 | ioc_data->atm_addr[6], ioc_data->atm_addr[7], |
2185 | ioc_data->atm_addr[4], ioc_data->atm_addr[5], | 2159 | ioc_data->atm_addr[8], ioc_data->atm_addr[9], |
2186 | ioc_data->atm_addr[6], ioc_data->atm_addr[7], | 2160 | ioc_data->atm_addr[10], ioc_data->atm_addr[11], |
2187 | ioc_data->atm_addr[8], ioc_data->atm_addr[9], | 2161 | ioc_data->atm_addr[12], ioc_data->atm_addr[13], |
2188 | ioc_data->atm_addr[10], ioc_data->atm_addr[11], | 2162 | ioc_data->atm_addr[14], ioc_data->atm_addr[15], |
2189 | ioc_data->atm_addr[12], ioc_data->atm_addr[13], | 2163 | ioc_data->atm_addr[16], ioc_data->atm_addr[17], |
2190 | ioc_data->atm_addr[14], ioc_data->atm_addr[15], | 2164 | ioc_data->atm_addr[18], ioc_data->atm_addr[19]); |
2191 | ioc_data->atm_addr[16], ioc_data->atm_addr[17], | ||
2192 | ioc_data->atm_addr[18], ioc_data->atm_addr[19]); | ||
2193 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { | 2165 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { |
2194 | hlist_for_each_entry(entry, node, &priv->lec_arp_tables[i], next) { | 2166 | hlist_for_each_entry(entry, node, &priv->lec_arp_tables[i], next) { |
2195 | if (memcmp | 2167 | if (memcmp |
@@ -2197,9 +2169,9 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
2197 | ATM_ESA_LEN) == 0) { | 2169 | ATM_ESA_LEN) == 0) { |
2198 | pr_debug("LEC_ARP: Attaching data direct\n"); | 2170 | pr_debug("LEC_ARP: Attaching data direct\n"); |
2199 | pr_debug("Currently -> Vcc: %d, Rvcc:%d\n", | 2171 | pr_debug("Currently -> Vcc: %d, Rvcc:%d\n", |
2200 | entry->vcc ? entry->vcc->vci : 0, | 2172 | entry->vcc ? entry->vcc->vci : 0, |
2201 | entry->recv_vcc ? entry->recv_vcc-> | 2173 | entry->recv_vcc ? entry->recv_vcc-> |
2202 | vci : 0); | 2174 | vci : 0); |
2203 | found_entry = 1; | 2175 | found_entry = 1; |
2204 | del_timer(&entry->timer); | 2176 | del_timer(&entry->timer); |
2205 | entry->vcc = vcc; | 2177 | entry->vcc = vcc; |
@@ -2271,7 +2243,7 @@ static void lec_flush_complete(struct lec_priv *priv, unsigned long tran_id) | |||
2271 | struct lec_arp_table *entry; | 2243 | struct lec_arp_table *entry; |
2272 | int i; | 2244 | int i; |
2273 | 2245 | ||
2274 | pr_debug("LEC:lec_flush_complete %lx\n", tran_id); | 2246 | pr_debug("%lx\n", tran_id); |
2275 | restart: | 2247 | restart: |
2276 | spin_lock_irqsave(&priv->lec_arp_lock, flags); | 2248 | spin_lock_irqsave(&priv->lec_arp_lock, flags); |
2277 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { | 2249 | for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { |
@@ -2312,7 +2284,7 @@ lec_set_flush_tran_id(struct lec_priv *priv, | |||
2312 | if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { | 2284 | if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { |
2313 | entry->flush_tran_id = tran_id; | 2285 | entry->flush_tran_id = tran_id; |
2314 | pr_debug("Set flush transaction id to %lx for %p\n", | 2286 | pr_debug("Set flush transaction id to %lx for %p\n", |
2315 | tran_id, entry); | 2287 | tran_id, entry); |
2316 | } | 2288 | } |
2317 | } | 2289 | } |
2318 | spin_unlock_irqrestore(&priv->lec_arp_lock, flags); | 2290 | spin_unlock_irqrestore(&priv->lec_arp_lock, flags); |