struct ibmveth_adapter *adapter; 
struct ibmveth_adapter *adapter = NULL; 
static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id){	int rc;	struct net_device *netdev;	struct ibmveth_adapter *adapter;	unsigned char *mac_addr_p;	unsigned int *mcastFilterSize_p;	ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n", 					dev->unit_address);	mac_addr_p = (unsigned char *) vio_get_attribute(dev, VETH_MAC_ADDR, 0);	if(!mac_addr_p) {		printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find VETH_MAC_ADDR "				"attribute\n", __FILE__, __LINE__);		return 0;	}		mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0);	if(!mcastFilterSize_p) {		printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find "				"VETH_MCAST_FILTER_SIZE attribute\n",				__FILE__, __LINE__);		return 0;	}		netdev = alloc_etherdev(sizeof(struct ibmveth_adapter));	if(!netdev)		return -ENOMEM;	SET_MODULE_OWNER(netdev);	adapter = netdev->priv;	memset(adapter, 0, sizeof(adapter));	dev->dev.driver_data = netdev;	adapter->vdev = dev;	adapter->netdev = netdev;	adapter->mcastFilterSize= *mcastFilterSize_p;		/* 	Some older boxes running PHYP non-natively have an OF that		returns a 8-byte local-mac-address field (and the first 		2 bytes have to be ignored) while newer boxes' OF return		a 6-byte field. Note that IEEE 1275 specifies that 		local-mac-address must be a 6-byte field.		The RPA doc specifies that the first byte must be 10b, so 		we'll just look for it to solve this 8 vs. 6 byte field issue */	if ((*mac_addr_p & 0x3) != 0x02)		mac_addr_p += 2;	adapter->mac_addr = 0;	memcpy(&adapter->mac_addr, mac_addr_p, 6);	adapter->liobn = dev->iommu_table->it_index;		netdev->irq = dev->irq;	netdev->open               = ibmveth_open;	netdev->poll               = ibmveth_poll;	netdev->weight             = 16;	netdev->stop               = ibmveth_close;	netdev->hard_start_xmit    = ibmveth_start_xmit;	netdev->get_stats          = ibmveth_get_stats;	netdev->set_multicast_list = ibmveth_set_multicast_list;	netdev->do_ioctl           = ibmveth_ioctl;	netdev->ethtool_ops           = &netdev_ethtool_ops;	netdev->change_mtu         = ibmveth_change_mtu;	SET_NETDEV_DEV(netdev, &dev->dev);	memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);	ibmveth_init_buffer_pool(&adapter->rx_buff_pool[0], 0, IbmVethPool0DftCnt, IbmVethPool0DftSize);	ibmveth_init_buffer_pool(&adapter->rx_buff_pool[1], 1, IbmVethPool1DftCnt, IbmVethPool1DftSize);	ibmveth_init_buffer_pool(&adapter->rx_buff_pool[2], 2, IbmVethPool2DftCnt, IbmVethPool2DftSize);	ibmveth_debug_printk("adapter @ 0x%p\n", adapter);	INIT_WORK(&adapter->replenish_task, (void*)ibmveth_replenish_task, (void*)adapter);	adapter->buffer_list_dma = DMA_ERROR_CODE;	adapter->filter_list_dma = DMA_ERROR_CODE;	adapter->rx_queue.queue_dma = DMA_ERROR_CODE;	atomic_set(&adapter->not_replenishing, 1);	ibmveth_debug_printk("registering netdev...\n");	rc = register_netdev(netdev);	if(rc) {		ibmveth_debug_printk("failed to register netdev rc=%d\n", rc);		free_netdev(netdev);		return rc;	}	ibmveth_debug_printk("registered\n");	ibmveth_proc_register_adapter(adapter);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b6d35182fe62e57d368062adcc880ca35119d88e/ibmveth.c/clean/drivers/net/ibmveth.c