} else if (le16_to_cpu(buf[1]) == PRODID_TDK_GN3410) { 
} else if (le16_to_cpu(buf[1]) == PRODID_TDK_GN3410 || le16_to_cpu(buf[1]) == PRODID_TDK_NP9610 || le16_to_cpu(buf[1]) == PRODID_TDK_MN3200) { 
static void fmvj18x_config(dev_link_t *link){    client_handle_t handle = link->handle;    struct net_device *dev = link->priv;    local_info_t *lp = netdev_priv(dev);    tuple_t tuple;    cisparse_t parse;    u_short buf[32];    int i, last_fn, last_ret, ret;    kio_addr_t ioaddr;    cardtype_t cardtype;    char *card_name = "unknown";    u_char *node_id;    DEBUG(0, "fmvj18x_config(0x%p)\n", link);    /*       This reads the card's CONFIG tuple to find its configuration       registers.    */    tuple.DesiredTuple = CISTPL_CONFIG;    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));    tuple.TupleData = (u_char *)buf;    tuple.TupleDataMax = 64;    tuple.TupleOffset = 0;    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));        /* Configure card */    link->state |= DEV_CONFIG;    link->conf.ConfigBase = parse.config.base;     link->conf.Present = parse.config.rmask[0];    tuple.DesiredTuple = CISTPL_FUNCE;    tuple.TupleOffset = 0;    if (pcmcia_get_first_tuple(handle, &tuple) == CS_SUCCESS) {	/* Yes, I have CISTPL_FUNCE. Let's check CISTPL_MANFID */	tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;	CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));	CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));	CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));	link->conf.ConfigIndex = parse.cftable_entry.index;	tuple.DesiredTuple = CISTPL_MANFID;	if (pcmcia_get_first_tuple(handle, &tuple) == CS_SUCCESS)	    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));	else	    buf[0] = 0xffff;	switch (le16_to_cpu(buf[0])) {	case MANFID_TDK:	    cardtype = TDK;	    if (le16_to_cpu(buf[1]) == PRODID_TDK_CF010) {		cs_status_t status;		pcmcia_get_status(handle, &status);		if (status.CardState & CS_EVENT_3VCARD)		    link->conf.Vcc = 33; /* inserted in 3.3V slot */	    } else if (le16_to_cpu(buf[1]) == PRODID_TDK_GN3410) {		/* MultiFunction Card */		link->conf.ConfigBase = 0x800;		link->conf.ConfigIndex = 0x47;		link->io.NumPorts2 = 8;	    }	    break;	case MANFID_CONTEC:	    cardtype = CONTEC;	    break;	case MANFID_FUJITSU:	    if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10302)                /* RATOC REX-5588/9822/4886's PRODID are 0004(=MBH10302),                   but these are MBH10304 based card. */ 		cardtype = MBH10304;	    else if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10304)		cardtype = MBH10304;	    else		cardtype = LA501;	    break;	default:	    cardtype = MBH10304;	}    } else {	/* old type card */	tuple.DesiredTuple = CISTPL_MANFID;	if (pcmcia_get_first_tuple(handle, &tuple) == CS_SUCCESS)	    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));	else	    buf[0] = 0xffff;	switch (le16_to_cpu(buf[0])) {	case MANFID_FUJITSU:	    if (le16_to_cpu(buf[1]) == PRODID_FUJITSU_MBH10304) {		cardtype = XXX10304;    /* MBH10304 with buggy CIS */	        link->conf.ConfigIndex = 0x20;	    } else {		cardtype = MBH10302;    /* NextCom NC5310, etc. */		link->conf.ConfigIndex = 1;	    }	    break;	case MANFID_UNGERMANN:	    cardtype = UNGERMANN;	    break;	default:	    cardtype = MBH10302;	    link->conf.ConfigIndex = 1;	}    }    if (link->io.NumPorts2 != 0) {    	link->irq.Attributes =		IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED|IRQ_HANDLE_PRESENT;	ret = mfc_try_io_port(link);	if (ret != CS_SUCCESS) goto cs_failed;    } else if (cardtype == UNGERMANN) {	ret = ungermann_try_io_port(link);	if (ret != CS_SUCCESS) goto cs_failed;    } else { 	CS_CHECK(RequestIO, pcmcia_request_io(link->handle, &link->io));    }    CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq));    CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf));    dev->irq = link->irq.AssignedIRQ;    dev->base_addr = link->io.BasePort1;    if (link->io.BasePort2 != 0)	fmvj18x_setup_mfc(link);    ioaddr = dev->base_addr;    /* Reset controller */    if (sram_config == 0) 	outb(CONFIG0_RST, ioaddr + CONFIG_0);    else	outb(CONFIG0_RST_1, ioaddr + CONFIG_0);    /* Power On chip and select bank 0 */    if (cardtype == MBH10302)	outb(BANK_0, ioaddr + CONFIG_1);    else	outb(BANK_0U, ioaddr + CONFIG_1);        /* Set hardware address */    switch (cardtype) {    case MBH10304:    case TDK:    case LA501:    case CONTEC:	tuple.DesiredTuple = CISTPL_FUNCE;	tuple.TupleOffset = 0;	CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));	tuple.TupleOffset = 0;	CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));	if (cardtype == MBH10304) {	    /* MBH10304's CIS_FUNCE is corrupted */	    node_id = &(tuple.TupleData[5]);	    card_name = "FMV-J182";	} else {	    while (tuple.TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID ) {		CS_CHECK(GetNextTuple, pcmcia_get_next_tuple(handle, &tuple));		CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));	    }	    node_id = &(tuple.TupleData[2]);	    if( cardtype == TDK ) {		card_name = "TDK LAK-CD021";	    } else if( cardtype == LA501 ) {		card_name = "LA501";	    } else {		card_name = "C-NET(PC)C";	    }	}	/* Read MACID from CIS */	for (i = 0; i < 6; i++)	    dev->dev_addr[i] = node_id[i];	break;    case UNGERMANN:	/* Read MACID from register */	for (i = 0; i < 6; i++) 	    dev->dev_addr[i] = inb(ioaddr + UNGERMANN_MAC_ID + i);	card_name = "Access/CARD";	break;    case XXX10304:	/* Read MACID from Buggy CIS */	if (fmvj18x_get_hwinfo(link, tuple.TupleData) == -1) {	    printk(KERN_NOTICE "fmvj18x_cs: unable to read hardware net address.\n");	    goto failed;	}	for (i = 0 ; i < 6; i++) {	    dev->dev_addr[i] = tuple.TupleData[i];	}	card_name = "FMV-J182";	break;    case MBH10302:    default:	/* Read MACID from register */	for (i = 0; i < 6; i++) 	    dev->dev_addr[i] = inb(ioaddr + MAC_ID + i);	card_name = "FMV-J181";	break;    }    lp->cardtype = cardtype;    link->dev = &lp->node;    link->state &= ~DEV_CONFIG_PENDING;    SET_NETDEV_DEV(dev, &handle_to_dev(handle));    if (register_netdev(dev) != 0) {	printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");	link->dev = NULL;	goto failed;    }    strcpy(lp->node.dev_name, dev->name);    /* print current configuration */    printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, hw_addr ", 	   dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", 	   dev->base_addr, dev->irq);    for (i = 0; i < 6; i++)	printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));    return;    cs_failed:    /* All Card Services errors end up here */    cs_error(link->handle, last_fn, last_ret);failed:    fmvj18x_release(link);    link->state &= ~DEV_CONFIG_PENDING;} /* fmvj18x_config */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f4d7510d3d3b4501c94b4b00cf42fd58d49aeddd/fmvj18x_cs.c/clean/drivers/net/pcmcia/fmvj18x_cs.c