rc = pci_set_dma_mask(pdev, 0xFFFFFFFF);
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
static int __devinit TLan_probe1(struct pci_dev *pdev, 				long ioaddr, int irq, int rev, const struct pci_device_id *ent ){	struct net_device  *dev;	TLanPrivateInfo    *priv;	u8		   pci_rev;	u16		   device_id;	int		   reg, rc = -ENODEV;	if (pdev) {		rc = pci_enable_device(pdev);		if (rc)			return rc;		rc = pci_request_regions(pdev, TLanSignature);		if (rc) {			printk(KERN_ERR "TLAN: Could not reserve IO regions\n");			goto err_out;		}	}	dev = alloc_etherdev(sizeof(TLanPrivateInfo));	if (dev == NULL) {		printk(KERN_ERR "TLAN: Could not allocate memory for device.\n");		rc = -ENOMEM;		goto err_out_regions;	}	SET_MODULE_OWNER(dev);	SET_NETDEV_DEV(dev, &pdev->dev);		priv = netdev_priv(dev);	priv->pciDev = pdev;		/* Is this a PCI device? */	if (pdev) {		u32 		   pci_io_base = 0;		priv->adapter = &board_info[ent->driver_data];		rc = pci_set_dma_mask(pdev, 0xFFFFFFFF);		if (rc) {			printk(KERN_ERR "TLAN: No suitable PCI mapping available.\n");			goto err_out_free_dev;		}		pci_read_config_byte ( pdev, PCI_REVISION_ID, &pci_rev);		for ( reg= 0; reg <= 5; reg ++ ) {			if (pci_resource_flags(pdev, reg) & IORESOURCE_IO) {				pci_io_base = pci_resource_start(pdev, reg);				TLAN_DBG( TLAN_DEBUG_GNRL, "IO mapping is available at %x.\n",						pci_io_base);				break;			}		}		if (!pci_io_base) {			printk(KERN_ERR "TLAN: No IO mappings available\n");			rc = -EIO;			goto err_out_free_dev;		}				dev->base_addr = pci_io_base;		dev->irq = pdev->irq;		priv->adapterRev = pci_rev; 		pci_set_master(pdev);		pci_set_drvdata(pdev, dev);	} else	{     /* EISA card */		/* This is a hack. We need to know which board structure		 * is suited for this adapter */		device_id = inw(ioaddr + EISA_ID2);		priv->is_eisa = 1;		if (device_id == 0x20F1) {			priv->adapter = &board_info[13]; 	/* NetFlex-3/E */			priv->adapterRev = 23;			/* TLAN 2.3 */		} else {			priv->adapter = &board_info[14];			priv->adapterRev = 10;			/* TLAN 1.0 */		}		dev->base_addr = ioaddr;		dev->irq = irq;	}	/* Kernel parameters */	if (dev->mem_start) {		priv->aui    = dev->mem_start & 0x01;		priv->duplex = ((dev->mem_start & 0x06) == 0x06) ? 0 : (dev->mem_start & 0x06) >> 1;		priv->speed  = ((dev->mem_start & 0x18) == 0x18) ? 0 : (dev->mem_start & 0x18) >> 3;			if (priv->speed == 0x1) {			priv->speed = TLAN_SPEED_10;		} else if (priv->speed == 0x2) {			priv->speed = TLAN_SPEED_100;		}		debug = priv->debug = dev->mem_end;	} else {		priv->aui    = aui[boards_found];		priv->speed  = speed[boards_found];		priv->duplex = duplex[boards_found];		priv->debug = debug;	}		/* This will be used when we get an adapter error from	 * within our irq handler */	INIT_WORK(&priv->tlan_tqueue, (void *)(void*)TLan_tx_timeout, dev);	spin_lock_init(&priv->lock);		rc = TLan_Init(dev);	if (rc) {		printk(KERN_ERR "TLAN: Could not set up device.\n");		goto err_out_free_dev;	}	rc = register_netdev(dev);	if (rc) {		printk(KERN_ERR "TLAN: Could not register device.\n");		goto err_out_uninit;	}		TLanDevicesInstalled++;	boards_found++;		/* pdev is NULL if this is an EISA device */	if (pdev)		tlan_have_pci++;	else {		priv->nextDevice = TLan_Eisa_Devices;		TLan_Eisa_Devices = dev;		tlan_have_eisa++;	}		printk(KERN_INFO "TLAN: %s irq=%2d, io=%04x, %s, Rev. %d\n",			dev->name,			(int) dev->irq,			(int) dev->base_addr,			priv->adapter->deviceLabel,			priv->adapterRev);	return 0;err_out_uninit:	pci_free_consistent(priv->pciDev, priv->dmaSize, priv->dmaStorage,			    priv->dmaStorageDMA );err_out_free_dev:	free_netdev(dev);err_out_regions:#ifdef CONFIG_PCI	if (pdev)		pci_release_regions(pdev);#endiferr_out:	if (pdev)		pci_disable_device(pdev);	return rc;}