aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/mpc.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-26 06:40:20 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-27 00:16:05 -0500
commitb50c2ea72a8ed6bc2a954019b6feb6ca41fce07e (patch)
tree0144f31cb8638cfb051bae879dbcfcbf2a28f80d /net/atm/mpc.c
parentb4c84ec0fd9ec2297b796443051554d062007ba3 (diff)
net/atm: Cleanup dprint/ddprintk #defines and uses
Move "mpoa:%s: ", __func__/__FILE__ to #defines Remove mpoa __func__/__FILE__ from dprintk uses Add and use #define dprint_cont where appropriate Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/mpc.c')
-rw-r--r--net/atm/mpc.c153
1 files changed, 78 insertions, 75 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 55dba22e44b3..a6521c8aa88b 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -38,21 +38,31 @@
38 */ 38 */
39 39
40#if 0 40#if 0
41#define dprintk(format, args...) printk(KERN_DEBUG format, ##args) /* debug */ 41#define dprintk(format, args...) \
42 printk(KERN_DEBUG "mpoa:%s: " format, __func__, ##args)
43#define dprintk_cont(format, args...) printk(KERN_CONT format, ##args)
42#else 44#else
43#define dprintk(format, args...) \ 45#define dprintk(format, args...) \
44 do { if (0) printk(KERN_DEBUG format, ##args); } while (0) 46 do { if (0) \
47 printk(KERN_DEBUG "mpoa:%s: " format, __func__, ##args);\
48 } while (0)
49#define dprintk_cont(format, args...) \
50 do { if (0) printk(KERN_CONT format, ##args); } while (0)
45#endif 51#endif
46 52
47#if 0 53#if 0
48#define ddprintk printk(KERN_DEBUG format, ##args) /* more debug */ 54#define ddprintk(format, args...) \
55 printk(KERN_DEBUG "mpoa:%s: " format, __func__, ##args)
56#define ddprintk_cont(format, args...) printk(KERN_CONT format, ##args)
49#else 57#else
50#define ddprintk(format, args...) \ 58#define ddprintk(format, args...) \
51 do { if (0) printk(KERN_DEBUG format, ##args); } while (0) 59 do { if (0) \
60 printk(KERN_DEBUG "mpoa:%s: " format, __func__, ##args);\
61 } while (0)
62#define ddprintk_cont(format, args...) \
63 do { if (0) printk(KERN_CONT format, ##args); } while (0)
52#endif 64#endif
53 65
54
55
56#define MPOA_TAG_LEN 4 66#define MPOA_TAG_LEN 4
57 67
58/* mpc_daemon -> kernel */ 68/* mpc_daemon -> kernel */
@@ -302,7 +312,7 @@ static struct mpoa_client *alloc_mpc(void)
302static void start_mpc(struct mpoa_client *mpc, struct net_device *dev) 312static void start_mpc(struct mpoa_client *mpc, struct net_device *dev)
303{ 313{
304 314
305 dprintk("mpoa: (%s) start_mpc:\n", mpc->dev->name); 315 dprintk("(%s)\n", mpc->dev->name);
306 if (!dev->netdev_ops) 316 if (!dev->netdev_ops)
307 pr_info("(%s) not starting\n", dev->name); 317 pr_info("(%s) not starting\n", dev->name);
308 else { 318 else {
@@ -316,14 +326,14 @@ static void start_mpc(struct mpoa_client *mpc, struct net_device *dev)
316static void stop_mpc(struct mpoa_client *mpc) 326static void stop_mpc(struct mpoa_client *mpc)
317{ 327{
318 struct net_device *dev = mpc->dev; 328 struct net_device *dev = mpc->dev;
319 dprintk("mpoa: (%s) stop_mpc:", mpc->dev->name); 329 dprintk("(%s)", mpc->dev->name);
320 330
321 /* Lets not nullify lec device's dev->hard_start_xmit */ 331 /* Lets not nullify lec device's dev->hard_start_xmit */
322 if (dev->netdev_ops != &mpc->new_ops) { 332 if (dev->netdev_ops != &mpc->new_ops) {
323 dprintk(" mpc already stopped, not fatal\n"); 333 dprintk_cont(" mpc already stopped, not fatal\n");
324 return; 334 return;
325 } 335 }
326 dprintk("\n"); 336 dprintk_cont("\n");
327 337
328 dev->netdev_ops = mpc->old_ops; 338 dev->netdev_ops = mpc->old_ops;
329 mpc->old_ops = NULL; 339 mpc->old_ops = NULL;
@@ -371,7 +381,7 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
371 struct mpoa_client *mpc; 381 struct mpoa_client *mpc;
372 382
373 mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ 383 mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */
374 dprintk("mpoa: (%s) lane2_assoc_ind: received TLV(s), ", dev->name); 384 dprintk("(%s) received TLV(s), ", dev->name);
375 dprintk("total length of all TLVs %d\n", sizeoftlvs); 385 dprintk("total length of all TLVs %d\n", sizeoftlvs);
376 mpc = find_mpc_by_lec(dev); /* Sampo-Fix: moved here from below */ 386 mpc = find_mpc_by_lec(dev); /* Sampo-Fix: moved here from below */
377 if (mpc == NULL) { 387 if (mpc == NULL) {
@@ -402,7 +412,7 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
402 } 412 }
403 mpoa_device_type = *tlvs++; 413 mpoa_device_type = *tlvs++;
404 number_of_mps_macs = *tlvs++; 414 number_of_mps_macs = *tlvs++;
405 dprintk("mpoa: (%s) MPOA device type '%s', ", 415 dprintk("(%s) MPOA device type '%s', ",
406 dev->name, mpoa_device_type_string(mpoa_device_type)); 416 dev->name, mpoa_device_type_string(mpoa_device_type));
407 if (mpoa_device_type == MPS_AND_MPC && 417 if (mpoa_device_type == MPS_AND_MPC &&
408 length < (42 + number_of_mps_macs*ETH_ALEN)) { /* :) */ 418 length < (42 + number_of_mps_macs*ETH_ALEN)) { /* :) */
@@ -417,7 +427,7 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
417 } 427 }
418 if (mpoa_device_type != MPS && 428 if (mpoa_device_type != MPS &&
419 mpoa_device_type != MPS_AND_MPC) { 429 mpoa_device_type != MPS_AND_MPC) {
420 dprintk("ignoring non-MPS device\n"); 430 dprintk("ignoring non-MPS device ");
421 if (mpoa_device_type == MPC) 431 if (mpoa_device_type == MPC)
422 tlvs += 20; 432 tlvs += 20;
423 continue; /* we are only interested in MPSs */ 433 continue; /* we are only interested in MPSs */
@@ -427,7 +437,8 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
427 pr_info("(%s) MPS_AND_MPC has zero MACs\n", dev->name); 437 pr_info("(%s) MPS_AND_MPC has zero MACs\n", dev->name);
428 continue; /* someone should read the spec */ 438 continue; /* someone should read the spec */
429 } 439 }
430 dprintk("this MPS has %d MAC addresses\n", number_of_mps_macs); 440 dprintk_cont("this MPS has %d MAC addresses\n",
441 number_of_mps_macs);
431 442
432 /* 443 /*
433 * ok, now we can go and tell our daemon 444 * ok, now we can go and tell our daemon
@@ -498,7 +509,7 @@ static int send_via_shortcut(struct sk_buff *skb, struct mpoa_client *mpc)
498 iph = (struct iphdr *)buff; 509 iph = (struct iphdr *)buff;
499 ipaddr = iph->daddr; 510 ipaddr = iph->daddr;
500 511
501 ddprintk("mpoa: (%s) send_via_shortcut: ipaddr 0x%x\n", 512 ddprintk("(%s) ipaddr 0x%x\n",
502 mpc->dev->name, ipaddr); 513 mpc->dev->name, ipaddr);
503 514
504 entry = mpc->in_ops->get(ipaddr, mpc); 515 entry = mpc->in_ops->get(ipaddr, mpc);
@@ -510,17 +521,17 @@ static int send_via_shortcut(struct sk_buff *skb, struct mpoa_client *mpc)
510 } 521 }
511 /* threshold not exceeded or VCC not ready */ 522 /* threshold not exceeded or VCC not ready */
512 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN) { 523 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN) {
513 ddprintk("mpoa: (%s) send_via_shortcut: cache_hit: returns != OPEN\n", 524 ddprintk("(%s) cache_hit: returns != OPEN\n",
514 mpc->dev->name); 525 mpc->dev->name);
515 mpc->in_ops->put(entry); 526 mpc->in_ops->put(entry);
516 return 1; 527 return 1;
517 } 528 }
518 529
519 ddprintk("mpoa: (%s) send_via_shortcut: using shortcut\n", 530 ddprintk("(%s) using shortcut\n",
520 mpc->dev->name); 531 mpc->dev->name);
521 /* MPOA spec A.1.4, MPOA client must decrement IP ttl at least by one */ 532 /* MPOA spec A.1.4, MPOA client must decrement IP ttl at least by one */
522 if (iph->ttl <= 1) { 533 if (iph->ttl <= 1) {
523 ddprintk("mpoa: (%s) send_via_shortcut: IP ttl = %u, using LANE\n", 534 ddprintk("(%s) IP ttl = %u, using LANE\n",
524 mpc->dev->name, iph->ttl); 535 mpc->dev->name, iph->ttl);
525 mpc->in_ops->put(entry); 536 mpc->in_ops->put(entry);
526 return 1; 537 return 1;
@@ -530,7 +541,7 @@ static int send_via_shortcut(struct sk_buff *skb, struct mpoa_client *mpc)
530 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); 541 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
531 542
532 if (entry->ctrl_info.tag != 0) { 543 if (entry->ctrl_info.tag != 0) {
533 ddprintk("mpoa: (%s) send_via_shortcut: adding tag 0x%x\n", 544 ddprintk("(%s) adding tag 0x%x\n",
534 mpc->dev->name, entry->ctrl_info.tag); 545 mpc->dev->name, entry->ctrl_info.tag);
535 tagged_llc_snap_hdr.tag = entry->ctrl_info.tag; 546 tagged_llc_snap_hdr.tag = entry->ctrl_info.tag;
536 skb_pull(skb, ETH_HLEN); /* get rid of Eth header */ 547 skb_pull(skb, ETH_HLEN); /* get rid of Eth header */
@@ -655,25 +666,23 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
655 return; 666 return;
656 } 667 }
657 668
658 dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name); 669 dprintk("(%s)\n", dev->name);
659 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc); 670 in_entry = mpc->in_ops->get_by_vcc(vcc, mpc);
660 if (in_entry) { 671 if (in_entry) {
661 dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %pI4\n", 672 dprintk("(%s) ingress SVC closed ip = %pI4\n",
662 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip); 673 mpc->dev->name, &in_entry->ctrl_info.in_dst_ip);
663 in_entry->shortcut = NULL; 674 in_entry->shortcut = NULL;
664 mpc->in_ops->put(in_entry); 675 mpc->in_ops->put(in_entry);
665 } 676 }
666 eg_entry = mpc->eg_ops->get_by_vcc(vcc, mpc); 677 eg_entry = mpc->eg_ops->get_by_vcc(vcc, mpc);
667 if (eg_entry) { 678 if (eg_entry) {
668 dprintk("mpoa: (%s) mpc_vcc_close: egress SVC closed\n", 679 dprintk("(%s) egress SVC closed\n", mpc->dev->name);
669 mpc->dev->name);
670 eg_entry->shortcut = NULL; 680 eg_entry->shortcut = NULL;
671 mpc->eg_ops->put(eg_entry); 681 mpc->eg_ops->put(eg_entry);
672 } 682 }
673 683
674 if (in_entry == NULL && eg_entry == NULL) 684 if (in_entry == NULL && eg_entry == NULL)
675 dprintk("mpoa: (%s) mpc_vcc_close: unused vcc closed\n", 685 dprintk("(%s) unused vcc closed\n", dev->name);
676 dev->name);
677 686
678 return; 687 return;
679} 688}
@@ -687,10 +696,9 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
687 __be32 tag; 696 __be32 tag;
688 char *tmp; 697 char *tmp;
689 698
690 ddprintk("mpoa: (%s) mpc_push:\n", dev->name); 699 ddprintk("(%s)\n", dev->name);
691 if (skb == NULL) { 700 if (skb == NULL) {
692 dprintk("mpoa: (%s) mpc_push: null skb, closing VCC\n", 701 dprintk("(%s) null skb, closing VCC\n", dev->name);
693 dev->name);
694 mpc_vcc_close(vcc, dev); 702 mpc_vcc_close(vcc, dev);
695 return; 703 return;
696 } 704 }
@@ -700,8 +708,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
700 sizeof(struct llc_snap_hdr)) == 0) { 708 sizeof(struct llc_snap_hdr)) == 0) {
701 struct sock *sk = sk_atm(vcc); 709 struct sock *sk = sk_atm(vcc);
702 710
703 dprintk("mpoa: (%s) mpc_push: control packet arrived\n", 711 dprintk("(%s) control packet arrived\n", dev->name);
704 dev->name);
705 /* Pass control packets to daemon */ 712 /* Pass control packets to daemon */
706 skb_queue_tail(&sk->sk_receive_queue, skb); 713 skb_queue_tail(&sk->sk_receive_queue, skb);
707 sk->sk_data_ready(sk, skb->len); 714 sk->sk_data_ready(sk, skb->len);
@@ -719,8 +726,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
719 726
720 if (memcmp(skb->data, &llc_snap_mpoa_data_tagged, 727 if (memcmp(skb->data, &llc_snap_mpoa_data_tagged,
721 sizeof(struct llc_snap_hdr)) == 0) { /* MPOA tagged data */ 728 sizeof(struct llc_snap_hdr)) == 0) { /* MPOA tagged data */
722 ddprintk("mpoa: (%s) mpc_push: tagged data packet arrived\n", 729 ddprintk("(%s) tagged data packet arrived\n", dev->name);
723 dev->name);
724 730
725 } else if (memcmp(skb->data, &llc_snap_mpoa_data, 731 } else if (memcmp(skb->data, &llc_snap_mpoa_data,
726 sizeof(struct llc_snap_hdr)) == 0) { /* MPOA data */ 732 sizeof(struct llc_snap_hdr)) == 0) { /* MPOA data */
@@ -813,8 +819,7 @@ static int atm_mpoa_mpoad_attach(struct atm_vcc *vcc, int arg)
813 819
814 mpc = find_mpc_by_itfnum(arg); 820 mpc = find_mpc_by_itfnum(arg);
815 if (mpc == NULL) { 821 if (mpc == NULL) {
816 dprintk("mpoa: mpoad_attach: allocating new mpc for itf %d\n", 822 dprintk("allocating new mpc for itf %d\n", arg);
817 arg);
818 mpc = alloc_mpc(); 823 mpc = alloc_mpc();
819 if (mpc == NULL) 824 if (mpc == NULL)
820 return -ENOMEM; 825 return -ENOMEM;
@@ -923,55 +928,54 @@ static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb)
923 pr_info("no mpc found\n"); 928 pr_info("no mpc found\n");
924 return 0; 929 return 0;
925 } 930 }
926 dprintk("mpoa: (%s) msg_from_mpoad:", 931 dprintk("(%s)", mpc->dev ? mpc->dev->name : "<unknown>");
927 (mpc->dev) ? mpc->dev->name : "<unknown>");
928 switch (mesg->type) { 932 switch (mesg->type) {
929 case MPOA_RES_REPLY_RCVD: 933 case MPOA_RES_REPLY_RCVD:
930 dprintk(" mpoa_res_reply_rcvd\n"); 934 dprintk_cont("mpoa_res_reply_rcvd\n");
931 MPOA_res_reply_rcvd(mesg, mpc); 935 MPOA_res_reply_rcvd(mesg, mpc);
932 break; 936 break;
933 case MPOA_TRIGGER_RCVD: 937 case MPOA_TRIGGER_RCVD:
934 dprintk(" mpoa_trigger_rcvd\n"); 938 dprintk_cont("mpoa_trigger_rcvd\n");
935 MPOA_trigger_rcvd(mesg, mpc); 939 MPOA_trigger_rcvd(mesg, mpc);
936 break; 940 break;
937 case INGRESS_PURGE_RCVD: 941 case INGRESS_PURGE_RCVD:
938 dprintk(" nhrp_purge_rcvd\n"); 942 dprintk_cont("nhrp_purge_rcvd\n");
939 ingress_purge_rcvd(mesg, mpc); 943 ingress_purge_rcvd(mesg, mpc);
940 break; 944 break;
941 case EGRESS_PURGE_RCVD: 945 case EGRESS_PURGE_RCVD:
942 dprintk(" egress_purge_reply_rcvd\n"); 946 dprintk_cont("egress_purge_reply_rcvd\n");
943 egress_purge_rcvd(mesg, mpc); 947 egress_purge_rcvd(mesg, mpc);
944 break; 948 break;
945 case MPS_DEATH: 949 case MPS_DEATH:
946 dprintk(" mps_death\n"); 950 dprintk_cont("mps_death\n");
947 mps_death(mesg, mpc); 951 mps_death(mesg, mpc);
948 break; 952 break;
949 case CACHE_IMPOS_RCVD: 953 case CACHE_IMPOS_RCVD:
950 dprintk(" cache_impos_rcvd\n"); 954 dprintk_cont("cache_impos_rcvd\n");
951 MPOA_cache_impos_rcvd(mesg, mpc); 955 MPOA_cache_impos_rcvd(mesg, mpc);
952 break; 956 break;
953 case SET_MPC_CTRL_ADDR: 957 case SET_MPC_CTRL_ADDR:
954 dprintk(" set_mpc_ctrl_addr\n"); 958 dprintk_cont("set_mpc_ctrl_addr\n");
955 set_mpc_ctrl_addr_rcvd(mesg, mpc); 959 set_mpc_ctrl_addr_rcvd(mesg, mpc);
956 break; 960 break;
957 case SET_MPS_MAC_ADDR: 961 case SET_MPS_MAC_ADDR:
958 dprintk(" set_mps_mac_addr\n"); 962 dprintk_cont("set_mps_mac_addr\n");
959 set_mps_mac_addr_rcvd(mesg, mpc); 963 set_mps_mac_addr_rcvd(mesg, mpc);
960 break; 964 break;
961 case CLEAN_UP_AND_EXIT: 965 case CLEAN_UP_AND_EXIT:
962 dprintk(" clean_up_and_exit\n"); 966 dprintk_cont("clean_up_and_exit\n");
963 clean_up(mesg, mpc, DIE); 967 clean_up(mesg, mpc, DIE);
964 break; 968 break;
965 case RELOAD: 969 case RELOAD:
966 dprintk(" reload\n"); 970 dprintk_cont("reload\n");
967 clean_up(mesg, mpc, RELOAD); 971 clean_up(mesg, mpc, RELOAD);
968 break; 972 break;
969 case SET_MPC_PARAMS: 973 case SET_MPC_PARAMS:
970 dprintk(" set_mpc_params\n"); 974 dprintk_cont("set_mpc_params\n");
971 mpc->parameters = mesg->content.params; 975 mpc->parameters = mesg->content.params;
972 break; 976 break;
973 default: 977 default:
974 dprintk(" unknown message %d\n", mesg->type); 978 dprintk_cont("unknown message %d\n", mesg->type);
975 break; 979 break;
976 } 980 }
977 kfree_skb(skb); 981 kfree_skb(skb);
@@ -1027,8 +1031,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
1027 priv->lane2_ops->associate_indicator = lane2_assoc_ind; 1031 priv->lane2_ops->associate_indicator = lane2_assoc_ind;
1028 mpc = find_mpc_by_itfnum(priv->itfnum); 1032 mpc = find_mpc_by_itfnum(priv->itfnum);
1029 if (mpc == NULL) { 1033 if (mpc == NULL) {
1030 dprintk("mpoa: mpoa_event_listener: allocating new mpc for %s\n", 1034 dprintk("allocating new mpc for %s\n", dev->name);
1031 dev->name);
1032 mpc = alloc_mpc(); 1035 mpc = alloc_mpc();
1033 if (mpc == NULL) { 1036 if (mpc == NULL) {
1034 pr_info("no new mpc"); 1037 pr_info("no new mpc");
@@ -1038,14 +1041,14 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier,
1038 mpc->dev_num = priv->itfnum; 1041 mpc->dev_num = priv->itfnum;
1039 mpc->dev = dev; 1042 mpc->dev = dev;
1040 dev_hold(dev); 1043 dev_hold(dev);
1041 dprintk("mpoa: (%s) was initialized\n", dev->name); 1044 dprintk("(%s) was initialized\n", dev->name);
1042 break; 1045 break;
1043 case NETDEV_UNREGISTER: 1046 case NETDEV_UNREGISTER:
1044 /* the lec device was deallocated */ 1047 /* the lec device was deallocated */
1045 mpc = find_mpc_by_lec(dev); 1048 mpc = find_mpc_by_lec(dev);
1046 if (mpc == NULL) 1049 if (mpc == NULL)
1047 break; 1050 break;
1048 dprintk("mpoa: device (%s) was deallocated\n", dev->name); 1051 dprintk("device (%s) was deallocated\n", dev->name);
1049 stop_mpc(mpc); 1052 stop_mpc(mpc);
1050 dev_put(mpc->dev); 1053 dev_put(mpc->dev);
1051 mpc->dev = NULL; 1054 mpc->dev = NULL;
@@ -1143,7 +1146,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg,
1143 entry->shortcut = eg_entry->shortcut; 1146 entry->shortcut = eg_entry->shortcut;
1144 } 1147 }
1145 if (entry->shortcut) { 1148 if (entry->shortcut) {
1146 dprintk("mpoa: (%s) using egress SVC to reach %pI4\n", 1149 dprintk("(%s) using egress SVC to reach %pI4\n",
1147 client->dev->name, &dst_ip); 1150 client->dev->name, &dst_ip);
1148 client->eg_ops->put(eg_entry); 1151 client->eg_ops->put(eg_entry);
1149 return; 1152 return;
@@ -1170,16 +1173,16 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1170 __be32 dst_ip = msg->content.in_info.in_dst_ip; 1173 __be32 dst_ip = msg->content.in_info.in_dst_ip;
1171 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); 1174 in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
1172 1175
1173 dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %pI4\n", 1176 dprintk("(%s) ip %pI4\n",
1174 mpc->dev->name, &dst_ip); 1177 mpc->dev->name, &dst_ip);
1175 ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", 1178 ddprintk("(%s) entry = %p",
1176 mpc->dev->name, entry); 1179 mpc->dev->name, entry);
1177 if (entry == NULL) { 1180 if (entry == NULL) {
1178 pr_info("(%s) ARGH, received res. reply for an entry that doesn't exist.\n", 1181 pr_info("(%s) ARGH, received res. reply for an entry that doesn't exist.\n",
1179 mpc->dev->name); 1182 mpc->dev->name);
1180 return; 1183 return;
1181 } 1184 }
1182 ddprintk(" entry_state = %d ", entry->entry_state); 1185 ddprintk_cont(" entry_state = %d ", entry->entry_state);
1183 1186
1184 if (entry->entry_state == INGRESS_RESOLVED) { 1187 if (entry->entry_state == INGRESS_RESOLVED) {
1185 pr_info("(%s) RESOLVED entry!\n", mpc->dev->name); 1188 pr_info("(%s) RESOLVED entry!\n", mpc->dev->name);
@@ -1191,7 +1194,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1191 do_gettimeofday(&(entry->tv)); 1194 do_gettimeofday(&(entry->tv));
1192 do_gettimeofday(&(entry->reply_wait)); /* Used in refreshing func from now on */ 1195 do_gettimeofday(&(entry->reply_wait)); /* Used in refreshing func from now on */
1193 entry->refresh_time = 0; 1196 entry->refresh_time = 0;
1194 ddprintk("entry->shortcut = %p\n", entry->shortcut); 1197 ddprintk_cont("entry->shortcut = %p\n", entry->shortcut);
1195 1198
1196 if (entry->entry_state == INGRESS_RESOLVING && 1199 if (entry->entry_state == INGRESS_RESOLVING &&
1197 entry->shortcut != NULL) { 1200 entry->shortcut != NULL) {
@@ -1228,7 +1231,7 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1228 } 1231 }
1229 1232
1230 do { 1233 do {
1231 dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %pI4\n", 1234 dprintk("(%s) removing an ingress entry, ip = %pI4\n",
1232 mpc->dev->name, &dst_ip); 1235 mpc->dev->name, &dst_ip);
1233 write_lock_bh(&mpc->ingress_lock); 1236 write_lock_bh(&mpc->ingress_lock);
1234 mpc->in_ops->remove_entry(entry, mpc); 1237 mpc->in_ops->remove_entry(entry, mpc);
@@ -1246,7 +1249,7 @@ static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1246 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc); 1249 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc);
1247 1250
1248 if (entry == NULL) { 1251 if (entry == NULL) {
1249 dprintk("mpoa: (%s) egress_purge_rcvd: purge for a non-existing entry\n", 1252 dprintk("(%s) purge for a non-existing entry\n",
1250 mpc->dev->name); 1253 mpc->dev->name);
1251 return; 1254 return;
1252 } 1255 }
@@ -1266,7 +1269,7 @@ static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
1266 struct k_message *purge_msg; 1269 struct k_message *purge_msg;
1267 struct sk_buff *skb; 1270 struct sk_buff *skb;
1268 1271
1269 dprintk("mpoa: purge_egress_shortcut: entering\n"); 1272 dprintk("entering\n");
1270 if (vcc == NULL) { 1273 if (vcc == NULL) {
1271 pr_info("vcc == NULL\n"); 1274 pr_info("vcc == NULL\n");
1272 return; 1275 return;
@@ -1290,7 +1293,7 @@ static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
1290 sk = sk_atm(vcc); 1293 sk = sk_atm(vcc);
1291 skb_queue_tail(&sk->sk_receive_queue, skb); 1294 skb_queue_tail(&sk->sk_receive_queue, skb);
1292 sk->sk_data_ready(sk, skb->len); 1295 sk->sk_data_ready(sk, skb->len);
1293 dprintk("mpoa: purge_egress_shortcut: exiting:\n"); 1296 dprintk("exiting\n");
1294 1297
1295 return; 1298 return;
1296} 1299}
@@ -1303,7 +1306,7 @@ static void mps_death(struct k_message *msg, struct mpoa_client *mpc)
1303{ 1306{
1304 eg_cache_entry *entry; 1307 eg_cache_entry *entry;
1305 1308
1306 dprintk("mpoa: (%s) mps_death:\n", mpc->dev->name); 1309 dprintk("(%s)\n", mpc->dev->name);
1307 1310
1308 if (memcmp(msg->MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN)) { 1311 if (memcmp(msg->MPS_ctrl, mpc->mps_ctrl_addr, ATM_ESA_LEN)) {
1309 pr_info("(%s) wrong MPS\n", mpc->dev->name); 1312 pr_info("(%s) wrong MPS\n", mpc->dev->name);
@@ -1332,7 +1335,7 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg,
1332 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc); 1335 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc);
1333 1336
1334 holding_time = msg->content.eg_info.holding_time; 1337 holding_time = msg->content.eg_info.holding_time;
1335 dprintk("mpoa: (%s) MPOA_cache_impos_rcvd: entry = %p, holding_time = %u\n", 1338 dprintk("(%s) entry = %p, holding_time = %u\n",
1336 mpc->dev->name, entry, holding_time); 1339 mpc->dev->name, entry, holding_time);
1337 if (entry == NULL && holding_time) { 1340 if (entry == NULL && holding_time) {
1338 entry = mpc->eg_ops->add_entry(msg, mpc); 1341 entry = mpc->eg_ops->add_entry(msg, mpc);
@@ -1369,11 +1372,11 @@ static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg,
1369 memcpy(&tlv[7], mesg->MPS_ctrl, ATM_ESA_LEN); /* MPC ctrl ATM addr */ 1372 memcpy(&tlv[7], mesg->MPS_ctrl, ATM_ESA_LEN); /* MPC ctrl ATM addr */
1370 memcpy(mpc->our_ctrl_addr, mesg->MPS_ctrl, ATM_ESA_LEN); 1373 memcpy(mpc->our_ctrl_addr, mesg->MPS_ctrl, ATM_ESA_LEN);
1371 1374
1372 dprintk("mpoa: (%s) setting MPC ctrl ATM address to ", 1375 dprintk("(%s) setting MPC ctrl ATM address to",
1373 (mpc->dev) ? mpc->dev->name : "<unknown>"); 1376 mpc->dev ? mpc->dev->name : "<unknown>");
1374 for (i = 7; i < sizeof(tlv); i++) 1377 for (i = 7; i < sizeof(tlv); i++)
1375 dprintk("%02x ", tlv[i]); 1378 dprintk_cont(" %02x", tlv[i]);
1376 dprintk("\n"); 1379 dprintk_cont("\n");
1377 1380
1378 if (mpc->dev) { 1381 if (mpc->dev) {
1379 priv = netdev_priv(mpc->dev); 1382 priv = netdev_priv(mpc->dev);
@@ -1424,7 +1427,7 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action)
1424 entry = mpc->eg_cache; 1427 entry = mpc->eg_cache;
1425 while (entry != NULL) { 1428 while (entry != NULL) {
1426 msg->content.eg_info = entry->ctrl_info; 1429 msg->content.eg_info = entry->ctrl_info;
1427 dprintk("mpoa: cache_id %u\n", entry->ctrl_info.cache_id); 1430 dprintk("cache_id %u\n", entry->ctrl_info.cache_id);
1428 msg_to_mpoad(msg, mpc); 1431 msg_to_mpoad(msg, mpc);
1429 entry = entry->next; 1432 entry = entry->next;
1430 } 1433 }
@@ -1537,15 +1540,15 @@ static void __exit atm_mpoa_cleanup(void)
1537 if (priv->lane2_ops != NULL) 1540 if (priv->lane2_ops != NULL)
1538 priv->lane2_ops->associate_indicator = NULL; 1541 priv->lane2_ops->associate_indicator = NULL;
1539 } 1542 }
1540 ddprintk("mpoa: cleanup_module: about to clear caches\n"); 1543 ddprintk("about to clear caches\n");
1541 mpc->in_ops->destroy_cache(mpc); 1544 mpc->in_ops->destroy_cache(mpc);
1542 mpc->eg_ops->destroy_cache(mpc); 1545 mpc->eg_ops->destroy_cache(mpc);
1543 ddprintk("mpoa: cleanup_module: caches cleared\n"); 1546 ddprintk("caches cleared\n");
1544 kfree(mpc->mps_macs); 1547 kfree(mpc->mps_macs);
1545 memset(mpc, 0, sizeof(struct mpoa_client)); 1548 memset(mpc, 0, sizeof(struct mpoa_client));
1546 ddprintk("mpoa: cleanup_module: about to kfree %p\n", mpc); 1549 ddprintk("about to kfree %p\n", mpc);
1547 kfree(mpc); 1550 kfree(mpc);
1548 ddprintk("mpoa: cleanup_module: next mpc is at %p\n", tmp); 1551 ddprintk("next mpc is at %p\n", tmp);
1549 mpc = tmp; 1552 mpc = tmp;
1550 } 1553 }
1551 1554
@@ -1553,7 +1556,7 @@ static void __exit atm_mpoa_cleanup(void)
1553 qos_head = NULL; 1556 qos_head = NULL;
1554 while (qos != NULL) { 1557 while (qos != NULL) {
1555 nextqos = qos->next; 1558 nextqos = qos->next;
1556 dprintk("mpoa: cleanup_module: freeing qos entry %p\n", qos); 1559 dprintk("freeing qos entry %p\n", qos);
1557 kfree(qos); 1560 kfree(qos);
1558 qos = nextqos; 1561 qos = nextqos;
1559 } 1562 }