if((err = pci_set_dma_mask(pdev, 0xFFFFFFFFULL))) { 
if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 
static int __devinit e100_probe(struct pci_dev *pdev,	const struct pci_device_id *ent){	struct net_device *netdev;	struct nic *nic;	int err;	if(!(netdev = alloc_etherdev(sizeof(struct nic)))) {		if(((1 << debug) - 1) & NETIF_MSG_PROBE)			printk(KERN_ERR PFX "Etherdev alloc failed, abort.\n");		return -ENOMEM;	}	netdev->open = e100_open;	netdev->stop = e100_close;	netdev->hard_start_xmit = e100_xmit_frame;	netdev->get_stats = e100_get_stats;	netdev->set_multicast_list = e100_set_multicast_list;	netdev->set_mac_address = e100_set_mac_address;	netdev->change_mtu = e100_change_mtu;	netdev->do_ioctl = e100_do_ioctl;	SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops);	netdev->tx_timeout = e100_tx_timeout;	netdev->watchdog_timeo = E100_WATCHDOG_PERIOD;	netdev->poll = e100_poll;	netdev->weight = E100_NAPI_WEIGHT;#ifdef CONFIG_NET_POLL_CONTROLLER	netdev->poll_controller = e100_netpoll;#endif	strcpy(netdev->name, pci_name(pdev));	nic = netdev_priv(netdev);	nic->netdev = netdev;	nic->pdev = pdev;	nic->msg_enable = (1 << debug) - 1;	pci_set_drvdata(pdev, netdev);	if((err = pci_enable_device(pdev))) {		DPRINTK(PROBE, ERR, "Cannot enable PCI device, aborting.\n");		goto err_out_free_dev;	}	if(!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {		DPRINTK(PROBE, ERR, "Cannot find proper PCI device "			"base address, aborting.\n");		err = -ENODEV;		goto err_out_disable_pdev;	}	if((err = pci_request_regions(pdev, DRV_NAME))) {		DPRINTK(PROBE, ERR, "Cannot obtain PCI resources, aborting.\n");		goto err_out_disable_pdev;	}	if((err = pci_set_dma_mask(pdev, 0xFFFFFFFFULL))) {		DPRINTK(PROBE, ERR, "No usable DMA configuration, aborting.\n");		goto err_out_free_res;	}	SET_MODULE_OWNER(netdev);	SET_NETDEV_DEV(netdev, &pdev->dev);	nic->csr = ioremap(pci_resource_start(pdev, 0), sizeof(struct csr));	if(!nic->csr) {		DPRINTK(PROBE, ERR, "Cannot map device registers, aborting.\n");		err = -ENOMEM;		goto err_out_free_res;	}	if(ent->driver_data)		nic->flags |= ich;	else		nic->flags &= ~ich;	e100_get_defaults(nic);	/* locks must be initialized before calling hw_reset */	spin_lock_init(&nic->cb_lock);	spin_lock_init(&nic->cmd_lock);	/* Reset the device before pci_set_master() in case device is in some	 * funky state and has an interrupt pending - hint: we don't have the	 * interrupt handler registered yet. */	e100_hw_reset(nic);	pci_set_master(pdev);	init_timer(&nic->watchdog);	nic->watchdog.function = e100_watchdog;	nic->watchdog.data = (unsigned long)nic;	init_timer(&nic->blink_timer);	nic->blink_timer.function = e100_blink_led;	nic->blink_timer.data = (unsigned long)nic;	INIT_WORK(&nic->tx_timeout_task,		(void (*)(void *))e100_tx_timeout_task, netdev);	if((err = e100_alloc(nic))) {		DPRINTK(PROBE, ERR, "Cannot alloc driver memory, aborting.\n");		goto err_out_iounmap;	}	e100_phy_init(nic);	if((err = e100_eeprom_load(nic)))		goto err_out_free;	memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN);	if(!is_valid_ether_addr(netdev->dev_addr)) {		DPRINTK(PROBE, ERR, "Invalid MAC address from "			"EEPROM, aborting.\n");		err = -EAGAIN;		goto err_out_free;	}	/* Wol magic packet can be enabled from eeprom */	if((nic->mac >= mac_82558_D101_A4) &&	   (nic->eeprom[eeprom_id] & eeprom_id_wol))		nic->flags |= wol_magic;	/* ack any pending wake events, disable PME */	pci_enable_wake(pdev, 0, 0);	strcpy(netdev->name, "eth%d");	if((err = register_netdev(netdev))) {		DPRINTK(PROBE, ERR, "Cannot register net device, aborting.\n");		goto err_out_free;	}	DPRINTK(PROBE, INFO, "addr 0x%lx, irq %d, "		"MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n",		pci_resource_start(pdev, 0), pdev->irq,		netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],		netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]);	return 0;err_out_free:	e100_free(nic);err_out_iounmap:	iounmap(nic->csr);err_out_free_res:	pci_release_regions(pdev);err_out_disable_pdev:	pci_disable_device(pdev);err_out_free_dev:	pci_set_drvdata(pdev, NULL);	free_netdev(netdev);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e7f0bd8c8f2d0496ad338be5e69ff4395d77da4/e100.c/buggy/drivers/net/e100.c