From: Jay S. <jay...@ty...> - 2007-12-27 21:50:59
|
I need to be able to reconfigure the Ethernet address on the fly. If I do the following: ifdown eth0 ifup eth0 The link is still shown as "down". If I "modprobe -r smc911x", to remove the module from the running kernel, and then "ifup eth0", it comes back up. See the following: [root@gumstix ~]# ifconfig eth0 Link encap:Ethernet HWaddr 1E:D9:0E:42:A3:90 inet addr:169.254.1.1 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:131 Base address:0xe000 DMA chan:ff lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) [root@gumstix ~]# ifdown eth0 [root@gumstix ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: no [root@gumstix ~]# ifup eth0 Auto negotiation NOT supported ADDRCONF(NETDEV_UP): eth0: link is not ready [root@gumstix ~]# ifdown eth0 [root@gumstix ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: no [root@gumstix ~]# ifdown eth0 [root@gumstix ~]# lsmod Module Size Used by ipv6 248416 10 smc911x 18913 0 mii 4736 1 smc911x usb_storage 34948 0 scsi_mod 84772 1 usb_storage usbhid 14468 0 hid 26368 1 usbhid ohci_hcd 19620 0 usbcore 113340 4 usb_storage,usbhid,ohci_hcd gumstix_smc911x 2784 1 smc911x nls_iso8859_1 3872 1 nls_cp437 5536 1 gpio_event_drv 10580 0 pxamci 6240 0 mmc_block 6568 2 mmc_core 22100 2 pxamci,mmc_block ext3 96580 0 jbd 51912 1 ext3 vfat 9920 1 fat 45980 1 vfat nls_base 6400 4 nls_iso8859_1,nls_cp437,vfat,fat cramfs 40592 1 loop 12392 2 proc_gpio 9412 0 pxafb 10376 0 [permanent] cfbcopyarea 3072 1 pxafb fb 33956 1 pxafb cfbimgblt 2464 1 pxafb cfbfillrect 3456 1 pxafb unix 22292 6 [root@gumstix ~]# modprobe -r smc911x Device 'smc911x.0' does not have a release() function, it is broken and must be fixed. BUG: at drivers/base/core.c:106 device_release() [<c002cdc8>] (dump_stack+0x0/0x14) from [<c00faa78>] (device_release+0x80/0x94) [<c00fa9f8>] (device_release+0x0/0x94) from [<c00d57e0>] (kobject_cleanup+0x68/0x84) [<c00d5778>] (kobject_cleanup+0x0/0x84) from [<c00d5810>] (kobject_release+0x14/0x18) r7 = C3055F34 r6 = C3054000 r5 = C00D57FC r4 = BF080818 [<c00d57fc>] (kobject_release+0x0/0x18) from [<c00d66d8>] (kref_put+0x84/0xa0) [<c00d6654>] (kref_put+0x0/0xa0) from [<c00d5770>] (kobject_put+0x20/0x28) r5 = 00000000 r4 = BF080790 [<c00d5750>] (kobject_put+0x0/0x28) from [<c00fac98>] (put_device+0x1c/0x20) [<c00fac7c>] (put_device+0x0/0x20) from [<c00ff780>] (platform_device_put+0x1c/0x20) [<c00ff764>] (platform_device_put+0x0/0x20) from [<c00ff804>] (platform_device_unregister+0x20/0x24) [<c00ff7e4>] (platform_device_unregister+0x0/0x24) from [<bf08003c>] (cleanup_module+0x2c/0x3c [gumstix_smc911x]) r4 = BF080960 [<bf080010>] (cleanup_module+0x0/0x3c [gumstix_smc911x]) from [<c0056990>] (sys_delete_module+0x1b4/0x1e4) [<c00567dc>] (sys_delete_module+0x0/0x1e4) from [<c0028be0>] (ret_fast_syscall+0x0/0x2c) r8 = C0028D64 r7 = 00000081 r6 = 00017480 r5 = 00017430 r4 = 00000000 [root@gumstix ~]# ifup eth0 eth0: LAN9117 (rev 1) at 0xc487e000 IRQ 131 eth0: Ethernet addr: 1e:d9:0e:42:a3:90 eth0: link down ADDRCONF(NETDEV_UP): eth0: link is not ready [root@gumstix ~]# [root@gumstix ~]# !e ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: no [root@gumstix ~]# ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 10Mb/s Duplex: Half Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: no [root@gumstix ~]# eth0: link up, 100Mbps, full-duplex, lpa 0x8DE1 ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [root@gumstix ~]# [root@gumstix ~]# !e ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: yes [root@gumstix ~]# ifdown eth0 [root@gumstix ~]# !e ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Current message level: 0x00000004 (4) Link detected: no [root@gumstix ~]# ifup eth0 Auto negotiation NOT supported ADDRCONF(NETDEV_UP): eth0: link is not ready [root@gumstix ~]# |