aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorHolger Eitzenberger <holger@eitzenberger.org>2008-12-10 02:09:22 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-10 02:09:22 -0500
commit5a03cdb7f2d7ff88e50153d8c3b90a1d52dca435 (patch)
tree2cdaf63b0308afcf259625ea20439840c81d62e5 /drivers/net/bonding
parentef65583d01f4060c758dba72f08edc09d8faa719 (diff)
bonding: use pr_debug instead of own macros
Use pr_debug() instead of own macros. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_3ad.c60
-rw-r--r--drivers/net/bonding/bond_alb.c12
-rw-r--r--drivers/net/bonding/bond_ipv6.c6
-rw-r--r--drivers/net/bonding/bond_main.c92
-rw-r--r--drivers/net/bonding/bond_sysfs.c2
-rw-r--r--drivers/net/bonding/bonding.h8
6 files changed, 82 insertions, 98 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 78f645d6471a..6f3655d3934f 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -20,8 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23//#define BONDING_DEBUG 1
24
25#include <linux/skbuff.h> 23#include <linux/skbuff.h>
26#include <linux/if_ether.h> 24#include <linux/if_ether.h>
27#include <linux/netdevice.h> 25#include <linux/netdevice.h>
@@ -381,7 +379,7 @@ static u16 __get_link_speed(struct port *port)
381 } 379 }
382 } 380 }
383 381
384 dprintk("Port %d Received link speed %d update from adapter\n", port->actor_port_number, speed); 382 pr_debug("Port %d Received link speed %d update from adapter\n", port->actor_port_number, speed);
385 return speed; 383 return speed;
386} 384}
387 385
@@ -407,12 +405,12 @@ static u8 __get_duplex(struct port *port)
407 switch (slave->duplex) { 405 switch (slave->duplex) {
408 case DUPLEX_FULL: 406 case DUPLEX_FULL:
409 retval=0x1; 407 retval=0x1;
410 dprintk("Port %d Received status full duplex update from adapter\n", port->actor_port_number); 408 pr_debug("Port %d Received status full duplex update from adapter\n", port->actor_port_number);
411 break; 409 break;
412 case DUPLEX_HALF: 410 case DUPLEX_HALF:
413 default: 411 default:
414 retval=0x0; 412 retval=0x0;
415 dprintk("Port %d Received status NOT full duplex update from adapter\n", port->actor_port_number); 413 pr_debug("Port %d Received status NOT full duplex update from adapter\n", port->actor_port_number);
416 break; 414 break;
417 } 415 }
418 } 416 }
@@ -1019,7 +1017,7 @@ static void ad_mux_machine(struct port *port)
1019 1017
1020 // check if the state machine was changed 1018 // check if the state machine was changed
1021 if (port->sm_mux_state != last_state) { 1019 if (port->sm_mux_state != last_state) {
1022 dprintk("Mux Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_mux_state); 1020 pr_debug("Mux Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_mux_state);
1023 switch (port->sm_mux_state) { 1021 switch (port->sm_mux_state) {
1024 case AD_MUX_DETACHED: 1022 case AD_MUX_DETACHED:
1025 __detach_bond_from_agg(port); 1023 __detach_bond_from_agg(port);
@@ -1118,7 +1116,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
1118 1116
1119 // check if the State machine was changed or new lacpdu arrived 1117 // check if the State machine was changed or new lacpdu arrived
1120 if ((port->sm_rx_state != last_state) || (lacpdu)) { 1118 if ((port->sm_rx_state != last_state) || (lacpdu)) {
1121 dprintk("Rx Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_rx_state); 1119 pr_debug("Rx Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_rx_state);
1122 switch (port->sm_rx_state) { 1120 switch (port->sm_rx_state) {
1123 case AD_RX_INITIALIZE: 1121 case AD_RX_INITIALIZE:
1124 if (!(port->actor_oper_port_key & AD_DUPLEX_KEY_BITS)) { 1122 if (!(port->actor_oper_port_key & AD_DUPLEX_KEY_BITS)) {
@@ -1205,7 +1203,7 @@ static void ad_tx_machine(struct port *port)
1205 __update_lacpdu_from_port(port); 1203 __update_lacpdu_from_port(port);
1206 // send the lacpdu 1204 // send the lacpdu
1207 if (ad_lacpdu_send(port) >= 0) { 1205 if (ad_lacpdu_send(port) >= 0) {
1208 dprintk("Sent LACPDU on port %d\n", port->actor_port_number); 1206 pr_debug("Sent LACPDU on port %d\n", port->actor_port_number);
1209 // mark ntt as false, so it will not be sent again until demanded 1207 // mark ntt as false, so it will not be sent again until demanded
1210 port->ntt = 0; 1208 port->ntt = 0;
1211 } 1209 }
@@ -1278,7 +1276,7 @@ static void ad_periodic_machine(struct port *port)
1278 1276
1279 // check if the state machine was changed 1277 // check if the state machine was changed
1280 if (port->sm_periodic_state != last_state) { 1278 if (port->sm_periodic_state != last_state) {
1281 dprintk("Periodic Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_periodic_state); 1279 pr_debug("Periodic Machine: Port=%d, Last State=%d, Curr State=%d\n", port->actor_port_number, last_state, port->sm_periodic_state);
1282 switch (port->sm_periodic_state) { 1280 switch (port->sm_periodic_state) {
1283 case AD_NO_PERIODIC: 1281 case AD_NO_PERIODIC:
1284 port->sm_periodic_timer_counter = 0; // zero timer 1282 port->sm_periodic_timer_counter = 0; // zero timer
@@ -1335,7 +1333,7 @@ static void ad_port_selection_logic(struct port *port)
1335 port->next_port_in_aggregator=NULL; 1333 port->next_port_in_aggregator=NULL;
1336 port->actor_port_aggregator_identifier=0; 1334 port->actor_port_aggregator_identifier=0;
1337 1335
1338 dprintk("Port %d left LAG %d\n", port->actor_port_number, temp_aggregator->aggregator_identifier); 1336 pr_debug("Port %d left LAG %d\n", port->actor_port_number, temp_aggregator->aggregator_identifier);
1339 // if the aggregator is empty, clear its parameters, and set it ready to be attached 1337 // if the aggregator is empty, clear its parameters, and set it ready to be attached
1340 if (!temp_aggregator->lag_ports) { 1338 if (!temp_aggregator->lag_ports) {
1341 ad_clear_agg(temp_aggregator); 1339 ad_clear_agg(temp_aggregator);
@@ -1378,7 +1376,7 @@ static void ad_port_selection_logic(struct port *port)
1378 port->next_port_in_aggregator=aggregator->lag_ports; 1376 port->next_port_in_aggregator=aggregator->lag_ports;
1379 port->aggregator->num_of_ports++; 1377 port->aggregator->num_of_ports++;
1380 aggregator->lag_ports=port; 1378 aggregator->lag_ports=port;
1381 dprintk("Port %d joined LAG %d(existing LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); 1379 pr_debug("Port %d joined LAG %d(existing LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier);
1382 1380
1383 // mark this port as selected 1381 // mark this port as selected
1384 port->sm_vars |= AD_PORT_SELECTED; 1382 port->sm_vars |= AD_PORT_SELECTED;
@@ -1415,7 +1413,7 @@ static void ad_port_selection_logic(struct port *port)
1415 // mark this port as selected 1413 // mark this port as selected
1416 port->sm_vars |= AD_PORT_SELECTED; 1414 port->sm_vars |= AD_PORT_SELECTED;
1417 1415
1418 dprintk("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); 1416 pr_debug("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier);
1419 } else { 1417 } else {
1420 printk(KERN_ERR DRV_NAME ": %s: Port %d (on %s) did not find a suitable aggregator\n", 1418 printk(KERN_ERR DRV_NAME ": %s: Port %d (on %s) did not find a suitable aggregator\n",
1421 port->slave->dev->master->name, 1419 port->slave->dev->master->name,
@@ -1574,19 +1572,19 @@ static void ad_agg_selection_logic(struct aggregator *agg)
1574 1572
1575 // if there is new best aggregator, activate it 1573 // if there is new best aggregator, activate it
1576 if (best) { 1574 if (best) {
1577 dprintk("best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n", 1575 pr_debug("best Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
1578 best->aggregator_identifier, best->num_of_ports, 1576 best->aggregator_identifier, best->num_of_ports,
1579 best->actor_oper_aggregator_key, 1577 best->actor_oper_aggregator_key,
1580 best->partner_oper_aggregator_key, 1578 best->partner_oper_aggregator_key,
1581 best->is_individual, best->is_active); 1579 best->is_individual, best->is_active);
1582 dprintk("best ports %p slave %p %s\n", 1580 pr_debug("best ports %p slave %p %s\n",
1583 best->lag_ports, best->slave, 1581 best->lag_ports, best->slave,
1584 best->slave ? best->slave->dev->name : "NULL"); 1582 best->slave ? best->slave->dev->name : "NULL");
1585 1583
1586 for (agg = __get_first_agg(best->lag_ports); agg; 1584 for (agg = __get_first_agg(best->lag_ports); agg;
1587 agg = __get_next_agg(agg)) { 1585 agg = __get_next_agg(agg)) {
1588 1586
1589 dprintk("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n", 1587 pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
1590 agg->aggregator_identifier, agg->num_of_ports, 1588 agg->aggregator_identifier, agg->num_of_ports,
1591 agg->actor_oper_aggregator_key, 1589 agg->actor_oper_aggregator_key,
1592 agg->partner_oper_aggregator_key, 1590 agg->partner_oper_aggregator_key,
@@ -1602,9 +1600,9 @@ static void ad_agg_selection_logic(struct aggregator *agg)
1602 } 1600 }
1603 1601
1604 best->is_active = 1; 1602 best->is_active = 1;
1605 dprintk("LAG %d chosen as the active LAG\n", 1603 pr_debug("LAG %d chosen as the active LAG\n",
1606 best->aggregator_identifier); 1604 best->aggregator_identifier);
1607 dprintk("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n", 1605 pr_debug("Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n",
1608 best->aggregator_identifier, best->num_of_ports, 1606 best->aggregator_identifier, best->num_of_ports,
1609 best->actor_oper_aggregator_key, 1607 best->actor_oper_aggregator_key,
1610 best->partner_oper_aggregator_key, 1608 best->partner_oper_aggregator_key,
@@ -1662,7 +1660,7 @@ static void ad_clear_agg(struct aggregator *aggregator)
1662 aggregator->lag_ports = NULL; 1660 aggregator->lag_ports = NULL;
1663 aggregator->is_active = 0; 1661 aggregator->is_active = 0;
1664 aggregator->num_of_ports = 0; 1662 aggregator->num_of_ports = 0;
1665 dprintk("LAG %d was cleared\n", aggregator->aggregator_identifier); 1663 pr_debug("LAG %d was cleared\n", aggregator->aggregator_identifier);
1666 } 1664 }
1667} 1665}
1668 1666
@@ -1747,7 +1745,7 @@ static void ad_initialize_port(struct port *port, int lacp_fast)
1747static void ad_enable_collecting_distributing(struct port *port) 1745static void ad_enable_collecting_distributing(struct port *port)
1748{ 1746{
1749 if (port->aggregator->is_active) { 1747 if (port->aggregator->is_active) {
1750 dprintk("Enabling port %d(LAG %d)\n", port->actor_port_number, port->aggregator->aggregator_identifier); 1748 pr_debug("Enabling port %d(LAG %d)\n", port->actor_port_number, port->aggregator->aggregator_identifier);
1751 __enable_port(port); 1749 __enable_port(port);
1752 } 1750 }
1753} 1751}
@@ -1760,7 +1758,7 @@ static void ad_enable_collecting_distributing(struct port *port)
1760static void ad_disable_collecting_distributing(struct port *port) 1758static void ad_disable_collecting_distributing(struct port *port)
1761{ 1759{
1762 if (port->aggregator && MAC_ADDRESS_COMPARE(&(port->aggregator->partner_system), &(null_mac_addr))) { 1760 if (port->aggregator && MAC_ADDRESS_COMPARE(&(port->aggregator->partner_system), &(null_mac_addr))) {
1763 dprintk("Disabling port %d(LAG %d)\n", port->actor_port_number, port->aggregator->aggregator_identifier); 1761 pr_debug("Disabling port %d(LAG %d)\n", port->actor_port_number, port->aggregator->aggregator_identifier);
1764 __disable_port(port); 1762 __disable_port(port);
1765 } 1763 }
1766} 1764}
@@ -1798,7 +1796,7 @@ static void ad_marker_info_send(struct port *port)
1798 1796
1799 // send the marker information 1797 // send the marker information
1800 if (ad_marker_send(port, &marker) >= 0) { 1798 if (ad_marker_send(port, &marker) >= 0) {
1801 dprintk("Sent Marker Information on port %d\n", port->actor_port_number); 1799 pr_debug("Sent Marker Information on port %d\n", port->actor_port_number);
1802 } 1800 }
1803} 1801}
1804#endif 1802#endif
@@ -1822,7 +1820,7 @@ static void ad_marker_info_received(struct bond_marker *marker_info,
1822 // send the marker response 1820 // send the marker response
1823 1821
1824 if (ad_marker_send(port, &marker) >= 0) { 1822 if (ad_marker_send(port, &marker) >= 0) {
1825 dprintk("Sent Marker Response on port %d\n", port->actor_port_number); 1823 pr_debug("Sent Marker Response on port %d\n", port->actor_port_number);
1826 } 1824 }
1827} 1825}
1828 1826
@@ -2036,7 +2034,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
2036 return; 2034 return;
2037 } 2035 }
2038 2036
2039 dprintk("Unbinding Link Aggregation Group %d\n", aggregator->aggregator_identifier); 2037 pr_debug("Unbinding Link Aggregation Group %d\n", aggregator->aggregator_identifier);
2040 2038
2041 /* Tell the partner that this port is not suitable for aggregation */ 2039 /* Tell the partner that this port is not suitable for aggregation */
2042 port->actor_oper_port_state &= ~AD_STATE_AGGREGATION; 2040 port->actor_oper_port_state &= ~AD_STATE_AGGREGATION;
@@ -2060,7 +2058,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
2060 // if new aggregator found, copy the aggregator's parameters 2058 // if new aggregator found, copy the aggregator's parameters
2061 // and connect the related lag_ports to the new aggregator 2059 // and connect the related lag_ports to the new aggregator
2062 if ((new_aggregator) && ((!new_aggregator->lag_ports) || ((new_aggregator->lag_ports == port) && !new_aggregator->lag_ports->next_port_in_aggregator))) { 2060 if ((new_aggregator) && ((!new_aggregator->lag_ports) || ((new_aggregator->lag_ports == port) && !new_aggregator->lag_ports->next_port_in_aggregator))) {
2063 dprintk("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); 2061 pr_debug("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier);
2064 2062
2065 if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { 2063 if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) {
2066 printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", 2064 printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n",
@@ -2111,7 +2109,7 @@ void bond_3ad_unbind_slave(struct slave *slave)
2111 } 2109 }
2112 } 2110 }
2113 2111
2114 dprintk("Unbinding port %d\n", port->actor_port_number); 2112 pr_debug("Unbinding port %d\n", port->actor_port_number);
2115 // find the aggregator that this port is connected to 2113 // find the aggregator that this port is connected to
2116 temp_aggregator = __get_first_agg(port); 2114 temp_aggregator = __get_first_agg(port);
2117 for (; temp_aggregator; temp_aggregator = __get_next_agg(temp_aggregator)) { 2115 for (; temp_aggregator; temp_aggregator = __get_next_agg(temp_aggregator)) {
@@ -2242,7 +2240,7 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
2242 2240
2243 switch (lacpdu->subtype) { 2241 switch (lacpdu->subtype) {
2244 case AD_TYPE_LACPDU: 2242 case AD_TYPE_LACPDU:
2245 dprintk("Received LACPDU on port %d\n", port->actor_port_number); 2243 pr_debug("Received LACPDU on port %d\n", port->actor_port_number);
2246 ad_rx_machine(lacpdu, port); 2244 ad_rx_machine(lacpdu, port);
2247 break; 2245 break;
2248 2246
@@ -2251,17 +2249,17 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
2251 2249
2252 switch (((struct bond_marker *)lacpdu)->tlv_type) { 2250 switch (((struct bond_marker *)lacpdu)->tlv_type) {
2253 case AD_MARKER_INFORMATION_SUBTYPE: 2251 case AD_MARKER_INFORMATION_SUBTYPE:
2254 dprintk("Received Marker Information on port %d\n", port->actor_port_number); 2252 pr_debug("Received Marker Information on port %d\n", port->actor_port_number);
2255 ad_marker_info_received((struct bond_marker *)lacpdu, port); 2253 ad_marker_info_received((struct bond_marker *)lacpdu, port);
2256 break; 2254 break;
2257 2255
2258 case AD_MARKER_RESPONSE_SUBTYPE: 2256 case AD_MARKER_RESPONSE_SUBTYPE:
2259 dprintk("Received Marker Response on port %d\n", port->actor_port_number); 2257 pr_debug("Received Marker Response on port %d\n", port->actor_port_number);
2260 ad_marker_response_received((struct bond_marker *)lacpdu, port); 2258 ad_marker_response_received((struct bond_marker *)lacpdu, port);
2261 break; 2259 break;
2262 2260
2263 default: 2261 default:
2264 dprintk("Received an unknown Marker subtype on slot %d\n", port->actor_port_number); 2262 pr_debug("Received an unknown Marker subtype on slot %d\n", port->actor_port_number);
2265 } 2263 }
2266 } 2264 }
2267 } 2265 }
@@ -2289,7 +2287,7 @@ void bond_3ad_adapter_speed_changed(struct slave *slave)
2289 2287
2290 port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS; 2288 port->actor_admin_port_key &= ~AD_SPEED_KEY_BITS;
2291 port->actor_oper_port_key=port->actor_admin_port_key |= (__get_link_speed(port) << 1); 2289 port->actor_oper_port_key=port->actor_admin_port_key |= (__get_link_speed(port) << 1);
2292 dprintk("Port %d changed speed\n", port->actor_port_number); 2290 pr_debug("Port %d changed speed\n", port->actor_port_number);
2293 // there is no need to reselect a new aggregator, just signal the 2291 // there is no need to reselect a new aggregator, just signal the
2294 // state machines to reinitialize 2292 // state machines to reinitialize
2295 port->sm_vars |= AD_PORT_BEGIN; 2293 port->sm_vars |= AD_PORT_BEGIN;
@@ -2317,7 +2315,7 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave)
2317 2315
2318 port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS; 2316 port->actor_admin_port_key &= ~AD_DUPLEX_KEY_BITS;
2319 port->actor_oper_port_key=port->actor_admin_port_key |= __get_duplex(port); 2317 port->actor_oper_port_key=port->actor_admin_port_key |= __get_duplex(port);
2320 dprintk("Port %d changed duplex\n", port->actor_port_number); 2318 pr_debug("Port %d changed duplex\n", port->actor_port_number);
2321 // there is no need to reselect a new aggregator, just signal the 2319 // there is no need to reselect a new aggregator, just signal the
2322 // state machines to reinitialize 2320 // state machines to reinitialize
2323 port->sm_vars |= AD_PORT_BEGIN; 2321 port->sm_vars |= AD_PORT_BEGIN;
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index f0dde1888c71..27fb7f5c21cf 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -20,8 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23//#define BONDING_DEBUG 1
24
25#include <linux/skbuff.h> 23#include <linux/skbuff.h>
26#include <linux/netdevice.h> 24#include <linux/netdevice.h>
27#include <linux/etherdevice.h> 25#include <linux/etherdevice.h>
@@ -361,12 +359,12 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct
361 goto out; 359 goto out;
362 360
363 if (!arp) { 361 if (!arp) {
364 dprintk("Packet has no ARP data\n"); 362 pr_debug("Packet has no ARP data\n");
365 goto out; 363 goto out;
366 } 364 }
367 365
368 if (skb->len < sizeof(struct arp_pkt)) { 366 if (skb->len < sizeof(struct arp_pkt)) {
369 dprintk("Packet is too small to be an ARP\n"); 367 pr_debug("Packet is too small to be an ARP\n");
370 goto out; 368 goto out;
371 } 369 }
372 370
@@ -376,7 +374,7 @@ static int rlb_arp_recv(struct sk_buff *skb, struct net_device *bond_dev, struct
376 bond_dev->name); 374 bond_dev->name);
377 bond = netdev_priv(bond_dev); 375 bond = netdev_priv(bond_dev);
378 rlb_update_entry_from_arp(bond, arp); 376 rlb_update_entry_from_arp(bond, arp);
379 dprintk("Server received an ARP Reply from client\n"); 377 pr_debug("Server received an ARP Reply from client\n");
380 } 378 }
381 379
382 res = NET_RX_SUCCESS; 380 res = NET_RX_SUCCESS;
@@ -730,7 +728,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
730 if (tx_slave) { 728 if (tx_slave) {
731 memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN); 729 memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN);
732 } 730 }
733 dprintk("Server sent ARP Reply packet\n"); 731 pr_debug("Server sent ARP Reply packet\n");
734 } else if (arp->op_code == htons(ARPOP_REQUEST)) { 732 } else if (arp->op_code == htons(ARPOP_REQUEST)) {
735 /* Create an entry in the rx_hashtbl for this client as a 733 /* Create an entry in the rx_hashtbl for this client as a
736 * place holder. 734 * place holder.
@@ -750,7 +748,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
750 * updated with their assigned mac. 748 * updated with their assigned mac.
751 */ 749 */
752 rlb_req_update_subnet_clients(bond, arp->ip_src); 750 rlb_req_update_subnet_clients(bond, arp->ip_src);
753 dprintk("Server sent ARP Request packet\n"); 751 pr_debug("Server sent ARP Request packet\n");
754 } 752 }
755 753
756 return tx_slave; 754 return tx_slave;
diff --git a/drivers/net/bonding/bond_ipv6.c b/drivers/net/bonding/bond_ipv6.c
index 11581da5d930..0d73bf5ac5a5 100644
--- a/drivers/net/bonding/bond_ipv6.c
+++ b/drivers/net/bonding/bond_ipv6.c
@@ -20,8 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23//#define BONDING_DEBUG 1
24
25#include <linux/types.h> 23#include <linux/types.h>
26#include <linux/if_vlan.h> 24#include <linux/if_vlan.h>
27#include <net/ipv6.h> 25#include <net/ipv6.h>
@@ -74,7 +72,7 @@ static void bond_na_send(struct net_device *slave_dev,
74 72
75 addrconf_addr_solict_mult(daddr, &mcaddr); 73 addrconf_addr_solict_mult(daddr, &mcaddr);
76 74
77 dprintk("ipv6 na on slave %s: dest %pI6, src %pI6\n", 75 pr_debug("ipv6 na on slave %s: dest %pI6, src %pI6\n",
78 slave_dev->name, &mcaddr, daddr); 76 slave_dev->name, &mcaddr, daddr);
79 77
80 skb = ndisc_build_skb(slave_dev, &mcaddr, daddr, &icmp6h, daddr, 78 skb = ndisc_build_skb(slave_dev, &mcaddr, daddr, &icmp6h, daddr,
@@ -110,7 +108,7 @@ void bond_send_unsolicited_na(struct bonding *bond)
110 struct inet6_dev *idev; 108 struct inet6_dev *idev;
111 int is_router; 109 int is_router;
112 110
113 dprintk("bond_send_unsol_na: bond %s slave %s\n", bond->dev->name, 111 pr_debug("bond_send_unsol_na: bond %s slave %s\n", bond->dev->name,
114 slave ? slave->dev->name : "NULL"); 112 slave ? slave->dev->name : "NULL");
115 113
116 if (!slave || !bond->send_unsol_na || 114 if (!slave || !bond->send_unsol_na ||
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7f2ac499aac2..19cd5c1e1bd3 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -31,8 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34//#define BONDING_DEBUG 1
35
36#include <linux/kernel.h> 34#include <linux/kernel.h>
37#include <linux/module.h> 35#include <linux/module.h>
38#include <linux/types.h> 36#include <linux/types.h>
@@ -248,7 +246,7 @@ static int bond_add_vlan(struct bonding *bond, unsigned short vlan_id)
248{ 246{
249 struct vlan_entry *vlan; 247 struct vlan_entry *vlan;
250 248
251 dprintk("bond: %s, vlan id %d\n", 249 pr_debug("bond: %s, vlan id %d\n",
252 (bond ? bond->dev->name: "None"), vlan_id); 250 (bond ? bond->dev->name: "None"), vlan_id);
253 251
254 vlan = kzalloc(sizeof(struct vlan_entry), GFP_KERNEL); 252 vlan = kzalloc(sizeof(struct vlan_entry), GFP_KERNEL);
@@ -265,7 +263,7 @@ static int bond_add_vlan(struct bonding *bond, unsigned short vlan_id)
265 263
266 write_unlock_bh(&bond->lock); 264 write_unlock_bh(&bond->lock);
267 265
268 dprintk("added VLAN ID %d on bond %s\n", vlan_id, bond->dev->name); 266 pr_debug("added VLAN ID %d on bond %s\n", vlan_id, bond->dev->name);
269 267
270 return 0; 268 return 0;
271} 269}
@@ -282,7 +280,7 @@ static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id)
282 struct vlan_entry *vlan; 280 struct vlan_entry *vlan;
283 int res = -ENODEV; 281 int res = -ENODEV;
284 282
285 dprintk("bond: %s, vlan id %d\n", bond->dev->name, vlan_id); 283 pr_debug("bond: %s, vlan id %d\n", bond->dev->name, vlan_id);
286 284
287 write_lock_bh(&bond->lock); 285 write_lock_bh(&bond->lock);
288 286
@@ -293,7 +291,7 @@ static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id)
293 if (bond_is_lb(bond)) 291 if (bond_is_lb(bond))
294 bond_alb_clear_vlan(bond, vlan_id); 292 bond_alb_clear_vlan(bond, vlan_id);
295 293
296 dprintk("removed VLAN ID %d from bond %s\n", vlan_id, 294 pr_debug("removed VLAN ID %d from bond %s\n", vlan_id,
297 bond->dev->name); 295 bond->dev->name);
298 296
299 kfree(vlan); 297 kfree(vlan);
@@ -313,7 +311,7 @@ static int bond_del_vlan(struct bonding *bond, unsigned short vlan_id)
313 } 311 }
314 } 312 }
315 313
316 dprintk("couldn't find VLAN ID %d in bond %s\n", vlan_id, 314 pr_debug("couldn't find VLAN ID %d in bond %s\n", vlan_id,
317 bond->dev->name); 315 bond->dev->name);
318 316
319out: 317out:
@@ -337,13 +335,13 @@ static int bond_has_challenged_slaves(struct bonding *bond)
337 335
338 bond_for_each_slave(bond, slave, i) { 336 bond_for_each_slave(bond, slave, i) {
339 if (slave->dev->features & NETIF_F_VLAN_CHALLENGED) { 337 if (slave->dev->features & NETIF_F_VLAN_CHALLENGED) {
340 dprintk("found VLAN challenged slave - %s\n", 338 pr_debug("found VLAN challenged slave - %s\n",
341 slave->dev->name); 339 slave->dev->name);
342 return 1; 340 return 1;
343 } 341 }
344 } 342 }
345 343
346 dprintk("no VLAN challenged slaves found\n"); 344 pr_debug("no VLAN challenged slaves found\n");
347 return 0; 345 return 0;
348} 346}
349 347
@@ -1319,9 +1317,9 @@ static void bond_detach_slave(struct bonding *bond, struct slave *slave)
1319static int bond_sethwaddr(struct net_device *bond_dev, 1317static int bond_sethwaddr(struct net_device *bond_dev,
1320 struct net_device *slave_dev) 1318 struct net_device *slave_dev)
1321{ 1319{
1322 dprintk("bond_dev=%p\n", bond_dev); 1320 pr_debug("bond_dev=%p\n", bond_dev);
1323 dprintk("slave_dev=%p\n", slave_dev); 1321 pr_debug("slave_dev=%p\n", slave_dev);
1324 dprintk("slave_dev->addr_len=%d\n", slave_dev->addr_len); 1322 pr_debug("slave_dev->addr_len=%d\n", slave_dev->addr_len);
1325 memcpy(bond_dev->dev_addr, slave_dev->dev_addr, slave_dev->addr_len); 1323 memcpy(bond_dev->dev_addr, slave_dev->dev_addr, slave_dev->addr_len);
1326 return 0; 1324 return 0;
1327} 1325}
@@ -1412,14 +1410,14 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1412 1410
1413 /* already enslaved */ 1411 /* already enslaved */
1414 if (slave_dev->flags & IFF_SLAVE) { 1412 if (slave_dev->flags & IFF_SLAVE) {
1415 dprintk("Error, Device was already enslaved\n"); 1413 pr_debug("Error, Device was already enslaved\n");
1416 return -EBUSY; 1414 return -EBUSY;
1417 } 1415 }
1418 1416
1419 /* vlan challenged mutual exclusion */ 1417 /* vlan challenged mutual exclusion */
1420 /* no need to lock since we're protected by rtnl_lock */ 1418 /* no need to lock since we're protected by rtnl_lock */
1421 if (slave_dev->features & NETIF_F_VLAN_CHALLENGED) { 1419 if (slave_dev->features & NETIF_F_VLAN_CHALLENGED) {
1422 dprintk("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name); 1420 pr_debug("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name);
1423 if (!list_empty(&bond->vlan_list)) { 1421 if (!list_empty(&bond->vlan_list)) {
1424 printk(KERN_ERR DRV_NAME 1422 printk(KERN_ERR DRV_NAME
1425 ": %s: Error: cannot enslave VLAN " 1423 ": %s: Error: cannot enslave VLAN "
@@ -1437,7 +1435,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1437 bond_dev->features |= NETIF_F_VLAN_CHALLENGED; 1435 bond_dev->features |= NETIF_F_VLAN_CHALLENGED;
1438 } 1436 }
1439 } else { 1437 } else {
1440 dprintk("%s: ! NETIF_F_VLAN_CHALLENGED\n", slave_dev->name); 1438 pr_debug("%s: ! NETIF_F_VLAN_CHALLENGED\n", slave_dev->name);
1441 if (bond->slave_cnt == 0) { 1439 if (bond->slave_cnt == 0) {
1442 /* First slave, and it is not VLAN challenged, 1440 /* First slave, and it is not VLAN challenged,
1443 * so remove the block of adding VLANs over the bond. 1441 * so remove the block of adding VLANs over the bond.
@@ -1525,20 +1523,20 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1525 addr.sa_family = slave_dev->type; 1523 addr.sa_family = slave_dev->type;
1526 res = dev_set_mac_address(slave_dev, &addr); 1524 res = dev_set_mac_address(slave_dev, &addr);
1527 if (res) { 1525 if (res) {
1528 dprintk("Error %d calling set_mac_address\n", res); 1526 pr_debug("Error %d calling set_mac_address\n", res);
1529 goto err_free; 1527 goto err_free;
1530 } 1528 }
1531 } 1529 }
1532 1530
1533 res = netdev_set_master(slave_dev, bond_dev); 1531 res = netdev_set_master(slave_dev, bond_dev);
1534 if (res) { 1532 if (res) {
1535 dprintk("Error %d calling netdev_set_master\n", res); 1533 pr_debug("Error %d calling netdev_set_master\n", res);
1536 goto err_restore_mac; 1534 goto err_restore_mac;
1537 } 1535 }
1538 /* open the slave since the application closed it */ 1536 /* open the slave since the application closed it */
1539 res = dev_open(slave_dev); 1537 res = dev_open(slave_dev);
1540 if (res) { 1538 if (res) {
1541 dprintk("Openning slave %s failed\n", slave_dev->name); 1539 pr_debug("Openning slave %s failed\n", slave_dev->name);
1542 goto err_unset_master; 1540 goto err_unset_master;
1543 } 1541 }
1544 1542
@@ -1643,18 +1641,18 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1643 if (!bond->params.miimon || 1641 if (!bond->params.miimon ||
1644 (bond_check_dev_link(bond, slave_dev, 0) == BMSR_LSTATUS)) { 1642 (bond_check_dev_link(bond, slave_dev, 0) == BMSR_LSTATUS)) {
1645 if (bond->params.updelay) { 1643 if (bond->params.updelay) {
1646 dprintk("Initial state of slave_dev is " 1644 pr_debug("Initial state of slave_dev is "
1647 "BOND_LINK_BACK\n"); 1645 "BOND_LINK_BACK\n");
1648 new_slave->link = BOND_LINK_BACK; 1646 new_slave->link = BOND_LINK_BACK;
1649 new_slave->delay = bond->params.updelay; 1647 new_slave->delay = bond->params.updelay;
1650 } else { 1648 } else {
1651 dprintk("Initial state of slave_dev is " 1649 pr_debug("Initial state of slave_dev is "
1652 "BOND_LINK_UP\n"); 1650 "BOND_LINK_UP\n");
1653 new_slave->link = BOND_LINK_UP; 1651 new_slave->link = BOND_LINK_UP;
1654 } 1652 }
1655 new_slave->jiffies = jiffies; 1653 new_slave->jiffies = jiffies;
1656 } else { 1654 } else {
1657 dprintk("Initial state of slave_dev is " 1655 pr_debug("Initial state of slave_dev is "
1658 "BOND_LINK_DOWN\n"); 1656 "BOND_LINK_DOWN\n");
1659 new_slave->link = BOND_LINK_DOWN; 1657 new_slave->link = BOND_LINK_DOWN;
1660 } 1658 }
@@ -1715,7 +1713,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1715 bond_set_slave_inactive_flags(new_slave); 1713 bond_set_slave_inactive_flags(new_slave);
1716 break; 1714 break;
1717 default: 1715 default:
1718 dprintk("This slave is always active in trunk mode\n"); 1716 pr_debug("This slave is always active in trunk mode\n");
1719 1717
1720 /* always active in trunk mode */ 1718 /* always active in trunk mode */
1721 new_slave->state = BOND_STATE_ACTIVE; 1719 new_slave->state = BOND_STATE_ACTIVE;
@@ -2536,7 +2534,7 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op, __be32 dest_
2536{ 2534{
2537 struct sk_buff *skb; 2535 struct sk_buff *skb;
2538 2536
2539 dprintk("arp %d on slave %s: dst %x src %x vid %d\n", arp_op, 2537 pr_debug("arp %d on slave %s: dst %x src %x vid %d\n", arp_op,
2540 slave_dev->name, dest_ip, src_ip, vlan_id); 2538 slave_dev->name, dest_ip, src_ip, vlan_id);
2541 2539
2542 skb = arp_create(arp_op, ETH_P_ARP, dest_ip, slave_dev, src_ip, 2540 skb = arp_create(arp_op, ETH_P_ARP, dest_ip, slave_dev, src_ip,
@@ -2569,9 +2567,9 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2569 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) { 2567 for (i = 0; (i < BOND_MAX_ARP_TARGETS); i++) {
2570 if (!targets[i]) 2568 if (!targets[i])
2571 continue; 2569 continue;
2572 dprintk("basa: target %x\n", targets[i]); 2570 pr_debug("basa: target %x\n", targets[i]);
2573 if (list_empty(&bond->vlan_list)) { 2571 if (list_empty(&bond->vlan_list)) {
2574 dprintk("basa: empty vlan: arp_send\n"); 2572 pr_debug("basa: empty vlan: arp_send\n");
2575 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2573 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2576 bond->master_ip, 0); 2574 bond->master_ip, 0);
2577 continue; 2575 continue;
@@ -2601,7 +2599,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2601 */ 2599 */
2602 if (rt->u.dst.dev == bond->dev) { 2600 if (rt->u.dst.dev == bond->dev) {
2603 ip_rt_put(rt); 2601 ip_rt_put(rt);
2604 dprintk("basa: rtdev == bond->dev: arp_send\n"); 2602 pr_debug("basa: rtdev == bond->dev: arp_send\n");
2605 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 2603 bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i],
2606 bond->master_ip, 0); 2604 bond->master_ip, 0);
2607 continue; 2605 continue;
@@ -2612,7 +2610,7 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
2612 vlan_dev = vlan_group_get_device(bond->vlgrp, vlan->vlan_id); 2610 vlan_dev = vlan_group_get_device(bond->vlgrp, vlan->vlan_id);
2613 if (vlan_dev == rt->u.dst.dev) { 2611 if (vlan_dev == rt->u.dst.dev) {
2614 vlan_id = vlan->vlan_id; 2612 vlan_id = vlan->vlan_id;
2615 dprintk("basa: vlan match on %s %d\n", 2613 pr_debug("basa: vlan match on %s %d\n",
2616 vlan_dev->name, vlan_id); 2614 vlan_dev->name, vlan_id);
2617 break; 2615 break;
2618 } 2616 }
@@ -2647,7 +2645,7 @@ static void bond_send_gratuitous_arp(struct bonding *bond)
2647 struct vlan_entry *vlan; 2645 struct vlan_entry *vlan;
2648 struct net_device *vlan_dev; 2646 struct net_device *vlan_dev;
2649 2647
2650 dprintk("bond_send_grat_arp: bond %s slave %s\n", bond->dev->name, 2648 pr_debug("bond_send_grat_arp: bond %s slave %s\n", bond->dev->name,
2651 slave ? slave->dev->name : "NULL"); 2649 slave ? slave->dev->name : "NULL");
2652 2650
2653 if (!slave || !bond->send_grat_arp || 2651 if (!slave || !bond->send_grat_arp ||
@@ -2677,7 +2675,7 @@ static void bond_validate_arp(struct bonding *bond, struct slave *slave, __be32
2677 2675
2678 targets = bond->params.arp_targets; 2676 targets = bond->params.arp_targets;
2679 for (i = 0; (i < BOND_MAX_ARP_TARGETS) && targets[i]; i++) { 2677 for (i = 0; (i < BOND_MAX_ARP_TARGETS) && targets[i]; i++) {
2680 dprintk("bva: sip %pI4 tip %pI4 t[%d] %pI4 bhti(tip) %d\n", 2678 pr_debug("bva: sip %pI4 tip %pI4 t[%d] %pI4 bhti(tip) %d\n",
2681 &sip, &tip, i, &targets[i], bond_has_this_ip(bond, tip)); 2679 &sip, &tip, i, &targets[i], bond_has_this_ip(bond, tip));
2682 if (sip == targets[i]) { 2680 if (sip == targets[i]) {
2683 if (bond_has_this_ip(bond, tip)) 2681 if (bond_has_this_ip(bond, tip))
@@ -2704,7 +2702,7 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
2704 bond = netdev_priv(dev); 2702 bond = netdev_priv(dev);
2705 read_lock(&bond->lock); 2703 read_lock(&bond->lock);
2706 2704
2707 dprintk("bond_arp_rcv: bond %s skb->dev %s orig_dev %s\n", 2705 pr_debug("bond_arp_rcv: bond %s skb->dev %s orig_dev %s\n",
2708 bond->dev->name, skb->dev ? skb->dev->name : "NULL", 2706 bond->dev->name, skb->dev ? skb->dev->name : "NULL",
2709 orig_dev ? orig_dev->name : "NULL"); 2707 orig_dev ? orig_dev->name : "NULL");
2710 2708
@@ -2730,7 +2728,7 @@ static int bond_arp_rcv(struct sk_buff *skb, struct net_device *dev, struct pack
2730 arp_ptr += 4 + dev->addr_len; 2728 arp_ptr += 4 + dev->addr_len;
2731 memcpy(&tip, arp_ptr, 4); 2729 memcpy(&tip, arp_ptr, 4);
2732 2730
2733 dprintk("bond_arp_rcv: %s %s/%d av %d sv %d sip %pI4 tip %pI4\n", 2731 pr_debug("bond_arp_rcv: %s %s/%d av %d sv %d sip %pI4 tip %pI4\n",
2734 bond->dev->name, slave->dev->name, slave->state, 2732 bond->dev->name, slave->dev->name, slave->state,
2735 bond->params.arp_validate, slave_do_arp_validate(bond, slave), 2733 bond->params.arp_validate, slave_do_arp_validate(bond, slave),
2736 &sip, &tip); 2734 &sip, &tip);
@@ -3595,7 +3593,7 @@ static int bond_netdev_event(struct notifier_block *this, unsigned long event, v
3595 if (dev_net(event_dev) != &init_net) 3593 if (dev_net(event_dev) != &init_net)
3596 return NOTIFY_DONE; 3594 return NOTIFY_DONE;
3597 3595
3598 dprintk("event_dev: %s, event: %lx\n", 3596 pr_debug("event_dev: %s, event: %lx\n",
3599 (event_dev ? event_dev->name : "None"), 3597 (event_dev ? event_dev->name : "None"),
3600 event); 3598 event);
3601 3599
@@ -3603,12 +3601,12 @@ static int bond_netdev_event(struct notifier_block *this, unsigned long event, v
3603 return NOTIFY_DONE; 3601 return NOTIFY_DONE;
3604 3602
3605 if (event_dev->flags & IFF_MASTER) { 3603 if (event_dev->flags & IFF_MASTER) {
3606 dprintk("IFF_MASTER\n"); 3604 pr_debug("IFF_MASTER\n");
3607 return bond_master_netdev_event(event, event_dev); 3605 return bond_master_netdev_event(event, event_dev);
3608 } 3606 }
3609 3607
3610 if (event_dev->flags & IFF_SLAVE) { 3608 if (event_dev->flags & IFF_SLAVE) {
3611 dprintk("IFF_SLAVE\n"); 3609 pr_debug("IFF_SLAVE\n");
3612 return bond_slave_netdev_event(event, event_dev); 3610 return bond_slave_netdev_event(event, event_dev);
3613 } 3611 }
3614 3612
@@ -3937,7 +3935,7 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
3937 struct mii_ioctl_data *mii = NULL; 3935 struct mii_ioctl_data *mii = NULL;
3938 int res = 0; 3936 int res = 0;
3939 3937
3940 dprintk("bond_ioctl: master=%s, cmd=%d\n", 3938 pr_debug("bond_ioctl: master=%s, cmd=%d\n",
3941 bond_dev->name, cmd); 3939 bond_dev->name, cmd);
3942 3940
3943 switch (cmd) { 3941 switch (cmd) {
@@ -4015,12 +4013,12 @@ static int bond_do_ioctl(struct net_device *bond_dev, struct ifreq *ifr, int cmd
4015 down_write(&(bonding_rwsem)); 4013 down_write(&(bonding_rwsem));
4016 slave_dev = dev_get_by_name(&init_net, ifr->ifr_slave); 4014 slave_dev = dev_get_by_name(&init_net, ifr->ifr_slave);
4017 4015
4018 dprintk("slave_dev=%p: \n", slave_dev); 4016 pr_debug("slave_dev=%p: \n", slave_dev);
4019 4017
4020 if (!slave_dev) { 4018 if (!slave_dev) {
4021 res = -ENODEV; 4019 res = -ENODEV;
4022 } else { 4020 } else {
4023 dprintk("slave_dev->name=%s: \n", slave_dev->name); 4021 pr_debug("slave_dev->name=%s: \n", slave_dev->name);
4024 switch (cmd) { 4022 switch (cmd) {
4025 case BOND_ENSLAVE_OLD: 4023 case BOND_ENSLAVE_OLD:
4026 case SIOCBONDENSLAVE: 4024 case SIOCBONDENSLAVE:
@@ -4131,7 +4129,7 @@ static int bond_change_mtu(struct net_device *bond_dev, int new_mtu)
4131 int res = 0; 4129 int res = 0;
4132 int i; 4130 int i;
4133 4131
4134 dprintk("bond=%p, name=%s, new_mtu=%d\n", bond, 4132 pr_debug("bond=%p, name=%s, new_mtu=%d\n", bond,
4135 (bond_dev ? bond_dev->name : "None"), new_mtu); 4133 (bond_dev ? bond_dev->name : "None"), new_mtu);
4136 4134
4137 /* Can't hold bond->lock with bh disabled here since 4135 /* Can't hold bond->lock with bh disabled here since
@@ -4150,7 +4148,7 @@ static int bond_change_mtu(struct net_device *bond_dev, int new_mtu)
4150 */ 4148 */
4151 4149
4152 bond_for_each_slave(bond, slave, i) { 4150 bond_for_each_slave(bond, slave, i) {
4153 dprintk("s %p s->p %p c_m %p\n", slave, 4151 pr_debug("s %p s->p %p c_m %p\n", slave,
4154 slave->prev, slave->dev->change_mtu); 4152 slave->prev, slave->dev->change_mtu);
4155 4153
4156 res = dev_set_mtu(slave->dev, new_mtu); 4154 res = dev_set_mtu(slave->dev, new_mtu);
@@ -4164,7 +4162,7 @@ static int bond_change_mtu(struct net_device *bond_dev, int new_mtu)
4164 * means changing their mtu from timer context, which 4162 * means changing their mtu from timer context, which
4165 * is probably not a good idea. 4163 * is probably not a good idea.
4166 */ 4164 */
4167 dprintk("err %d %s\n", res, slave->dev->name); 4165 pr_debug("err %d %s\n", res, slave->dev->name);
4168 goto unwind; 4166 goto unwind;
4169 } 4167 }
4170 } 4168 }
@@ -4181,7 +4179,7 @@ unwind:
4181 4179
4182 tmp_res = dev_set_mtu(slave->dev, bond_dev->mtu); 4180 tmp_res = dev_set_mtu(slave->dev, bond_dev->mtu);
4183 if (tmp_res) { 4181 if (tmp_res) {
4184 dprintk("unwind err %d dev %s\n", tmp_res, 4182 pr_debug("unwind err %d dev %s\n", tmp_res,
4185 slave->dev->name); 4183 slave->dev->name);
4186 } 4184 }
4187 } 4185 }
@@ -4208,7 +4206,7 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
4208 return bond_alb_set_mac_address(bond_dev, addr); 4206 return bond_alb_set_mac_address(bond_dev, addr);
4209 4207
4210 4208
4211 dprintk("bond=%p, name=%s\n", bond, (bond_dev ? bond_dev->name : "None")); 4209 pr_debug("bond=%p, name=%s\n", bond, (bond_dev ? bond_dev->name : "None"));
4212 4210
4213 /* 4211 /*
4214 * If fail_over_mac is set to active, do nothing and return 4212 * If fail_over_mac is set to active, do nothing and return
@@ -4238,11 +4236,11 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
4238 4236
4239 bond_for_each_slave(bond, slave, i) { 4237 bond_for_each_slave(bond, slave, i) {
4240 const struct net_device_ops *slave_ops = slave->dev->netdev_ops; 4238 const struct net_device_ops *slave_ops = slave->dev->netdev_ops;
4241 dprintk("slave %p %s\n", slave, slave->dev->name); 4239 pr_debug("slave %p %s\n", slave, slave->dev->name);
4242 4240
4243 if (slave_ops->ndo_set_mac_address == NULL) { 4241 if (slave_ops->ndo_set_mac_address == NULL) {
4244 res = -EOPNOTSUPP; 4242 res = -EOPNOTSUPP;
4245 dprintk("EOPNOTSUPP %s\n", slave->dev->name); 4243 pr_debug("EOPNOTSUPP %s\n", slave->dev->name);
4246 goto unwind; 4244 goto unwind;
4247 } 4245 }
4248 4246
@@ -4254,7 +4252,7 @@ static int bond_set_mac_address(struct net_device *bond_dev, void *addr)
4254 * breakage anyway until ARP finish 4252 * breakage anyway until ARP finish
4255 * updating, so... 4253 * updating, so...
4256 */ 4254 */
4257 dprintk("err %d %s\n", res, slave->dev->name); 4255 pr_debug("err %d %s\n", res, slave->dev->name);
4258 goto unwind; 4256 goto unwind;
4259 } 4257 }
4260 } 4258 }
@@ -4274,7 +4272,7 @@ unwind:
4274 4272
4275 tmp_res = dev_set_mac_address(slave->dev, &tmp_sa); 4273 tmp_res = dev_set_mac_address(slave->dev, &tmp_sa);
4276 if (tmp_res) { 4274 if (tmp_res) {
4277 dprintk("unwind err %d dev %s\n", tmp_res, 4275 pr_debug("unwind err %d dev %s\n", tmp_res,
4278 slave->dev->name); 4276 slave->dev->name);
4279 } 4277 }
4280 } 4278 }
@@ -4593,7 +4591,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
4593{ 4591{
4594 struct bonding *bond = netdev_priv(bond_dev); 4592 struct bonding *bond = netdev_priv(bond_dev);
4595 4593
4596 dprintk("Begin bond_init for %s\n", bond_dev->name); 4594 pr_debug("Begin bond_init for %s\n", bond_dev->name);
4597 4595
4598 /* initialize rwlocks */ 4596 /* initialize rwlocks */
4599 rwlock_init(&bond->lock); 4597 rwlock_init(&bond->lock);
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index f6475ce347df..d1a110b08b51 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -36,8 +36,8 @@
36#include <linux/rtnetlink.h> 36#include <linux/rtnetlink.h>
37#include <net/net_namespace.h> 37#include <net/net_namespace.h>
38 38
39/* #define BONDING_DEBUG 1 */
40#include "bonding.h" 39#include "bonding.h"
40
41#define to_dev(obj) container_of(obj,struct device,kobj) 41#define to_dev(obj) container_of(obj,struct device,kobj)
42#define to_bond(cd) ((struct bonding *)(netdev_priv(to_net_dev(cd)))) 42#define to_bond(cd) ((struct bonding *)(netdev_priv(to_net_dev(cd))))
43 43
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index b8c2462577b7..27642f2c4a37 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -32,14 +32,6 @@
32 32
33extern struct list_head bond_dev_list; 33extern struct list_head bond_dev_list;
34 34
35#ifdef BONDING_DEBUG
36#define dprintk(fmt, args...) \
37 printk(KERN_DEBUG \
38 DRV_NAME ": %s() %d: " fmt, __func__, __LINE__ , ## args )
39#else
40#define dprintk(fmt, args...)
41#endif /* BONDING_DEBUG */
42
43#define IS_UP(dev) \ 35#define IS_UP(dev) \
44 ((((dev)->flags & IFF_UP) == IFF_UP) && \ 36 ((((dev)->flags & IFF_UP) == IFF_UP) && \
45 netif_running(dev) && \ 37 netif_running(dev) && \