func: static int pci_e1000_init(PCIDevice *pci_dev) E1000State * d = E1000 ( pci_dev ) ; memmove ( d -> eeprom_data , e1000_eeprom_template , sizeof e1000_eeprom_template ); qemu_macaddr_default_if_unset ( & d -> conf . macaddr ); macaddr = d -> conf . macaddr . a; d -> eeprom_data [ i ] = ( macaddr [ 2 * i + 1 ] << 8 ) | macaddr [ 2 * i ]; for (i = 0; i < EEPROM_CHECKSUM_REG; i++) checksum += d -> eeprom_data [ i ]; checksum = ( uint16_t ) EEPROM_SUM - checksum; d -> eeprom_data [ EEPROM_CHECKSUM_REG ] = checksum; d -> nic = qemu_new_nic ( & net_e1000_info , & d -> conf , object_get_typename ( OBJECT ( d ) ) , dev -> id , d ); qemu_format_nic_info_str ( qemu_get_queue ( d -> nic ) , macaddr ); add_boot_device_path ( d -> conf . bootindex , dev , "/ethernet-phy@0" ); d -> autoneg_timer = qemu_new_timer_ms ( vm_clock , e1000_autoneg_timer , d ); 