 if (using_dac) dev->features |= NETIF_F_HIGHDMA; 
static int __devinit skge_probe(struct pci_dev *pdev,				const struct pci_device_id *ent){	struct net_device *dev, *dev1;	struct skge_hw *hw;	int err, using_dac = 0;	if ((err = pci_enable_device(pdev))) {		printk(KERN_ERR PFX "%s cannot enable PCI device\n",		       pci_name(pdev));		goto err_out;	}	if ((err = pci_request_regions(pdev, DRV_NAME))) {		printk(KERN_ERR PFX "%s cannot obtain PCI resources\n",		       pci_name(pdev));		goto err_out_disable_pdev;	}	pci_set_master(pdev);	if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)))		using_dac = 1;	else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {		printk(KERN_ERR PFX "%s no usable DMA configuration\n",		       pci_name(pdev));		goto err_out_free_regions;	}#ifdef __BIG_ENDIAN	/* byte swap decriptors in hardware */	{		u32 reg;		pci_read_config_dword(pdev, PCI_DEV_REG2, &reg);		reg |= PCI_REV_DESC;		pci_write_config_dword(pdev, PCI_DEV_REG2, reg);	}#endif	err = -ENOMEM;	hw = kmalloc(sizeof(*hw), GFP_KERNEL);	if (!hw) {		printk(KERN_ERR PFX "%s: cannot allocate hardware struct\n",		       pci_name(pdev));		goto err_out_free_regions;	}	memset(hw, 0, sizeof(*hw));	hw->pdev = pdev;	spin_lock_init(&hw->phy_lock);	tasklet_init(&hw->ext_tasklet, skge_extirq, (unsigned long) hw);	hw->regs = ioremap_nocache(pci_resource_start(pdev, 0), 0x4000);	if (!hw->regs) {		printk(KERN_ERR PFX "%s: cannot map device registers\n",		       pci_name(pdev));		goto err_out_free_hw;	}	if ((err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw))) {		printk(KERN_ERR PFX "%s: cannot assign irq %d\n",		       pci_name(pdev), pdev->irq);		goto err_out_iounmap;	}	pci_set_drvdata(pdev, hw);	err = skge_reset(hw);	if (err)		goto err_out_free_irq;	printk(KERN_INFO PFX "addr 0x%lx irq %d chip %s rev %d\n",	       pci_resource_start(pdev, 0), pdev->irq,	       skge_board_name(hw), chip_rev(hw));	if ((dev = skge_devinit(hw, 0)) == NULL)		goto err_out_led_off;	if (using_dac)		dev->features |= NETIF_F_HIGHDMA;	if ((err = register_netdev(dev))) {		printk(KERN_ERR PFX "%s: cannot register net device\n",		       pci_name(pdev));		goto err_out_free_netdev;	}	skge_show_addr(dev);	if (isdualport(hw) && (dev1 = skge_devinit(hw, 1))) {		if (using_dac)			dev1->features |= NETIF_F_HIGHDMA;		if (register_netdev(dev1) == 0)			skge_show_addr(dev1);		else {			/* Failure to register second port need not be fatal */			printk(KERN_WARNING PFX "register of second port failed\n");			hw->dev[1] = NULL;			free_netdev(dev1);		}	}	return 0;err_out_free_netdev:	free_netdev(dev);err_out_led_off:	skge_write16(hw, B0_LED, LED_STAT_OFF);err_out_free_irq:	free_irq(pdev->irq, hw);err_out_iounmap:	iounmap(hw->regs);err_out_free_hw:	kfree(hw);err_out_free_regions:	pci_release_regions(pdev);err_out_disable_pdev:	pci_disable_device(pdev);	pci_set_drvdata(pdev, NULL);err_out:	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/981d0377d94f4d611f1c73429c0c32b35b56855f/skge.c/clean/drivers/net/skge.c