On Fri, Jan 20, 2006 at 09:13:17PM -0800, Stephen Hemminger wrote: > On my laptop, the b44 device is created and the carrier state defaults > to ON when created by alloc_etherdev. This means tools like NetworkManager > see the carrier as On and try and bring the device up. The correct thing > to do is mark the carrier as Off when device is created.
I ran into this problem with ixp2000 too. However, calling netif_carrier_off calls into linkwatch_fire_event and I wasn't sure whether this is the right thing to do when the netdev isn't even registered yet. (I have the following not-to-be-submitted patch in my private tree.) Kind of odd that we don't have carrier=off by default.. diff -urN linux-2.6.15.commit/drivers/net/ixp2000/enp2611.c linux-2.6.15.snap/drivers/net/ixp2000/enp2611.c --- linux-2.6.15.commit/drivers/net/ixp2000/enp2611.c 2006-01-03 14:36:24.000000000 +0100 +++ linux-2.6.15.snap/drivers/net/ixp2000/enp2611.c 2006-01-03 15:50:52.000000000 +0100 @@ -211,6 +211,9 @@ nds[i]->get_stats = enp2611_get_stats; pm3386_init_port(i); pm3386_get_mac(i, nds[i]->dev_addr); + + /* @@@ Dirty hack. */ + set_bit(__LINK_STATE_NOCARRIER, &nds[i]->state); } ixp2400_msf_init(&enp2611_msf_parameters); - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html