free_page((unsigned long) sp); 
free_page((unsigned long) sp->srings); 
static int sgiseeq_init(struct hpc3_regs* regs, int irq){	struct sgiseeq_init_block *sr;	struct sgiseeq_private *sp;	struct net_device *dev;	int err, i;	dev = alloc_etherdev(sizeof (struct sgiseeq_private));	if (!dev) {		printk(KERN_ERR "Sgiseeq: Etherdev alloc failed, aborting.\n");		err = -ENOMEM;		goto err_out;	}	sp = netdev_priv(dev);	/* Make private data page aligned */	sr = (struct sgiseeq_init_block *) get_zeroed_page(GFP_KERNEL);	if (!sr) {		printk(KERN_ERR "Sgiseeq: Page alloc failed, aborting.\n");		err = -ENOMEM;		goto err_out_free_dev;	}	sp->srings = sr;#define EADDR_NVOFS     250	for (i = 0; i < 3; i++) {		unsigned short tmp = ip22_nvram_read(EADDR_NVOFS / 2 + i);		dev->dev_addr[2 * i]     = tmp >> 8;		dev->dev_addr[2 * i + 1] = tmp & 0xff;	}#ifdef DEBUG	gpriv = sp;	gdev = dev;#endif	sp->sregs = (struct sgiseeq_regs *) &hpc3c0->eth_ext[0];	sp->hregs = &hpc3c0->ethregs;	sp->name = sgiseeqstr;	sp->mode = SEEQ_RCMD_RBCAST;	sp->rx_desc = (struct sgiseeq_rx_desc *)	              CKSEG1ADDR(ALIGNED(&sp->srings->rxvector[0]));	dma_cache_wback_inv((unsigned long)&sp->srings->rxvector,	                    sizeof(sp->srings->rxvector));	sp->tx_desc = (struct sgiseeq_tx_desc *)	              CKSEG1ADDR(ALIGNED(&sp->srings->txvector[0]));	dma_cache_wback_inv((unsigned long)&sp->srings->txvector,	                    sizeof(sp->srings->txvector));	/* A couple calculations now, saves many cycles later. */	setup_rx_ring(sp->rx_desc, SEEQ_RX_BUFFERS);	setup_tx_ring(sp->tx_desc, SEEQ_TX_BUFFERS);	/* Reset the chip. */	hpc3_eth_reset(sp->hregs);	sp->is_edlc = !(sp->sregs->rw.rregs.collision_tx[0] & 0xff);	if (sp->is_edlc)		sp->control = SEEQ_CTRL_XCNT | SEEQ_CTRL_ACCNT |			      SEEQ_CTRL_SFLAG | SEEQ_CTRL_ESHORT |			      SEEQ_CTRL_ENCARR;	dev->open		= sgiseeq_open;	dev->stop		= sgiseeq_close;	dev->hard_start_xmit	= sgiseeq_start_xmit;	dev->tx_timeout		= timeout;	dev->watchdog_timeo	= (200 * HZ) / 1000;	dev->get_stats		= sgiseeq_get_stats;	dev->set_multicast_list	= sgiseeq_set_multicast;	dev->set_mac_address	= sgiseeq_set_mac_address;	dev->irq		= irq;	if (register_netdev(dev)) {		printk(KERN_ERR "Sgiseeq: Cannot register net device, "		       "aborting.\n");		err = -ENODEV;		goto err_out_free_page;	}	printk(KERN_INFO "%s: SGI Seeq8003 ", dev->name);	for (i = 0; i < 6; i++)		printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');	sp->next_module = root_sgiseeq_dev;	root_sgiseeq_dev = dev;	return 0;err_out_free_page:	free_page((unsigned long) sp);err_out_free_dev:	kfree(dev);err_out:	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2891439e7378e35534d7eb32f77671dc4d61db4c/sgiseeq.c/buggy/drivers/net/sgiseeq.c