rc = pci_set_dma_mask(pdev, 0xFFFFFFFFULL); 
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 
static int __devinit streamer_init_one(struct pci_dev *pdev,				       const struct pci_device_id *ent){	struct net_device *dev;	struct streamer_private *streamer_priv;	unsigned long pio_start, pio_end, pio_flags, pio_len;	unsigned long mmio_start, mmio_end, mmio_flags, mmio_len;	int rc = 0;	static int card_no=-1;	u16 pcr;#if STREAMER_DEBUG	printk("lanstreamer::streamer_init_one, entry pdev %p\n",pdev);#endif	card_no++;	dev = alloc_trdev(sizeof(*streamer_priv));	if (dev==NULL) {		printk(KERN_ERR "lanstreamer: out of memory.\n");		return -ENOMEM;	}	SET_MODULE_OWNER(dev);	streamer_priv = dev->priv;#if STREAMER_NETWORK_MONITOR#ifdef CONFIG_PROC_FS	if (!dev_streamer)		create_proc_read_entry("net/streamer_tr", 0, 0,					streamer_proc_info, NULL); 	streamer_priv->next = dev_streamer;	dev_streamer = streamer_priv;#endif#endif	rc = pci_set_dma_mask(pdev, 0xFFFFFFFFULL);	if (rc) {		printk(KERN_ERR "%s: No suitable PCI mapping available.\n",				dev->name);		rc = -ENODEV;		goto err_out;	}	rc = pci_enable_device(pdev);	if (rc) {		printk(KERN_ERR "lanstreamer: unable to enable pci device\n");		rc=-EIO;		goto err_out;	}	pci_set_master(pdev);	rc = pci_set_mwi(pdev);	if (rc) {		printk(KERN_ERR "lanstreamer: unable to enable MWI on pci device\n");		goto err_out_disable;	}	pio_start = pci_resource_start(pdev, 0);	pio_end = pci_resource_end(pdev, 0);	pio_flags = pci_resource_flags(pdev, 0);	pio_len = pci_resource_len(pdev, 0);	mmio_start = pci_resource_start(pdev, 1);	mmio_end = pci_resource_end(pdev, 1);	mmio_flags = pci_resource_flags(pdev, 1);	mmio_len = pci_resource_len(pdev, 1);#if STREAMER_DEBUG	printk("lanstreamer: pio_start %x pio_end %x pio_len %x pio_flags %x\n",		pio_start, pio_end, pio_len, pio_flags);	printk("lanstreamer: mmio_start %x mmio_end %x mmio_len %x mmio_flags %x\n",		mmio_start, mmio_end, mmio_flags, mmio_len);#endif	if (!request_region(pio_start, pio_len, "lanstreamer")) {		printk(KERN_ERR "lanstreamer: unable to get pci io addr %lx\n",			pio_start);		rc= -EBUSY;		goto err_out_mwi;	}	if (!request_mem_region(mmio_start, mmio_len, "lanstreamer")) {		printk(KERN_ERR "lanstreamer: unable to get pci mmio addr %lx\n",			mmio_start);		rc= -EBUSY;		goto err_out_free_pio;	}	streamer_priv->streamer_mmio=ioremap(mmio_start, mmio_len);	if (streamer_priv->streamer_mmio == NULL) {		printk(KERN_ERR "lanstreamer: unable to remap MMIO %lx\n",			mmio_start);		rc= -EIO;		goto err_out_free_mmio;	}	init_waitqueue_head(&streamer_priv->srb_wait);	init_waitqueue_head(&streamer_priv->trb_wait);	dev->open = &streamer_open;	dev->hard_start_xmit = &streamer_xmit;	dev->change_mtu = &streamer_change_mtu;	dev->stop = &streamer_close;#if STREAMER_IOCTL	dev->do_ioctl = &streamer_ioctl;#else	dev->do_ioctl = NULL;#endif	dev->set_multicast_list = &streamer_set_rx_mode;	dev->get_stats = &streamer_get_stats;	dev->set_mac_address = &streamer_set_mac_address;	dev->irq = pdev->irq;	dev->base_addr=pio_start;	SET_NETDEV_DEV(dev, &pdev->dev);	streamer_priv->streamer_card_name = (char *)pdev->resource[0].name;	streamer_priv->pci_dev = pdev;	if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000))		streamer_priv->pkt_buf_sz = PKT_BUF_SZ;	else		streamer_priv->pkt_buf_sz = pkt_buf_sz[card_no];	streamer_priv->streamer_ring_speed = ringspeed[card_no];	streamer_priv->streamer_message_level = message_level[card_no];	pci_set_drvdata(pdev, dev);	spin_lock_init(&streamer_priv->streamer_lock);	pci_read_config_word (pdev, PCI_COMMAND, &pcr);	pcr |= PCI_COMMAND_SERR;	pci_write_config_word (pdev, PCI_COMMAND, pcr);	printk("%s \n", version);	printk("%s: %s. I/O at %hx, MMIO at %p, using irq %d\n",dev->name,		streamer_priv->streamer_card_name,		(unsigned int) dev->base_addr,		streamer_priv->streamer_mmio, 		dev->irq);	if (streamer_reset(dev))		goto err_out_unmap;	rc = register_netdev(dev);	if (rc)		goto err_out_unmap;	return 0;err_out_unmap:	iounmap(streamer_priv->streamer_mmio);err_out_free_mmio:	release_mem_region(mmio_start, mmio_len);err_out_free_pio:	release_region(pio_start, pio_len);err_out_mwi:	pci_clear_mwi(pdev);err_out_disable:	pci_disable_device(pdev);err_out:	free_netdev(dev);#if STREAMER_DEBUG	printk("lanstreamer: Exit error %x\n",rc);#endif	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1e7f0bd8c8f2d0496ad338be5e69ff4395d77da4/lanstreamer.c/clean/drivers/net/tokenring/lanstreamer.c