void *etraxfs_eth_init(NICInfo *nd, CPUState *env, 

		       qemu_irq *irq, target_phys_addr_t base, int phyaddr)

{

	struct etraxfs_dma_client *dma = NULL;	

	struct fs_eth *eth = NULL;



	qemu_check_nic_model(nd, "fseth");



	dma = qemu_mallocz(sizeof *dma * 2);



	eth = qemu_mallocz(sizeof *eth);



	dma[0].client.push = eth_tx_push;

	dma[0].client.opaque = eth;

	dma[1].client.opaque = eth;

	dma[1].client.pull = NULL;



	eth->env = env;

	eth->irq = irq;

	eth->dma_out = dma;

	eth->dma_in = dma + 1;



	/* Connect the phy.  */

	eth->phyaddr = phyaddr & 0x1f;

	tdk_init(&eth->phy);

	mdio_attach(&eth->mdio_bus, &eth->phy, eth->phyaddr);



	eth->ethregs = cpu_register_io_memory(0, eth_read, eth_write, eth);

	cpu_register_physical_memory (base, 0x5c, eth->ethregs);



	eth->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,

				       eth_receive, eth_can_receive, eth);

	eth->vc->opaque = eth;

	eth->vc->link_status_changed = eth_set_link;



	return dma;

}

void *etraxfs_eth_init(NICInfo *nd, CPUState *env, 

		       qemu_irq *irq, target_phys_addr_t base, int phyaddr)

{

	struct etraxfs_dma_client *dma = NULL;	

	struct fs_eth *eth = NULL;



	qemu_check_nic_model(nd, "fseth");



	dma = qemu_mallocz(sizeof *dma * 2);



	eth = qemu_mallocz(sizeof *eth);



	dma[0].client.push = eth_tx_push;

	dma[0].client.opaque = eth;

	dma[1].client.opaque = eth;

	dma[1].client.pull = NULL;



	eth->env = env;

	eth->irq = irq;

	eth->dma_out = dma;

	eth->dma_in = dma + 1;



	

	eth->phyaddr = phyaddr & 0x1f;

	tdk_init(&eth->phy);

	mdio_attach(&eth->mdio_bus, &eth->phy, eth->phyaddr);



	eth->ethregs = cpu_register_io_memory(0, eth_read, eth_write, eth);

	cpu_register_physical_memory (base, 0x5c, eth->ethregs);



	eth->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,

				       eth_receive, eth_can_receive, eth);

	eth->vc->opaque = eth;

	eth->vc->link_status_changed = eth_set_link;



	return dma;

}

				       eth_receive, eth_can_receive, eth);
void *FUNC_0(NICInfo *VAR_0, CPUState *VAR_1, 

		       qemu_irq *VAR_2, target_phys_addr_t VAR_3, int VAR_4)

{

	struct etraxfs_dma_client *VAR_5 = NULL;	

	struct fs_eth *VAR_6 = NULL;



	qemu_check_nic_model(VAR_0, "fseth");



	VAR_5 = qemu_mallocz(sizeof *VAR_5 * 2);



	VAR_6 = qemu_mallocz(sizeof *VAR_6);



	VAR_5[0].client.push = eth_tx_push;

	VAR_5[0].client.opaque = VAR_6;

	VAR_5[1].client.opaque = VAR_6;

	VAR_5[1].client.pull = NULL;



	VAR_6->VAR_1 = VAR_1;

	VAR_6->VAR_2 = VAR_2;

	VAR_6->dma_out = VAR_5;

	VAR_6->dma_in = VAR_5 + 1;



	

	VAR_6->VAR_4 = VAR_4 & 0x1f;

	tdk_init(&VAR_6->phy);

	mdio_attach(&VAR_6->mdio_bus, &VAR_6->phy, VAR_6->VAR_4);



	VAR_6->ethregs = cpu_register_io_memory(0, eth_read, eth_write, VAR_6);

	cpu_register_physical_memory (VAR_3, 0x5c, VAR_6->ethregs);



	VAR_6->vc = qemu_new_vlan_client(VAR_0->vlan, VAR_0->model, VAR_0->name,

				       eth_receive, eth_can_receive, VAR_6);

	VAR_6->vc->opaque = VAR_6;

	VAR_6->vc->link_status_changed = eth_set_link;



	return VAR_5;

}

void *FUNC_0(NICInfo *VAR_0, CPUState *VAR_1,
qemu_irq *VAR_2, target_phys_addr_t VAR_3, int VAR_4)
{ struct etraxfs_dma_client *VAR_5 = NULL; struct fs_eth *VAR_6 = NULL; qemu_check_nic_model(VAR_0, "fseth"); VAR_5 = qemu_mallocz(sizeof *VAR_5 * 2); VAR_6 = qemu_mallocz(sizeof *VAR_6); VAR_5[0].client.push = eth_tx_push; VAR_5[0].client.opaque = VAR_6; VAR_5[1].client.opaque = VAR_6; VAR_5[1].client.pull = NULL; VAR_6->VAR_1 = VAR_1; VAR_6->VAR_2 = VAR_2; VAR_6->dma_out = VAR_5; VAR_6->dma_in = VAR_5 + 1; VAR_6->VAR_4 = VAR_4 & 0x1f; tdk_init(&VAR_6->phy); mdio_attach(&VAR_6->mdio_bus, &VAR_6->phy, VAR_6->VAR_4); VAR_6->ethregs = cpu_register_io_memory(0, eth_read, eth_write, VAR_6); cpu_register_physical_memory (VAR_3, 0x5c, VAR_6->ethregs); VAR_6->vc = qemu_new_vlan_client(VAR_0->vlan, VAR_0->model, VAR_0->name,
eth_receive, eth_can_receive, VAR_6); VAR_6->vc->opaque = VAR_6; VAR_6->vc->link_status_changed = eth_set_link; return VAR_5; }