eh->base = eh->memc + data->ns8390_offset; dev->base_addr = (unsigned long)eh->base; 
dev->base_addr = (unsigned long)eh->memc + data->ns8390_offset; 
etherh_probe(struct expansion_card *ec, const struct ecard_id *id){	const struct etherh_data *data = id->data;	struct ei_device *ei_local;	struct net_device *dev;	struct etherh_priv *eh;	int i, ret;	etherh_banner();	ret = ecard_request_resources(ec);	if (ret)		goto out;	dev = __alloc_ei_netdev(sizeof(struct etherh_priv));	if (!dev) {		ret = -ENOMEM;		goto release;	}	SET_MODULE_OWNER(dev);	SET_NETDEV_DEV(dev, &ec->dev);	dev->open		= etherh_open;	dev->stop		= etherh_close;	dev->set_config		= etherh_set_config;	dev->irq		= ec->irq;	dev->ethtool_ops	= &etherh_ethtool_ops;	if (data->supported & SUPPORTED_Autoneg)		dev->flags |= IFF_AUTOMEDIA;	if (data->supported & SUPPORTED_TP) {		dev->flags |= IFF_PORTSEL;		dev->if_port = IF_PORT_10BASET;	} else if (data->supported & SUPPORTED_BNC) {		dev->flags |= IFF_PORTSEL;		dev->if_port = IF_PORT_10BASE2;	} else		dev->if_port = IF_PORT_UNKNOWN;	eh = etherh_priv(dev);	eh->supported		= data->supported;	eh->ctrl		= 0;	eh->id			= ec->cid.product;	eh->memc		= ioremap(ecard_resource_start(ec, ECARD_RES_MEMC), PAGE_SIZE);	if (!eh->memc) {		ret = -ENOMEM;		goto free;	}	eh->ctrl_port = eh->memc;	if (data->ctrl_ioc) {		eh->ioc_fast = ioremap(ecard_resource_start(ec, ECARD_RES_IOCFAST), PAGE_SIZE);		if (!eh->ioc_fast) {			ret = -ENOMEM;			goto free;		}		eh->ctrl_port = eh->ioc_fast;	}	eh->base = eh->memc + data->ns8390_offset;	dev->base_addr = (unsigned long)eh->base;	eh->dma_base = eh->memc + data->dataport_offset;	eh->ctrl_port += data->ctrlport_offset;	/*	 * IRQ and control port handling - only for non-NIC slot cards.	 */	if (ec->slot_no != 8) {		ec->ops		= &etherh_ops;		ec->irq_data	= eh;	} else {		/*		 * If we're in the NIC slot, make sure the IRQ is enabled		 */		etherh_set_ctrl(eh, ETHERH_CP_IE);	}	ei_local = netdev_priv(dev);	spin_lock_init(&ei_local->page_lock);	if (ec->cid.product == PROD_ANT_ETHERM) {		etherm_addr(dev->dev_addr);		ei_local->reg_offset = etherm_regoffsets;	} else {		etherh_addr(dev->dev_addr, ec);		ei_local->reg_offset = etherh_regoffsets;	}	ei_local->name          = dev->name;	ei_local->word16        = 1;	ei_local->tx_start_page = data->tx_start_page;	ei_local->rx_start_page = ei_local->tx_start_page + TX_PAGES;	ei_local->stop_page     = data->stop_page;	ei_local->reset_8390    = etherh_reset;	ei_local->block_input   = etherh_block_input;	ei_local->block_output  = etherh_block_output;	ei_local->get_8390_hdr  = etherh_get_header;	ei_local->interface_num = 0;	etherh_reset(dev);	NS8390_init(dev, 0);	ret = register_netdev(dev);	if (ret)		goto free;	printk(KERN_INFO "%s: %s in slot %d, ",		dev->name, data->name, ec->slot_no);	for (i = 0; i < 6; i++)		printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');	ecard_set_drvdata(ec, dev);	return 0; free:	if (eh->ioc_fast)		iounmap(eh->ioc_fast);	if (eh->memc)		iounmap(eh->memc);	free_netdev(dev); release:	ecard_release_resources(ec); out:	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c7e788766610bdc764d7150e69ace2e0c4196cf0/etherh.c/buggy/drivers/net/arm/etherh.c