if (pci_set_dma_mask(pdev, (u64) 0xffffffffffffffffULL) && pci_set_dma_mask(pdev, (u64) 0xffffffff)) 
if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) && pci_set_dma_mask(pdev, DMA_32BIT_MASK)) 
static int __devinit skge_probe_one(struct pci_dev *pdev,		const struct pci_device_id *ent){	SK_AC			*pAC;	DEV_NET			*pNet = NULL;	struct net_device	*dev = NULL;	static int boards_found = 0;	int error = -ENODEV;	if (pci_enable_device(pdev))		goto out; 	/* Configure DMA attributes. */	if (pci_set_dma_mask(pdev, (u64) 0xffffffffffffffffULL) &&	    pci_set_dma_mask(pdev, (u64) 0xffffffff))		goto out_disable_device;	if ((dev = alloc_etherdev(sizeof(DEV_NET))) == NULL) {		printk(KERN_ERR "Unable to allocate etherdev "		       "structure!\n");		goto out_disable_device;	}	pNet = netdev_priv(dev);	pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL);	if (!pNet->pAC) {		printk(KERN_ERR "Unable to allocate adapter "		       "structure!\n");		goto out_free_netdev;	}	memset(pNet->pAC, 0, sizeof(SK_AC));	pAC = pNet->pAC;	pAC->PciDev = pdev;	pAC->PciDevId = pdev->device;	pAC->dev[0] = dev;	pAC->dev[1] = dev;	sprintf(pAC->Name, "SysKonnect SK-98xx");	pAC->CheckQueue = SK_FALSE;	pNet->Mtu = 1500;	pNet->Up = 0;	dev->irq = pdev->irq;	error = SkGeInitPCI(pAC);	if (error) {		printk("SKGE: PCI setup failed: %i\n", error);		goto out_free_netdev;	}	SET_MODULE_OWNER(dev);	dev->open =		&SkGeOpen;	dev->stop =		&SkGeClose;	dev->hard_start_xmit =	&SkGeXmit;	dev->get_stats =	&SkGeStats;	dev->set_multicast_list = &SkGeSetRxMode;	dev->set_mac_address =	&SkGeSetMacAddr;	dev->do_ioctl =		&SkGeIoctl;	dev->change_mtu =	&SkGeChangeMtu;#ifdef CONFIG_NET_POLL_CONTROLLER	dev->poll_controller =	&SkGePollController;#endif	SET_NETDEV_DEV(dev, &pdev->dev);	SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);#ifdef SK_ZEROCOPY#ifdef USE_SK_TX_CHECKSUM	if (pAC->ChipsetType) {		/* Use only if yukon hardware */		/* SK and ZEROCOPY - fly baby... */		dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;	}#endif#endif	pAC->Index = boards_found++;	if (SkGeBoardInit(dev, pAC))		goto out_free_netdev;	/* Register net device */	if (register_netdev(dev)) {		printk(KERN_ERR "SKGE: Could not register device.\n");		goto out_free_resources;	}	/* Print adapter specific string from vpd */	ProductStr(pAC);	printk("%s: %s\n", dev->name, pAC->DeviceStr);	/* Print configuration settings */	printk("      PrefPort:%c  RlmtMode:%s\n",		'A' + pAC->Rlmt.Net[0].Port[pAC->Rlmt.Net[0].PrefPort]->PortNumber,		(pAC->RlmtMode==0)  ? "Check Link State" :		((pAC->RlmtMode==1) ? "Check Link State" :		((pAC->RlmtMode==3) ? "Check Local Port" :		((pAC->RlmtMode==7) ? "Check Segmentation" :		((pAC->RlmtMode==17) ? "Dual Check Link State" :"Error")))));	SkGeYellowLED(pAC, pAC->IoBase, 1);	memcpy(&dev->dev_addr, &pAC->Addr.Net[0].CurrentMacAddress, 6);	SkGeProcCreate(dev);	pNet->PortNr = 0;	pNet->NetNr  = 0;	boards_found++;	/* More then one port found */	if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) {		if ((dev = alloc_etherdev(sizeof(DEV_NET))) == 0) {			printk(KERN_ERR "Unable to allocate etherdev "				"structure!\n");			goto out;		}		pAC->dev[1]   = dev;		pNet          = netdev_priv(dev);		pNet->PortNr  = 1;		pNet->NetNr   = 1;		pNet->pAC     = pAC;		pNet->Mtu     = 1500;		pNet->Up      = 0;		dev->open               = &SkGeOpen;		dev->stop               = &SkGeClose;		dev->hard_start_xmit    = &SkGeXmit;		dev->get_stats          = &SkGeStats;		dev->set_multicast_list = &SkGeSetRxMode;		dev->set_mac_address    = &SkGeSetMacAddr;		dev->do_ioctl           = &SkGeIoctl;		dev->change_mtu         = &SkGeChangeMtu;		SET_NETDEV_DEV(dev, &pdev->dev);		SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);#ifdef SK_ZEROCOPY#ifdef USE_SK_TX_CHECKSUM		if (pAC->ChipsetType) {			/* SG and ZEROCOPY - fly baby... */			dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;		}#endif#endif		if (register_netdev(dev)) {			printk(KERN_ERR "SKGE: Could not register device.\n");			free_netdev(dev);			pAC->dev[1] = pAC->dev[0];		} else {			SkGeProcCreate(dev);			memcpy(&dev->dev_addr,					&pAC->Addr.Net[1].CurrentMacAddress, 6);				printk("%s: %s\n", dev->name, pAC->DeviceStr);			printk("      PrefPort:B  RlmtMode:Dual Check Link State\n");		}	}	/* Save the hardware revision */	pAC->HWRevision = (((pAC->GIni.GIPciHwRev >> 4) & 0x0F)*10) +		(pAC->GIni.GIPciHwRev & 0x0F);	/* Set driver globals */	pAC->Pnmi.pDriverFileName    = DRIVER_FILE_NAME;	pAC->Pnmi.pDriverReleaseDate = DRIVER_REL_DATE;	memset(&pAC->PnmiBackup, 0, sizeof(SK_PNMI_STRUCT_DATA));	memcpy(&pAC->PnmiBackup, &pAC->PnmiStruct, sizeof(SK_PNMI_STRUCT_DATA));	pci_set_drvdata(pdev, dev);	return 0; out_free_resources:	FreeResources(dev); out_free_netdev:	free_netdev(dev); out_disable_device:	pci_disable_device(pdev); out:	return error;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e7f0bd8c8f2d0496ad338be5e69ff4395d77da4/skge.c/clean/drivers/net/sk98lin/skge.c