SMC_SELECT_BANK(2); 
static void smc_phy_configure(void *data){	struct net_device *dev = data;	struct smc_local *lp = netdev_priv(dev);	void __iomem *ioaddr = lp->base;	int phyaddr = lp->mii.phy_id;	int my_phy_caps; /* My PHY capabilities */	int my_ad_caps; /* My Advertised capabilities */	int status;	DBG(3, "%s:smc_program_phy()\n", dev->name);	spin_lock_irq(&lp->lock);	/*	 * We should not be called if phy_type is zero.	 */	if (lp->phy_type == 0)		goto smc_phy_configure_exit;	if (smc_phy_reset(dev, phyaddr)) {		printk("%s: PHY reset timed out\n", dev->name);		goto smc_phy_configure_exit;	}	/*	 * Enable PHY Interrupts (for register 18)	 * Interrupts listed here are disabled	 */	smc_phy_write(dev, phyaddr, PHY_MASK_REG,		PHY_INT_LOSSSYNC | PHY_INT_CWRD | PHY_INT_SSD |		PHY_INT_ESD | PHY_INT_RPOL | PHY_INT_JAB |		PHY_INT_SPDDET | PHY_INT_DPLXDET);	/* Configure the Receive/Phy Control register */	SMC_SELECT_BANK(0);	SMC_SET_RPC(lp->rpc_cur_mode);	/* If the user requested no auto neg, then go set his request */	if (lp->mii.force_media) {		smc_phy_fixed(dev);		goto smc_phy_configure_exit;	}	/* Copy our capabilities from MII_BMSR to MII_ADVERTISE */	my_phy_caps = smc_phy_read(dev, phyaddr, MII_BMSR);	if (!(my_phy_caps & BMSR_ANEGCAPABLE)) {		printk(KERN_INFO "Auto negotiation NOT supported\n");		smc_phy_fixed(dev);		goto smc_phy_configure_exit;	}	my_ad_caps = ADVERTISE_CSMA; /* I am CSMA capable */	if (my_phy_caps & BMSR_100BASE4)		my_ad_caps |= ADVERTISE_100BASE4;	if (my_phy_caps & BMSR_100FULL)		my_ad_caps |= ADVERTISE_100FULL;	if (my_phy_caps & BMSR_100HALF)		my_ad_caps |= ADVERTISE_100HALF;	if (my_phy_caps & BMSR_10FULL)		my_ad_caps |= ADVERTISE_10FULL;	if (my_phy_caps & BMSR_10HALF)		my_ad_caps |= ADVERTISE_10HALF;	/* Disable capabilities not selected by our user */	if (lp->ctl_rspeed != 100)		my_ad_caps &= ~(ADVERTISE_100BASE4|ADVERTISE_100FULL|ADVERTISE_100HALF);	if (!lp->ctl_rfduplx)		my_ad_caps &= ~(ADVERTISE_100FULL|ADVERTISE_10FULL);	/* Update our Auto-Neg Advertisement Register */	smc_phy_write(dev, phyaddr, MII_ADVERTISE, my_ad_caps);	lp->mii.advertising = my_ad_caps;	/*	 * Read the register back.  Without this, it appears that when	 * auto-negotiation is restarted, sometimes it isn't ready and	 * the link does not come up.	 */	status = smc_phy_read(dev, phyaddr, MII_ADVERTISE);	DBG(2, "%s: phy caps=%x\n", dev->name, my_phy_caps);	DBG(2, "%s: phy advertised caps=%x\n", dev->name, my_ad_caps);	/* Restart auto-negotiation process in order to advertise my caps */	smc_phy_write(dev, phyaddr, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART);	smc_phy_check_media(dev, 1);smc_phy_configure_exit:	spin_unlock_irq(&lp->lock);	lp->work_pending = 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/e52542443aa9be15439e9879baf6d41b290e94db/smc91x.c/clean/drivers/net/smc91x.c