if(!is_valid_ether_addr(netdev->dev_addr)) { 
if(!is_valid_ether_addr(netdev->perm_addr)) { 
ixgb_probe(struct pci_dev *pdev,		const struct pci_device_id *ent){	struct net_device *netdev = NULL;	struct ixgb_adapter *adapter;	static int cards_found = 0;	unsigned long mmio_start;	int mmio_len;	int pci_using_dac;	int i;	int err;	if((err = pci_enable_device(pdev)))		return err;	if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {		pci_using_dac = 1;	} else {		if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {			IXGB_ERR("No usable DMA configuration, aborting\n");			return err;		}		pci_using_dac = 0;	}	if((err = pci_request_regions(pdev, ixgb_driver_name)))		return err;	pci_set_master(pdev);	netdev = alloc_etherdev(sizeof(struct ixgb_adapter));	if(!netdev) {		err = -ENOMEM;		goto err_alloc_etherdev;	}	SET_MODULE_OWNER(netdev);	SET_NETDEV_DEV(netdev, &pdev->dev);	pci_set_drvdata(pdev, netdev);	adapter = netdev_priv(netdev);	adapter->netdev = netdev;	adapter->pdev = pdev;	adapter->hw.back = adapter;	mmio_start = pci_resource_start(pdev, BAR_0);	mmio_len = pci_resource_len(pdev, BAR_0);	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);	if(!adapter->hw.hw_addr) {		err = -EIO;		goto err_ioremap;	}	for(i = BAR_1; i <= BAR_5; i++) {		if(pci_resource_len(pdev, i) == 0)			continue;		if(pci_resource_flags(pdev, i) & IORESOURCE_IO) {			adapter->hw.io_base = pci_resource_start(pdev, i);			break;		}	}	netdev->open = &ixgb_open;	netdev->stop = &ixgb_close;	netdev->hard_start_xmit = &ixgb_xmit_frame;	netdev->get_stats = &ixgb_get_stats;	netdev->set_multicast_list = &ixgb_set_multi;	netdev->set_mac_address = &ixgb_set_mac;	netdev->change_mtu = &ixgb_change_mtu;	ixgb_set_ethtool_ops(netdev);	netdev->tx_timeout = &ixgb_tx_timeout;	netdev->watchdog_timeo = HZ;#ifdef CONFIG_IXGB_NAPI	netdev->poll = &ixgb_clean;	netdev->weight = 64;#endif	netdev->vlan_rx_register = ixgb_vlan_rx_register;	netdev->vlan_rx_add_vid = ixgb_vlan_rx_add_vid;	netdev->vlan_rx_kill_vid = ixgb_vlan_rx_kill_vid;#ifdef CONFIG_NET_POLL_CONTROLLER	netdev->poll_controller = ixgb_netpoll;#endif	netdev->mem_start = mmio_start;	netdev->mem_end = mmio_start + mmio_len;	netdev->base_addr = adapter->hw.io_base;	adapter->bd_number = cards_found;	adapter->link_speed = 0;	adapter->link_duplex = 0;	/* setup the private structure */	if((err = ixgb_sw_init(adapter)))		goto err_sw_init;	netdev->features = NETIF_F_SG |			   NETIF_F_HW_CSUM |			   NETIF_F_HW_VLAN_TX |			   NETIF_F_HW_VLAN_RX |			   NETIF_F_HW_VLAN_FILTER;#ifdef NETIF_F_TSO	netdev->features |= NETIF_F_TSO;#endif	if(pci_using_dac)		netdev->features |= NETIF_F_HIGHDMA;	/* make sure the EEPROM is good */	if(!ixgb_validate_eeprom_checksum(&adapter->hw)) {		printk(KERN_ERR "The EEPROM Checksum Is Not Valid\n");		err = -EIO;		goto err_eeprom;	}	ixgb_get_ee_mac_addr(&adapter->hw, netdev->dev_addr);	if(!is_valid_ether_addr(netdev->dev_addr)) {		err = -EIO;		goto err_eeprom;	}	adapter->part_num = ixgb_get_ee_pba_number(&adapter->hw);	init_timer(&adapter->watchdog_timer);	adapter->watchdog_timer.function = &ixgb_watchdog;	adapter->watchdog_timer.data = (unsigned long)adapter;	INIT_WORK(&adapter->tx_timeout_task,		  (void (*)(void *))ixgb_tx_timeout_task, netdev);	if((err = register_netdev(netdev)))		goto err_register;	/* we're going to reset, so assume we have no link for now */	netif_carrier_off(netdev);	netif_stop_queue(netdev);	printk(KERN_INFO "%s: Intel(R) PRO/10GbE Network Connection\n",		   netdev->name);	ixgb_check_options(adapter);	/* reset the hardware with the new settings */	ixgb_reset(adapter);	cards_found++;	return 0;err_register:err_sw_init:err_eeprom:	iounmap(adapter->hw.hw_addr);err_ioremap:	free_netdev(netdev);err_alloc_etherdev:	pci_release_regions(pdev);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/df859c519ef7b72d9be7396443316da87272e8b6/ixgb_main.c/clean/drivers/net/ixgb/ixgb_main.c