ioc3_setup_duplex(ip); 
static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent){	unsigned int sw_physid1, sw_physid2;	struct net_device *dev = NULL;	struct ioc3_private *ip;	struct ioc3 *ioc3;	unsigned long ioc3_base, ioc3_size;	u32 vendor, model, rev;	int err, pci_using_dac;	/* Configure DMA attributes. */	err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);	if (!err) {		pci_using_dac = 1;		err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);		if (err < 0) {			printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "			       "for consistent allocations\n", pci_name(pdev));			goto out;		}	} else {		err = pci_set_dma_mask(pdev, 0xffffffffULL);		if (err) {			printk(KERN_ERR "%s: No usable DMA configuration, "			       "aborting.\n", pci_name(pdev));			goto out;		}		pci_using_dac = 0;	}	if (pci_enable_device(pdev))		return -ENODEV;	dev = alloc_etherdev(sizeof(struct ioc3_private));	if (!dev) {		err = -ENOMEM;		goto out_disable;	}	if (pci_using_dac)		dev->features |= NETIF_F_HIGHDMA;	err = pci_request_regions(pdev, "ioc3");	if (err)		goto out_free;	SET_MODULE_OWNER(dev);	SET_NETDEV_DEV(dev, &pdev->dev);	ip = netdev_priv(dev);	dev->irq = pdev->irq;	ioc3_base = pci_resource_start(pdev, 0);	ioc3_size = pci_resource_len(pdev, 0);	ioc3 = (struct ioc3 *) ioremap(ioc3_base, ioc3_size);	if (!ioc3) {		printk(KERN_CRIT "ioc3eth(%s): ioremap failed, goodbye.\n",		       pci_name(pdev));		err = -ENOMEM;		goto out_res;	}	ip->regs = ioc3;#ifdef CONFIG_SERIAL_8250	ioc3_serial_probe(pdev, ioc3);#endif	spin_lock_init(&ip->ioc3_lock);	init_timer(&ip->ioc3_timer);	ioc3_stop(ip);	ioc3_init(dev);	ip->pdev = pdev;	ip->mii.phy_id_mask = 0x1f;	ip->mii.reg_num_mask = 0x1f;	ip->mii.dev = dev;	ip->mii.mdio_read = ioc3_mdio_read;	ip->mii.mdio_write = ioc3_mdio_write;	ioc3_mii_init(ip);	if (ip->mii.phy_id == -1) {		printk(KERN_CRIT "ioc3-eth(%s): Didn't find a PHY, goodbye.\n",		       pci_name(pdev));		err = -ENODEV;		goto out_stop;	}	ioc3_ssram_disc(ip);	ioc3_get_eaddr(ip);	/* The IOC3-specific entries in the device structure. */	dev->open		= ioc3_open;	dev->hard_start_xmit	= ioc3_start_xmit;	dev->tx_timeout		= ioc3_timeout;	dev->watchdog_timeo	= 5 * HZ;	dev->stop		= ioc3_close;	dev->get_stats		= ioc3_get_stats;	dev->do_ioctl		= ioc3_ioctl;	dev->set_multicast_list	= ioc3_set_multicast_list;	dev->set_mac_address	= ioc3_set_mac_address;	dev->ethtool_ops	= &ioc3_ethtool_ops;#ifdef CONFIG_SGI_IOC3_ETH_HW_TX_CSUM	dev->features		= NETIF_F_IP_CSUM;#endif	ioc3_setup_duplex(ip);	sw_physid1 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID1);	sw_physid2 = ioc3_mdio_read(dev, ip->mii.phy_id, MII_PHYSID2);	err = register_netdev(dev);	if (err)		goto out_stop;	mii_check_media(&ip->mii, 1, 1);	vendor = (sw_physid1 << 12) | (sw_physid2 >> 4);	model  = (sw_physid2 >> 4) & 0x3f;	rev    = sw_physid2 & 0xf;	printk(KERN_INFO "%s: Using PHY %d, vendor 0x%x, model %d, "	       "rev %d.\n", dev->name, ip->mii.phy_id, vendor, model, rev);	printk(KERN_INFO "%s: IOC3 SSRAM has %d kbyte.\n", dev->name,	       ip->emcr & EMCR_BUFSIZ ? 128 : 64);	return 0;out_stop:	ioc3_stop(ip);	ioc3_free_rings(ip);out_res:	pci_release_regions(pdev);out_free:	free_netdev(dev);out_disable:	/*	 * We should call pci_disable_device(pdev); here if the IOC3 wasn't	 * such a weird device ...	 */out:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/852ea22ab24df4c64c0211c3b6d6358eb0e759f9/ioc3-eth.c/clean/drivers/net/ioc3-eth.c