aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-07-07 19:14:52 +0100
committerMichael Brown <mcb30@etherboot.org>2009-07-17 23:06:34 +0100
commit47c4aaa9e2cc0f216ec277885bc84ddf11d2b8a7 (patch)
treec5dd094e9a262fef77b9786bf3b19e0e040e0ae1 /src
parent165074c1881e7ce86e4d6d2e3caa20231f42560b (diff)
downloadipxe-47c4aaa9e2cc0f216ec277885bc84ddf11d2b8a7.tar.gz
[ipoib] Attempt the broadcast group join only if the link is up
Attempting the broadcast group join while the link is down is harmless, but can generate annoying volumes of debug messages.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/ipoib.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index 4c924d1d..c5b2b432 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -535,17 +535,11 @@ static int ipoib_open ( struct net_device *netdev ) {
/* Fill receive rings */
ib_refill_recv ( ibdev, ipoib->qp );
- /* Join broadcast group */
- if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
- DBGC ( ipoib, "IPoIB %p could not join broadcast group: %s\n",
- ipoib, strerror ( rc ) );
- goto err_join_broadcast;
- }
+ /* Fake a link status change to join the broadcast group */
+ ipoib_link_state_changed ( ibdev );
return 0;
- ipoib_leave_broadcast_group ( ipoib );
- err_join_broadcast:
ib_destroy_qp ( ibdev, ipoib->qp );
err_create_qp:
ib_destroy_cq ( ibdev, ipoib->cq );
@@ -639,7 +633,8 @@ void ipoib_link_state_changed ( struct ib_device *ibdev ) {
ipoib_set_ib_params ( ipoib );
/* Join new broadcast group */
- if ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) {
+ if ( ib_link_ok ( ibdev ) &&
+ ( ( rc = ipoib_join_broadcast_group ( ipoib ) ) != 0 ) ) {
DBGC ( ipoib, "IPoIB %p could not rejoin broadcast group: "
"%s\n", ipoib, strerror ( rc ) );
return;