aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2005-11-09 13:34:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2005-11-13 14:48:18 -0500
commit4e0952c74ee450ded86e8946ce58ea8dfd05b007 (patch)
tree07e10c7adaf8f95d11d5e2181e2adce30c47d3ba /drivers
parentc2373ee98982a1c842dfb213c398f388d4227e63 (diff)
[PATCH] bonding: add bond name to all error messages
Add the bond name to all error messages so we can tell which one is complaining. Also reformats some error messages to be more consistent. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_3ad.c74
-rw-r--r--drivers/net/bonding/bond_alb.c30
-rw-r--r--drivers/net/bonding/bond_main.c89
3 files changed, 112 insertions, 81 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index d2f34d5a8083..04705233ca0b 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1198,10 +1198,10 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port)
1198 // detect loopback situation 1198 // detect loopback situation
1199 if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) { 1199 if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) {
1200 // INFO_RECEIVED_LOOPBACK_FRAMES 1200 // INFO_RECEIVED_LOOPBACK_FRAMES
1201 printk(KERN_ERR DRV_NAME ": An illegal loopback occurred on adapter (%s)\n", 1201 printk(KERN_ERR DRV_NAME ": %s: An illegal loopback occurred on "
1202 port->slave->dev->name); 1202 "adapter (%s). Check the configuration to verify that all "
1203 printk(KERN_ERR "Check the configuration to verify that all Adapters " 1203 "Adapters are connected to 802.3ad compliant switch ports\n",
1204 "are connected to 802.3ad compliant switch ports\n"); 1204 port->slave->dev->master->name, port->slave->dev->name);
1205 __release_rx_machine_lock(port); 1205 __release_rx_machine_lock(port);
1206 return; 1206 return;
1207 } 1207 }
@@ -1378,8 +1378,9 @@ static void ad_port_selection_logic(struct port *port)
1378 } 1378 }
1379 } 1379 }
1380 if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list 1380 if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list
1381 printk(KERN_WARNING DRV_NAME ": Warning: Port %d (on %s) was " 1381 printk(KERN_WARNING DRV_NAME ": %s: Warning: Port %d (on %s) was "
1382 "related to aggregator %d but was not on its port list\n", 1382 "related to aggregator %d but was not on its port list\n",
1383 port->slave->dev->master->name,
1383 port->actor_port_number, port->slave->dev->name, 1384 port->actor_port_number, port->slave->dev->name,
1384 port->aggregator->aggregator_identifier); 1385 port->aggregator->aggregator_identifier);
1385 } 1386 }
@@ -1450,7 +1451,8 @@ static void ad_port_selection_logic(struct port *port)
1450 1451
1451 dprintk("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); 1452 dprintk("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier);
1452 } else { 1453 } else {
1453 printk(KERN_ERR DRV_NAME ": Port %d (on %s) did not find a suitable aggregator\n", 1454 printk(KERN_ERR DRV_NAME ": %s: Port %d (on %s) did not find a suitable aggregator\n",
1455 port->slave->dev->master->name,
1454 port->actor_port_number, port->slave->dev->name); 1456 port->actor_port_number, port->slave->dev->name);
1455 } 1457 }
1456 } 1458 }
@@ -1582,8 +1584,9 @@ static void ad_agg_selection_logic(struct aggregator *aggregator)
1582 1584
1583 // check if any partner replys 1585 // check if any partner replys
1584 if (best_aggregator->is_individual) { 1586 if (best_aggregator->is_individual) {
1585 printk(KERN_WARNING DRV_NAME ": Warning: No 802.3ad response from the link partner " 1587 printk(KERN_WARNING DRV_NAME ": %s: Warning: No 802.3ad response from "
1586 "for any adapters in the bond\n"); 1588 "the link partner for any adapters in the bond\n",
1589 best_aggregator->slave->dev->master->name);
1587 } 1590 }
1588 1591
1589 // check if there are more than one aggregator 1592 // check if there are more than one aggregator
@@ -1915,7 +1918,8 @@ int bond_3ad_bind_slave(struct slave *slave)
1915 struct aggregator *aggregator; 1918 struct aggregator *aggregator;
1916 1919
1917 if (bond == NULL) { 1920 if (bond == NULL) {
1918 printk(KERN_ERR "The slave %s is not attached to its bond\n", slave->dev->name); 1921 printk(KERN_ERR DRV_NAME ": %s: The slave %s is not attached to its bond\n",
1922 slave->dev->master->name, slave->dev->name);
1919 return -1; 1923 return -1;
1920 } 1924 }
1921 1925
@@ -1990,7 +1994,9 @@ void bond_3ad_unbind_slave(struct slave *slave)
1990 1994
1991 // if slave is null, the whole port is not initialized 1995 // if slave is null, the whole port is not initialized
1992 if (!port->slave) { 1996 if (!port->slave) {
1993 printk(KERN_WARNING DRV_NAME ": Trying to unbind an uninitialized port on %s\n", slave->dev->name); 1997 printk(KERN_WARNING DRV_NAME ": Warning: %s: Trying to "
1998 "unbind an uninitialized port on %s\n",
1999 slave->dev->master->name, slave->dev->name);
1994 return; 2000 return;
1995 } 2001 }
1996 2002
@@ -2021,7 +2027,8 @@ void bond_3ad_unbind_slave(struct slave *slave)
2021 dprintk("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); 2027 dprintk("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier);
2022 2028
2023 if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { 2029 if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) {
2024 printk(KERN_INFO DRV_NAME ": Removing an active aggregator\n"); 2030 printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n",
2031 aggregator->slave->dev->master->name);
2025 // select new active aggregator 2032 // select new active aggregator
2026 select_new_active_agg = 1; 2033 select_new_active_agg = 1;
2027 } 2034 }
@@ -2051,15 +2058,17 @@ void bond_3ad_unbind_slave(struct slave *slave)
2051 ad_agg_selection_logic(__get_first_agg(port)); 2058 ad_agg_selection_logic(__get_first_agg(port));
2052 } 2059 }
2053 } else { 2060 } else {
2054 printk(KERN_WARNING DRV_NAME ": Warning: unbinding aggregator, " 2061 printk(KERN_WARNING DRV_NAME ": %s: Warning: unbinding aggregator, "
2055 "and could not find a new aggregator for its ports\n"); 2062 "and could not find a new aggregator for its ports\n",
2063 slave->dev->master->name);
2056 } 2064 }
2057 } else { // in case that the only port related to this aggregator is the one we want to remove 2065 } else { // in case that the only port related to this aggregator is the one we want to remove
2058 select_new_active_agg = aggregator->is_active; 2066 select_new_active_agg = aggregator->is_active;
2059 // clear the aggregator 2067 // clear the aggregator
2060 ad_clear_agg(aggregator); 2068 ad_clear_agg(aggregator);
2061 if (select_new_active_agg) { 2069 if (select_new_active_agg) {
2062 printk(KERN_INFO "Removing an active aggregator\n"); 2070 printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n",
2071 slave->dev->master->name);
2063 // select new active aggregator 2072 // select new active aggregator
2064 ad_agg_selection_logic(__get_first_agg(port)); 2073 ad_agg_selection_logic(__get_first_agg(port));
2065 } 2074 }
@@ -2085,7 +2094,8 @@ void bond_3ad_unbind_slave(struct slave *slave)
2085 // clear the aggregator 2094 // clear the aggregator
2086 ad_clear_agg(temp_aggregator); 2095 ad_clear_agg(temp_aggregator);
2087 if (select_new_active_agg) { 2096 if (select_new_active_agg) {
2088 printk(KERN_INFO "Removing an active aggregator\n"); 2097 printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n",
2098 slave->dev->master->name);
2089 // select new active aggregator 2099 // select new active aggregator
2090 ad_agg_selection_logic(__get_first_agg(port)); 2100 ad_agg_selection_logic(__get_first_agg(port));
2091 } 2101 }
@@ -2131,7 +2141,8 @@ void bond_3ad_state_machine_handler(struct bonding *bond)
2131 // select the active aggregator for the bond 2141 // select the active aggregator for the bond
2132 if ((port = __get_first_port(bond))) { 2142 if ((port = __get_first_port(bond))) {
2133 if (!port->slave) { 2143 if (!port->slave) {
2134 printk(KERN_WARNING DRV_NAME ": Warning: bond's first port is uninitialized\n"); 2144 printk(KERN_WARNING DRV_NAME ": %s: Warning: bond's first port is "
2145 "uninitialized\n", bond->dev->name);
2135 goto re_arm; 2146 goto re_arm;
2136 } 2147 }
2137 2148
@@ -2143,7 +2154,8 @@ void bond_3ad_state_machine_handler(struct bonding *bond)
2143 // for each port run the state machines 2154 // for each port run the state machines
2144 for (port = __get_first_port(bond); port; port = __get_next_port(port)) { 2155 for (port = __get_first_port(bond); port; port = __get_next_port(port)) {
2145 if (!port->slave) { 2156 if (!port->slave) {
2146 printk(KERN_WARNING DRV_NAME ": Warning: Found an uninitialized port\n"); 2157 printk(KERN_WARNING DRV_NAME ": %s: Warning: Found an uninitialized "
2158 "port\n", bond->dev->name);
2147 goto re_arm; 2159 goto re_arm;
2148 } 2160 }
2149 2161
@@ -2184,7 +2196,8 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u
2184 port = &(SLAVE_AD_INFO(slave).port); 2196 port = &(SLAVE_AD_INFO(slave).port);
2185 2197
2186 if (!port->slave) { 2198 if (!port->slave) {
2187 printk(KERN_WARNING DRV_NAME ": Warning: port of slave %s is uninitialized\n", slave->dev->name); 2199 printk(KERN_WARNING DRV_NAME ": %s: Warning: port of slave %s is "
2200 "uninitialized\n", slave->dev->name, slave->dev->master->name);
2188 return; 2201 return;
2189 } 2202 }
2190 2203
@@ -2230,8 +2243,9 @@ void bond_3ad_adapter_speed_changed(struct slave *slave)
2230 2243
2231 // if slave is null, the whole port is not initialized 2244 // if slave is null, the whole port is not initialized
2232 if (!port->slave) { 2245 if (!port->slave) {
2233 printk(KERN_WARNING DRV_NAME ": Warning: speed changed for uninitialized port on %s\n", 2246 printk(KERN_WARNING DRV_NAME ": Warning: %s: speed "
2234 slave->dev->name); 2247 "changed for uninitialized port on %s\n",
2248 slave->dev->master->name, slave->dev->name);
2235 return; 2249 return;
2236 } 2250 }
2237 2251
@@ -2257,8 +2271,9 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave)
2257 2271
2258 // if slave is null, the whole port is not initialized 2272 // if slave is null, the whole port is not initialized
2259 if (!port->slave) { 2273 if (!port->slave) {
2260 printk(KERN_WARNING DRV_NAME ": Warning: duplex changed for uninitialized port on %s\n", 2274 printk(KERN_WARNING DRV_NAME ": %s: Warning: duplex changed "
2261 slave->dev->name); 2275 "for uninitialized port on %s\n",
2276 slave->dev->master->name, slave->dev->name);
2262 return; 2277 return;
2263 } 2278 }
2264 2279
@@ -2285,8 +2300,9 @@ void bond_3ad_handle_link_change(struct slave *slave, char link)
2285 2300
2286 // if slave is null, the whole port is not initialized 2301 // if slave is null, the whole port is not initialized
2287 if (!port->slave) { 2302 if (!port->slave) {
2288 printk(KERN_WARNING DRV_NAME ": Warning: link status changed for uninitialized port on %s\n", 2303 printk(KERN_WARNING DRV_NAME ": Warning: %s: link status changed for "
2289 slave->dev->name); 2304 "uninitialized port on %s\n",
2305 slave->dev->master->name, slave->dev->name);
2290 return; 2306 return;
2291 } 2307 }
2292 2308
@@ -2363,7 +2379,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2363 } 2379 }
2364 2380
2365 if (bond_3ad_get_active_agg_info(bond, &ad_info)) { 2381 if (bond_3ad_get_active_agg_info(bond, &ad_info)) {
2366 printk(KERN_DEBUG "ERROR: bond_3ad_get_active_agg_info failed\n"); 2382 printk(KERN_DEBUG DRV_NAME ": %s: Error: "
2383 "bond_3ad_get_active_agg_info failed\n", dev->name);
2367 goto out; 2384 goto out;
2368 } 2385 }
2369 2386
@@ -2372,7 +2389,9 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2372 2389
2373 if (slaves_in_agg == 0) { 2390 if (slaves_in_agg == 0) {
2374 /*the aggregator is empty*/ 2391 /*the aggregator is empty*/
2375 printk(KERN_DEBUG "ERROR: active aggregator is empty\n"); 2392 printk(KERN_DEBUG DRV_NAME ": %s: Error: active "
2393 "aggregator is empty\n",
2394 dev->name);
2376 goto out; 2395 goto out;
2377 } 2396 }
2378 2397
@@ -2390,7 +2409,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev)
2390 } 2409 }
2391 2410
2392 if (slave_agg_no >= 0) { 2411 if (slave_agg_no >= 0) {
2393 printk(KERN_ERR DRV_NAME ": Error: Couldn't find a slave to tx on for aggregator ID %d\n", agg_id); 2412 printk(KERN_ERR DRV_NAME ": %s: Error: Couldn't find a slave to tx on "
2413 "for aggregator ID %d\n", dev->name, agg_id);
2394 goto out; 2414 goto out;
2395 } 2415 }
2396 2416
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index f8fce3961197..96dfb90c5252 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -207,7 +207,7 @@ static int tlb_initialize(struct bonding *bond)
207 bond_info->tx_hashtbl = kmalloc(size, GFP_KERNEL); 207 bond_info->tx_hashtbl = kmalloc(size, GFP_KERNEL);
208 if (!bond_info->tx_hashtbl) { 208 if (!bond_info->tx_hashtbl) {
209 printk(KERN_ERR DRV_NAME 209 printk(KERN_ERR DRV_NAME
210 ": Error: %s: Failed to allocate TLB hash table\n", 210 ": %s: Error: Failed to allocate TLB hash table\n",
211 bond->dev->name); 211 bond->dev->name);
212 _unlock_tx_hashtbl(bond); 212 _unlock_tx_hashtbl(bond);
213 return -1; 213 return -1;
@@ -513,7 +513,8 @@ static void rlb_update_client(struct rlb_client_info *client_info)
513 client_info->mac_dst); 513 client_info->mac_dst);
514 if (!skb) { 514 if (!skb) {
515 printk(KERN_ERR DRV_NAME 515 printk(KERN_ERR DRV_NAME
516 ": Error: failed to create an ARP packet\n"); 516 ": %s: Error: failed to create an ARP packet\n",
517 client_info->slave->dev->master->name);
517 continue; 518 continue;
518 } 519 }
519 520
@@ -523,7 +524,8 @@ static void rlb_update_client(struct rlb_client_info *client_info)
523 skb = vlan_put_tag(skb, client_info->vlan_id); 524 skb = vlan_put_tag(skb, client_info->vlan_id);
524 if (!skb) { 525 if (!skb) {
525 printk(KERN_ERR DRV_NAME 526 printk(KERN_ERR DRV_NAME
526 ": Error: failed to insert VLAN tag\n"); 527 ": %s: Error: failed to insert VLAN tag\n",
528 client_info->slave->dev->master->name);
527 continue; 529 continue;
528 } 530 }
529 } 531 }
@@ -606,8 +608,9 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, u32 src_ip)
606 608
607 if (!client_info->slave) { 609 if (!client_info->slave) {
608 printk(KERN_ERR DRV_NAME 610 printk(KERN_ERR DRV_NAME
609 ": Error: found a client with no channel in " 611 ": %s: Error: found a client with no channel in "
610 "the client's hash table\n"); 612 "the client's hash table\n",
613 bond->dev->name);
611 continue; 614 continue;
612 } 615 }
613 /*update all clients using this src_ip, that are not assigned 616 /*update all clients using this src_ip, that are not assigned
@@ -807,7 +810,7 @@ static int rlb_initialize(struct bonding *bond)
807 bond_info->rx_hashtbl = kmalloc(size, GFP_KERNEL); 810 bond_info->rx_hashtbl = kmalloc(size, GFP_KERNEL);
808 if (!bond_info->rx_hashtbl) { 811 if (!bond_info->rx_hashtbl) {
809 printk(KERN_ERR DRV_NAME 812 printk(KERN_ERR DRV_NAME
810 ": Error: %s: Failed to allocate RLB hash table\n", 813 ": %s: Error: Failed to allocate RLB hash table\n",
811 bond->dev->name); 814 bond->dev->name);
812 _unlock_rx_hashtbl(bond); 815 _unlock_rx_hashtbl(bond);
813 return -1; 816 return -1;
@@ -927,7 +930,8 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
927 skb = vlan_put_tag(skb, vlan->vlan_id); 930 skb = vlan_put_tag(skb, vlan->vlan_id);
928 if (!skb) { 931 if (!skb) {
929 printk(KERN_ERR DRV_NAME 932 printk(KERN_ERR DRV_NAME
930 ": Error: failed to insert VLAN tag\n"); 933 ": %s: Error: failed to insert VLAN tag\n",
934 bond->dev->name);
931 continue; 935 continue;
932 } 936 }
933 } 937 }
@@ -956,11 +960,11 @@ static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[], int hw)
956 s_addr.sa_family = dev->type; 960 s_addr.sa_family = dev->type;
957 if (dev_set_mac_address(dev, &s_addr)) { 961 if (dev_set_mac_address(dev, &s_addr)) {
958 printk(KERN_ERR DRV_NAME 962 printk(KERN_ERR DRV_NAME
959 ": Error: dev_set_mac_address of dev %s failed! ALB " 963 ": %s: Error: dev_set_mac_address of dev %s failed! ALB "
960 "mode requires that the base driver support setting " 964 "mode requires that the base driver support setting "
961 "the hw address also when the network device's " 965 "the hw address also when the network device's "
962 "interface is open\n", 966 "interface is open\n",
963 dev->name); 967 dev->master->name, dev->name);
964 return -EOPNOTSUPP; 968 return -EOPNOTSUPP;
965 } 969 }
966 return 0; 970 return 0;
@@ -1153,16 +1157,16 @@ static int alb_handle_addr_collision_on_attach(struct bonding *bond, struct slav
1153 bond->alb_info.rlb_enabled); 1157 bond->alb_info.rlb_enabled);
1154 1158
1155 printk(KERN_WARNING DRV_NAME 1159 printk(KERN_WARNING DRV_NAME
1156 ": Warning: the hw address of slave %s is in use by " 1160 ": %s: Warning: the hw address of slave %s is in use by "
1157 "the bond; giving it the hw address of %s\n", 1161 "the bond; giving it the hw address of %s\n",
1158 slave->dev->name, free_mac_slave->dev->name); 1162 bond->dev->name, slave->dev->name, free_mac_slave->dev->name);
1159 1163
1160 } else if (has_bond_addr) { 1164 } else if (has_bond_addr) {
1161 printk(KERN_ERR DRV_NAME 1165 printk(KERN_ERR DRV_NAME
1162 ": Error: the hw address of slave %s is in use by the " 1166 ": %s: Error: the hw address of slave %s is in use by the "
1163 "bond; couldn't find a slave with a free hw address to " 1167 "bond; couldn't find a slave with a free hw address to "
1164 "give it (this should not have happened)\n", 1168 "give it (this should not have happened)\n",
1165 slave->dev->name); 1169 bond->dev->name, slave->dev->name);
1166 return -EFAULT; 1170 return -EFAULT;
1167 } 1171 }
1168 1172
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 94cec3cf2a13..7838522d5093 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -910,7 +910,7 @@ static void bond_vlan_rx_add_vid(struct net_device *bond_dev, uint16_t vid)
910 res = bond_add_vlan(bond, vid); 910 res = bond_add_vlan(bond, vid);
911 if (res) { 911 if (res) {
912 printk(KERN_ERR DRV_NAME 912 printk(KERN_ERR DRV_NAME
913 ": %s: Failed to add vlan id %d\n", 913 ": %s: Error: Failed to add vlan id %d\n",
914 bond_dev->name, vid); 914 bond_dev->name, vid);
915 } 915 }
916} 916}
@@ -944,7 +944,7 @@ static void bond_vlan_rx_kill_vid(struct net_device *bond_dev, uint16_t vid)
944 res = bond_del_vlan(bond, vid); 944 res = bond_del_vlan(bond, vid);
945 if (res) { 945 if (res) {
946 printk(KERN_ERR DRV_NAME 946 printk(KERN_ERR DRV_NAME
947 ": %s: Failed to remove vlan id %d\n", 947 ": %s: Error: Failed to remove vlan id %d\n",
948 bond_dev->name, vid); 948 bond_dev->name, vid);
949 } 949 }
950} 950}
@@ -1644,8 +1644,8 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
1644 if (!bond->params.use_carrier && slave_dev->ethtool_ops == NULL && 1644 if (!bond->params.use_carrier && slave_dev->ethtool_ops == NULL &&
1645 slave_dev->do_ioctl == NULL) { 1645 slave_dev->do_ioctl == NULL) {
1646 printk(KERN_WARNING DRV_NAME 1646 printk(KERN_WARNING DRV_NAME
1647 ": Warning : no link monitoring support for %s\n", 1647 ": %s: Warning: no link monitoring support for %s\n",
1648 slave_dev->name); 1648 bond_dev->name, slave_dev->name);
1649 } 1649 }
1650 1650
1651 /* bond must be initialized by bond_open() before enslaving */ 1651 /* bond must be initialized by bond_open() before enslaving */
@@ -1666,17 +1666,17 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
1666 dprintk("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name); 1666 dprintk("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name);
1667 if (!list_empty(&bond->vlan_list)) { 1667 if (!list_empty(&bond->vlan_list)) {
1668 printk(KERN_ERR DRV_NAME 1668 printk(KERN_ERR DRV_NAME
1669 ": Error: cannot enslave VLAN " 1669 ": %s: Error: cannot enslave VLAN "
1670 "challenged slave %s on VLAN enabled " 1670 "challenged slave %s on VLAN enabled "
1671 "bond %s\n", slave_dev->name, 1671 "bond %s\n", bond_dev->name, slave_dev->name,
1672 bond_dev->name); 1672 bond_dev->name);
1673 return -EPERM; 1673 return -EPERM;
1674 } else { 1674 } else {
1675 printk(KERN_WARNING DRV_NAME 1675 printk(KERN_WARNING DRV_NAME
1676 ": Warning: enslaved VLAN challenged " 1676 ": %s: Warning: enslaved VLAN challenged "
1677 "slave %s. Adding VLANs will be blocked as " 1677 "slave %s. Adding VLANs will be blocked as "
1678 "long as %s is part of bond %s\n", 1678 "long as %s is part of bond %s\n",
1679 slave_dev->name, slave_dev->name, 1679 bond_dev->name, slave_dev->name, slave_dev->name,
1680 bond_dev->name); 1680 bond_dev->name);
1681 bond_dev->features |= NETIF_F_VLAN_CHALLENGED; 1681 bond_dev->features |= NETIF_F_VLAN_CHALLENGED;
1682 } 1682 }
@@ -1706,12 +1706,11 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
1706 1706
1707 if (slave_dev->set_mac_address == NULL) { 1707 if (slave_dev->set_mac_address == NULL) {
1708 printk(KERN_ERR DRV_NAME 1708 printk(KERN_ERR DRV_NAME
1709 ": Error: The slave device you specified does " 1709 ": %s: Error: The slave device you specified does "
1710 "not support setting the MAC address.\n"); 1710 "not support setting the MAC address. "
1711 printk(KERN_ERR 1711 "Your kernel likely does not support slave "
1712 "Your kernel likely does not support slave devices.\n"); 1712 "devices.\n", bond_dev->name);
1713 1713 res = -EOPNOTSUPP;
1714 res = -EOPNOTSUPP;
1715 goto err_undo_flags; 1714 goto err_undo_flags;
1716 } 1715 }
1717 1716
@@ -1827,21 +1826,21 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
1827 * the messages for netif_carrier. 1826 * the messages for netif_carrier.
1828 */ 1827 */
1829 printk(KERN_WARNING DRV_NAME 1828 printk(KERN_WARNING DRV_NAME
1830 ": Warning: MII and ETHTOOL support not " 1829 ": %s: Warning: MII and ETHTOOL support not "
1831 "available for interface %s, and " 1830 "available for interface %s, and "
1832 "arp_interval/arp_ip_target module parameters " 1831 "arp_interval/arp_ip_target module parameters "
1833 "not specified, thus bonding will not detect " 1832 "not specified, thus bonding will not detect "
1834 "link failures! see bonding.txt for details.\n", 1833 "link failures! see bonding.txt for details.\n",
1835 slave_dev->name); 1834 bond_dev->name, slave_dev->name);
1836 } else if (link_reporting == -1) { 1835 } else if (link_reporting == -1) {
1837 /* unable get link status using mii/ethtool */ 1836 /* unable get link status using mii/ethtool */
1838 printk(KERN_WARNING DRV_NAME 1837 printk(KERN_WARNING DRV_NAME
1839 ": Warning: can't get link status from " 1838 ": %s: Warning: can't get link status from "
1840 "interface %s; the network driver associated " 1839 "interface %s; the network driver associated "
1841 "with this interface does not support MII or " 1840 "with this interface does not support MII or "
1842 "ETHTOOL link status reporting, thus miimon " 1841 "ETHTOOL link status reporting, thus miimon "
1843 "has no effect on this interface.\n", 1842 "has no effect on this interface.\n",
1844 slave_dev->name); 1843 bond_dev->name, slave_dev->name);
1845 } 1844 }
1846 } 1845 }
1847 1846
@@ -1868,15 +1867,15 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
1868 if (bond_update_speed_duplex(new_slave) && 1867 if (bond_update_speed_duplex(new_slave) &&
1869 (new_slave->link != BOND_LINK_DOWN)) { 1868 (new_slave->link != BOND_LINK_DOWN)) {
1870 printk(KERN_WARNING DRV_NAME 1869 printk(KERN_WARNING DRV_NAME
1871 ": Warning: failed to get speed and duplex from %s, " 1870 ": %s: Warning: failed to get speed and duplex from %s, "
1872 "assumed to be 100Mb/sec and Full.\n", 1871 "assumed to be 100Mb/sec and Full.\n",
1873 new_slave->dev->name); 1872 bond_dev->name, new_slave->dev->name);
1874 1873
1875 if (bond->params.mode == BOND_MODE_8023AD) { 1874 if (bond->params.mode == BOND_MODE_8023AD) {
1876 printk(KERN_WARNING 1875 printk(KERN_WARNING DRV_NAME
1877 "Operation of 802.3ad mode requires ETHTOOL " 1876 ": %s: Warning: Operation of 802.3ad mode requires ETHTOOL "
1878 "support in base driver for proper aggregator " 1877 "support in base driver for proper aggregator "
1879 "selection.\n"); 1878 "selection.\n", bond_dev->name);
1880 } 1879 }
1881 } 1880 }
1882 1881
@@ -2010,7 +2009,7 @@ static int bond_release(struct net_device *bond_dev, struct net_device *slave_de
2010 if (!(slave_dev->flags & IFF_SLAVE) || 2009 if (!(slave_dev->flags & IFF_SLAVE) ||
2011 (slave_dev->master != bond_dev)) { 2010 (slave_dev->master != bond_dev)) {
2012 printk(KERN_ERR DRV_NAME 2011 printk(KERN_ERR DRV_NAME
2013 ": Error: %s: cannot release %s.\n", 2012 ": %s: Error: cannot release %s.\n",
2014 bond_dev->name, slave_dev->name); 2013 bond_dev->name, slave_dev->name);
2015 return -EINVAL; 2014 return -EINVAL;
2016 } 2015 }
@@ -2031,11 +2030,12 @@ static int bond_release(struct net_device *bond_dev, struct net_device *slave_de
2031 ETH_ALEN); 2030 ETH_ALEN);
2032 if (!mac_addr_differ && (bond->slave_cnt > 1)) { 2031 if (!mac_addr_differ && (bond->slave_cnt > 1)) {
2033 printk(KERN_WARNING DRV_NAME 2032 printk(KERN_WARNING DRV_NAME
2034 ": Warning: the permanent HWaddr of %s " 2033 ": %s: Warning: the permanent HWaddr of %s "
2035 "- %02X:%02X:%02X:%02X:%02X:%02X - is " 2034 "- %02X:%02X:%02X:%02X:%02X:%02X - is "
2036 "still in use by %s. Set the HWaddr of " 2035 "still in use by %s. Set the HWaddr of "
2037 "%s to a different address to avoid " 2036 "%s to a different address to avoid "
2038 "conflicts.\n", 2037 "conflicts.\n",
2038 bond_dev->name,
2039 slave_dev->name, 2039 slave_dev->name,
2040 slave->perm_hwaddr[0], 2040 slave->perm_hwaddr[0],
2041 slave->perm_hwaddr[1], 2041 slave->perm_hwaddr[1],
@@ -2111,19 +2111,20 @@ static int bond_release(struct net_device *bond_dev, struct net_device *slave_de
2111 bond_dev->features |= NETIF_F_VLAN_CHALLENGED; 2111 bond_dev->features |= NETIF_F_VLAN_CHALLENGED;
2112 } else { 2112 } else {
2113 printk(KERN_WARNING DRV_NAME 2113 printk(KERN_WARNING DRV_NAME
2114 ": Warning: clearing HW address of %s while it " 2114 ": %s: Warning: clearing HW address of %s while it "
2115 "still has VLANs.\n", 2115 "still has VLANs.\n",
2116 bond_dev->name); 2116 bond_dev->name, bond_dev->name);
2117 printk(KERN_WARNING DRV_NAME 2117 printk(KERN_WARNING DRV_NAME
2118 ": When re-adding slaves, make sure the bond's " 2118 ": %s: When re-adding slaves, make sure the bond's "
2119 "HW address matches its VLANs'.\n"); 2119 "HW address matches its VLANs'.\n",
2120 bond_dev->name);
2120 } 2121 }
2121 } else if ((bond_dev->features & NETIF_F_VLAN_CHALLENGED) && 2122 } else if ((bond_dev->features & NETIF_F_VLAN_CHALLENGED) &&
2122 !bond_has_challenged_slaves(bond)) { 2123 !bond_has_challenged_slaves(bond)) {
2123 printk(KERN_INFO DRV_NAME 2124 printk(KERN_INFO DRV_NAME
2124 ": last VLAN challenged slave %s " 2125 ": %s: last VLAN challenged slave %s "
2125 "left bond %s. VLAN blocking is removed\n", 2126 "left bond %s. VLAN blocking is removed\n",
2126 slave_dev->name, bond_dev->name); 2127 bond_dev->name, slave_dev->name, bond_dev->name);
2127 bond_dev->features &= ~NETIF_F_VLAN_CHALLENGED; 2128 bond_dev->features &= ~NETIF_F_VLAN_CHALLENGED;
2128 } 2129 }
2129 2130
@@ -2274,12 +2275,13 @@ static int bond_release_all(struct net_device *bond_dev)
2274 bond_dev->features |= NETIF_F_VLAN_CHALLENGED; 2275 bond_dev->features |= NETIF_F_VLAN_CHALLENGED;
2275 } else { 2276 } else {
2276 printk(KERN_WARNING DRV_NAME 2277 printk(KERN_WARNING DRV_NAME
2277 ": Warning: clearing HW address of %s while it " 2278 ": %s: Warning: clearing HW address of %s while it "
2278 "still has VLANs.\n", 2279 "still has VLANs.\n",
2279 bond_dev->name); 2280 bond_dev->name, bond_dev->name);
2280 printk(KERN_WARNING DRV_NAME 2281 printk(KERN_WARNING DRV_NAME
2281 ": When re-adding slaves, make sure the bond's " 2282 ": %s: When re-adding slaves, make sure the bond's "
2282 "HW address matches its VLANs'.\n"); 2283 "HW address matches its VLANs'.\n",
2284 bond_dev->name);
2283 } 2285 }
2284 2286
2285 printk(KERN_INFO DRV_NAME 2287 printk(KERN_INFO DRV_NAME
@@ -2596,8 +2598,11 @@ static void bond_mii_monitor(struct net_device *bond_dev)
2596 break; 2598 break;
2597 default: 2599 default:
2598 /* Should not happen */ 2600 /* Should not happen */
2599 printk(KERN_ERR "bonding: Error: %s Illegal value (link=%d)\n", 2601 printk(KERN_ERR DRV_NAME
2600 slave->dev->name, slave->link); 2602 ": %s: Error: %s Illegal value (link=%d)\n",
2603 bond_dev->name,
2604 slave->dev->name,
2605 slave->link);
2601 goto out; 2606 goto out;
2602 } /* end of switch (slave->link) */ 2607 } /* end of switch (slave->link) */
2603 2608
@@ -4397,8 +4402,9 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev)
4397 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); 4402 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
4398 if (!skb2) { 4403 if (!skb2) {
4399 printk(KERN_ERR DRV_NAME 4404 printk(KERN_ERR DRV_NAME
4400 ": Error: bond_xmit_broadcast(): " 4405 ": %s: Error: bond_xmit_broadcast(): "
4401 "skb_clone() failed\n"); 4406 "skb_clone() failed\n",
4407 bond_dev->name);
4402 continue; 4408 continue;
4403 } 4409 }
4404 4410
@@ -4467,7 +4473,8 @@ static inline void bond_set_mode_ops(struct bonding *bond, int mode)
4467 default: 4473 default:
4468 /* Should never happen, mode already checked */ 4474 /* Should never happen, mode already checked */
4469 printk(KERN_ERR DRV_NAME 4475 printk(KERN_ERR DRV_NAME
4470 ": Error: Unknown bonding mode %d\n", 4476 ": %s: Error: Unknown bonding mode %d\n",
4477 bond_dev->name,
4471 mode); 4478 mode);
4472 break; 4479 break;
4473 } 4480 }
@@ -4670,7 +4677,7 @@ static int bond_check_params(struct bond_params *params)
4670 if (max_bonds < 1 || max_bonds > INT_MAX) { 4677 if (max_bonds < 1 || max_bonds > INT_MAX) {
4671 printk(KERN_WARNING DRV_NAME 4678 printk(KERN_WARNING DRV_NAME
4672 ": Warning: max_bonds (%d) not in range %d-%d, so it " 4679 ": Warning: max_bonds (%d) not in range %d-%d, so it "
4673 "was reset to BOND_DEFAULT_MAX_BONDS (%d)", 4680 "was reset to BOND_DEFAULT_MAX_BONDS (%d)\n",
4674 max_bonds, 1, INT_MAX, BOND_DEFAULT_MAX_BONDS); 4681 max_bonds, 1, INT_MAX, BOND_DEFAULT_MAX_BONDS);
4675 max_bonds = BOND_DEFAULT_MAX_BONDS; 4682 max_bonds = BOND_DEFAULT_MAX_BONDS;
4676 } 4683 }