diff options
Diffstat (limited to 'drivers/net/ethernet/3com')
| -rw-r--r-- | drivers/net/ethernet/3com/3c509.c | 19 | ||||
| -rw-r--r-- | drivers/net/ethernet/3com/3c59x.c | 42 | ||||
| -rw-r--r-- | drivers/net/ethernet/3com/Kconfig | 1 | 
3 files changed, 20 insertions, 42 deletions
| diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index adb4bf5eb4b4..ede8daa68275 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -723,25 +723,6 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)  		pr_debug("%s: el3_start_xmit(length = %u) called, status %4.4x.\n",  			   dev->name, skb->len, inw(ioaddr + EL3_STATUS));  	} -#if 0 -#ifndef final_version -	{	/* Error-checking code, delete someday. */ -		ushort status = inw(ioaddr + EL3_STATUS); -		if (status & 0x0001 && 		/* IRQ line active, missed one. */ -		    inw(ioaddr + EL3_STATUS) & 1) { 			/* Make sure. */ -			pr_debug("%s: Missed interrupt, status then %04x now %04x" -				   "  Tx %2.2x Rx %4.4x.\n", dev->name, status, -				   inw(ioaddr + EL3_STATUS), inb(ioaddr + TX_STATUS), -				   inw(ioaddr + RX_STATUS)); -			/* Fake interrupt trigger by masking, acknowledge interrupts. */ -			outw(SetStatusEnb | 0x00, ioaddr + EL3_CMD); -			outw(AckIntr | IntLatch | TxAvailable | RxEarly | IntReq, -				 ioaddr + EL3_CMD); -			outw(SetStatusEnb | 0xff, ioaddr + EL3_CMD); -		} -	} -#endif -#endif  	/*  	 *	We lock the driver against other processors. Note  	 *	we don't need to lock versus the IRQ as we suspended diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c index 072c6f14e8fc..ad5272b348f0 100644 --- a/drivers/net/ethernet/3com/3c59x.c +++ b/drivers/net/ethernet/3com/3c59x.c @@ -1012,10 +1012,8 @@ static int vortex_init_one(struct pci_dev *pdev,  		goto out;  	rc = pci_request_regions(pdev, DRV_NAME); -	if (rc < 0) { -		pci_disable_device(pdev); -		goto out; -	} +	if (rc < 0) +		goto out_disable;  	unit = vortex_cards_found; @@ -1032,23 +1030,24 @@ static int vortex_init_one(struct pci_dev *pdev,  	if (!ioaddr) /* If mapping fails, fall-back to BAR 0... */  		ioaddr = pci_iomap(pdev, 0, 0);  	if (!ioaddr) { -		pci_release_regions(pdev); -		pci_disable_device(pdev);  		rc = -ENOMEM; -		goto out; +		goto out_release;  	}  	rc = vortex_probe1(&pdev->dev, ioaddr, pdev->irq,  			   ent->driver_data, unit); -	if (rc < 0) { -		pci_iounmap(pdev, ioaddr); -		pci_release_regions(pdev); -		pci_disable_device(pdev); -		goto out; -	} +	if (rc < 0) +		goto out_iounmap;  	vortex_cards_found++; +	goto out; +out_iounmap: +	pci_iounmap(pdev, ioaddr); +out_release: +	pci_release_regions(pdev); +out_disable: +	pci_disable_device(pdev);  out:  	return rc;  } @@ -1473,7 +1472,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,  	if (pdev) {  		vp->pm_state_valid = 1; - 		pci_save_state(VORTEX_PCI(vp)); +		pci_save_state(pdev);   		acpi_set_WOL(dev);  	}  	retval = register_netdev(dev); @@ -3233,21 +3232,20 @@ static void vortex_remove_one(struct pci_dev *pdev)  	vp = netdev_priv(dev);  	if (vp->cb_fn_base) -		pci_iounmap(VORTEX_PCI(vp), vp->cb_fn_base); +		pci_iounmap(pdev, vp->cb_fn_base);  	unregister_netdev(dev); -	if (VORTEX_PCI(vp)) { -		pci_set_power_state(VORTEX_PCI(vp), PCI_D0);	/* Go active */ -		if (vp->pm_state_valid) -			pci_restore_state(VORTEX_PCI(vp)); -		pci_disable_device(VORTEX_PCI(vp)); -	} +	pci_set_power_state(pdev, PCI_D0);	/* Go active */ +	if (vp->pm_state_valid) +		pci_restore_state(pdev); +	pci_disable_device(pdev); +  	/* Should really use issue_and_wait() here */  	iowrite16(TotalReset | ((vp->drv_flags & EEPROM_RESET) ? 0x04 : 0x14),  	     vp->ioaddr + EL3_CMD); -	pci_iounmap(VORTEX_PCI(vp), vp->ioaddr); +	pci_iounmap(pdev, vp->ioaddr);  	pci_free_consistent(pdev,  						sizeof(struct boom_rx_desc) * RX_RING_SIZE diff --git a/drivers/net/ethernet/3com/Kconfig b/drivers/net/ethernet/3com/Kconfig index 1c71c763f680..f00c76377b44 100644 --- a/drivers/net/ethernet/3com/Kconfig +++ b/drivers/net/ethernet/3com/Kconfig @@ -67,7 +67,6 @@ config PCMCIA_3C589  config VORTEX  	tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"  	depends on (PCI || EISA) && HAS_IOPORT -	select NET_CORE  	select MII  	---help---  	  This option enables driver support for a large number of 10Mbps and |