int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 
static int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 
int __devinit xl_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {	struct net_device *dev ; 	struct xl_private *xl_priv ; 	static int card_no = -1 ;	int i ; 	card_no++ ; 	if (pci_enable_device(pdev)) { 		return -ENODEV ; 	} 	pci_set_master(pdev);	if ((i = pci_request_regions(pdev,"3c359"))) { 		return i ; 	} ; 	/* 	 * Allowing init_trdev to allocate the dev->priv structure will align xl_private   	 * on a 32 bytes boundary which we need for the rx/tx descriptors	 */	dev = alloc_trdev(sizeof(struct xl_private)) ; 	if (!dev) { 		pci_release_regions(pdev) ; 		return -ENOMEM ; 	} 	xl_priv = dev->priv ; #if XL_DEBUG  	printk("pci_device: %p, dev:%p, dev->priv: %p, ba[0]: %10x, ba[1]:%10x\n", 		pdev, dev, dev->priv, (unsigned int)pdev->resource[0].start, (unsigned int)pdev->resource[1].start) ;  #endif 	dev->irq=pdev->irq;	dev->base_addr=pci_resource_start(pdev,0) ; 	xl_priv->xl_card_name = pci_name(pdev);	xl_priv->xl_mmio=ioremap(pci_resource_start(pdev,1), XL_IO_SPACE);	xl_priv->pdev = pdev ; 			if ((pkt_buf_sz[card_no] < 100) || (pkt_buf_sz[card_no] > 18000) )		xl_priv->pkt_buf_sz = PKT_BUF_SZ ; 	else		xl_priv->pkt_buf_sz = pkt_buf_sz[card_no] ; 	dev->mtu = xl_priv->pkt_buf_sz - TR_HLEN ; 	xl_priv->xl_ring_speed = ringspeed[card_no] ; 	xl_priv->xl_message_level = message_level[card_no] ; 	xl_priv->xl_functional_addr[0] = xl_priv->xl_functional_addr[1] = xl_priv->xl_functional_addr[2] = xl_priv->xl_functional_addr[3] = 0 ; 	xl_priv->xl_copy_all_options = 0 ; 			if((i = xl_init(dev))) {		iounmap(xl_priv->xl_mmio) ; 		free_netdev(dev) ; 		pci_release_regions(pdev) ; 		return i ; 	}					dev->open=&xl_open;	dev->hard_start_xmit=&xl_xmit;	dev->change_mtu=&xl_change_mtu;	dev->stop=&xl_close;	dev->do_ioctl=NULL;	dev->set_multicast_list=&xl_set_rx_mode;	dev->get_stats=&xl_get_stats ;	dev->set_mac_address=&xl_set_mac_address ; 	SET_MODULE_OWNER(dev); 	SET_NETDEV_DEV(dev, &pdev->dev);	pci_set_drvdata(pdev,dev) ; 	if ((i = register_netdev(dev))) { 		printk(KERN_ERR "3C359, register netdev failed\n") ;  		pci_set_drvdata(pdev,NULL) ; 		iounmap(xl_priv->xl_mmio) ; 		free_netdev(dev) ; 		pci_release_regions(pdev) ; 		return i ; 	}   	printk(KERN_INFO "3C359: %s registered as: %s\n",xl_priv->xl_card_name,dev->name) ; 	return 0; }
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/de70b4c87b8f1d484cf533536c0c6ce2e05101cf/3c359.c/buggy/drivers/net/tokenring/3c359.c