 /* clear anything saved */ if (lp->pending_tx_skb != NULL) { dev_kfree_skb (lp->pending_tx_skb); lp->pending_tx_skb = NULL; lp->stats.tx_errors++; lp->stats.tx_aborted_errors++; } 
static void smc_reset(struct net_device *dev){	struct smc_local *lp = netdev_priv(dev);	void __iomem *ioaddr = lp->base;	unsigned int ctl, cfg;	DBG(2, "%s: %s\n", dev->name, __FUNCTION__);	/* Disable all interrupts */	spin_lock(&lp->lock);	SMC_SELECT_BANK(2);	SMC_SET_INT_MASK(0);	spin_unlock(&lp->lock);	/*	 * This resets the registers mostly to defaults, but doesn't	 * affect EEPROM.  That seems unnecessary	 */	SMC_SELECT_BANK(0);	SMC_SET_RCR(RCR_SOFTRST);	/*	 * Setup the Configuration Register	 * This is necessary because the CONFIG_REG is not affected	 * by a soft reset	 */	SMC_SELECT_BANK(1);	cfg = CONFIG_DEFAULT;	/*	 * Setup for fast accesses if requested.  If the card/system	 * can't handle it then there will be no recovery except for	 * a hard reset or power cycle	 */	if (nowait)		cfg |= CONFIG_NO_WAIT;	/*	 * Release from possible power-down state	 * Configuration register is not affected by Soft Reset	 */	cfg |= CONFIG_EPH_POWER_EN;	SMC_SET_CONFIG(cfg);	/* this should pause enough for the chip to be happy */	/*	 * elaborate?  What does the chip _need_? --jgarzik	 *	 * This seems to be undocumented, but something the original	 * driver(s) have always done.  Suspect undocumented timing	 * info/determined empirically. --rmk	 */	udelay(1);	/* Disable transmit and receive functionality */	SMC_SELECT_BANK(0);	SMC_SET_RCR(RCR_CLEAR);	SMC_SET_TCR(TCR_CLEAR);	SMC_SELECT_BANK(1);	ctl = SMC_GET_CTL() | CTL_LE_ENABLE;	/*	 * Set the control register to automatically release successfully	 * transmitted packets, to make the best use out of our limited	 * memory	 */	if(!THROTTLE_TX_PKTS)		ctl |= CTL_AUTO_RELEASE;	else		ctl &= ~CTL_AUTO_RELEASE;	SMC_SET_CTL(ctl);	/* Reset the MMU */	SMC_SELECT_BANK(2);	SMC_SET_MMU_CMD(MC_RESET);	SMC_WAIT_MMU_BUSY();	/* clear anything saved */	if (lp->pending_tx_skb != NULL) {		dev_kfree_skb (lp->pending_tx_skb);		lp->pending_tx_skb = NULL;		lp->stats.tx_errors++;		lp->stats.tx_aborted_errors++;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/be83668a253149d99085ca4afe6cd8dc8a43fcd0/smc91x.c/buggy/drivers/net/smc91x.c