Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 140fedb5 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik
Browse files

Automatic merge of /spare/repo/netdev-2.6 branch iff-running

parents 91bcc018 7d17c1d6
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -1681,10 +1681,6 @@ static int au1000_init(struct net_device *dev)
		control |= MAC_FULL_DUPLEX;
		control |= MAC_FULL_DUPLEX;
	}
	}


	/* fix for startup without cable */
	if (!link) 
		dev->flags &= ~IFF_RUNNING;

	aup->mac->control = control;
	aup->mac->control = control;
	aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
	aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
	au_sync();
	au_sync();
@@ -1709,16 +1705,14 @@ static void au1000_timer(unsigned long data)
	if_port = dev->if_port;
	if_port = dev->if_port;
	if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) {
	if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) {
		if (link) {
		if (link) {
			if (!(dev->flags & IFF_RUNNING)) {
			if (!netif_carrier_ok(dev)) {
				netif_carrier_on(dev);
				netif_carrier_on(dev);
				dev->flags |= IFF_RUNNING;
				printk(KERN_INFO "%s: link up\n", dev->name);
				printk(KERN_INFO "%s: link up\n", dev->name);
			}
			}
		}
		}
		else {
		else {
			if (dev->flags & IFF_RUNNING) {
			if (netif_carrier_ok(dev)) {
				netif_carrier_off(dev);
				netif_carrier_off(dev);
				dev->flags &= ~IFF_RUNNING;
				dev->if_port = 0;
				dev->if_port = 0;
				printk(KERN_INFO "%s: link down\n", dev->name);
				printk(KERN_INFO "%s: link down\n", dev->name);
			}
			}
+0 −2
Original line number Original line Diff line number Diff line
@@ -1412,7 +1412,6 @@ static int bmac_open(struct net_device *dev)
	bp->opened = 1;
	bp->opened = 1;
	bmac_reset_and_enable(dev);
	bmac_reset_and_enable(dev);
	enable_irq(dev->irq);
	enable_irq(dev->irq);
	dev->flags |= IFF_RUNNING;
	return 0;
	return 0;
}
}


@@ -1425,7 +1424,6 @@ static int bmac_close(struct net_device *dev)
	int i;
	int i;


	bp->sleeping = 1;
	bp->sleeping = 1;
	dev->flags &= ~(IFF_UP | IFF_RUNNING);


	/* disable rx and tx */
	/* disable rx and tx */
	config = bmread(dev, RXCFG);
	config = bmread(dev, RXCFG);
+3 −5
Original line number Original line Diff line number Diff line
@@ -4212,7 +4212,7 @@ SK_BOOL DualNet;
			Flags);
			Flags);


		SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_HARD_RST);
		SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_HARD_RST);
		pAC->dev[Param.Para32[0]]->flags &= ~IFF_RUNNING;
		netif_carrier_off(pAC->dev[Param.Para32[0]]);
		spin_unlock_irqrestore(
		spin_unlock_irqrestore(
			&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
			&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
			Flags);
			Flags);
@@ -4355,7 +4355,7 @@ SK_BOOL DualNet;
		}
		}


		/* Inform the world that link protocol is up. */
		/* Inform the world that link protocol is up. */
		pAC->dev[Param.Para32[0]]->flags |= IFF_RUNNING;
		netif_carrier_on(pAC->dev[Param.Para32[0]]);


		break;
		break;
	case SK_DRV_NET_DOWN:	 /* SK_U32 Reason */
	case SK_DRV_NET_DOWN:	 /* SK_U32 Reason */
@@ -4368,7 +4368,7 @@ SK_BOOL DualNet;
		} else {
		} else {
			DoPrintInterfaceChange = SK_TRUE;
			DoPrintInterfaceChange = SK_TRUE;
		}
		}
		pAC->dev[Param.Para32[1]]->flags &= ~IFF_RUNNING;
		netif_carrier_off(pAC->dev[Param.Para32[1]]);
		break;
		break;
	case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
	case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */
		SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
		SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
@@ -4961,7 +4961,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
#ifdef CONFIG_NET_POLL_CONTROLLER
#ifdef CONFIG_NET_POLL_CONTROLLER
	dev->poll_controller =	&SkGePollController;
	dev->poll_controller =	&SkGePollController;
#endif
#endif
	dev->flags &= 		~IFF_RUNNING;
	SET_NETDEV_DEV(dev, &pdev->dev);
	SET_NETDEV_DEV(dev, &pdev->dev);
	SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
	SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);


@@ -5035,7 +5034,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev,
		dev->set_mac_address    = &SkGeSetMacAddr;
		dev->set_mac_address    = &SkGeSetMacAddr;
		dev->do_ioctl           = &SkGeIoctl;
		dev->do_ioctl           = &SkGeIoctl;
		dev->change_mtu         = &SkGeChangeMtu;
		dev->change_mtu         = &SkGeChangeMtu;
		dev->flags             &= ~IFF_RUNNING;
		SET_NETDEV_DEV(dev, &pdev->dev);
		SET_NETDEV_DEV(dev, &pdev->dev);
		SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);
		SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps);


+2 −2
Original line number Original line Diff line number Diff line
@@ -2819,7 +2819,7 @@ void TLan_PhyMonitor( struct net_device *dev )
 	       if (priv->link) {
 	       if (priv->link) {
		      priv->link = 0;
		      priv->link = 0;
	              printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name);
	              printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name);
	              dev->flags &= ~IFF_RUNNING;
		      netif_carrier_off(dev);
		      TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT );
		      TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT );
		      return;
		      return;
		}
		}
@@ -2829,7 +2829,7 @@ void TLan_PhyMonitor( struct net_device *dev )
        if ((phy_status & MII_GS_LINK) && !priv->link) {
        if ((phy_status & MII_GS_LINK) && !priv->link) {
 		priv->link = 1;
 		priv->link = 1;
        	printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name);
        	printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name);
        	dev->flags |= IFF_RUNNING;
		netif_carrier_on(dev);
        }
        }


	/* Setup a new monitor */
	/* Setup a new monitor */
+3 −8
Original line number Original line Diff line number Diff line
@@ -888,11 +888,6 @@ static int tok_open(struct net_device *dev)
	ti->sap_status   = CLOSED; /* CLOSED or OPEN      */
	ti->sap_status   = CLOSED; /* CLOSED or OPEN      */
	ti->open_failure =     NO; /* NO     or YES       */
	ti->open_failure =     NO; /* NO     or YES       */
	ti->open_mode    = MANUAL; /* MANUAL or AUTOMATIC */
	ti->open_mode    = MANUAL; /* MANUAL or AUTOMATIC */
	/* 12/2000 not typical Linux, but we can use RUNNING to let us know when
	the network has crapped out or cables are disconnected. Useful because
	the IFF_UP flag stays up the whole time, until ifconfig tr0 down.
	*/
	dev->flags &= ~IFF_RUNNING;


	ti->sram_phys &= ~1; /* to reverse what we do in tok_close */
	ti->sram_phys &= ~1; /* to reverse what we do in tok_close */
	/* init the spinlock */
	/* init the spinlock */
@@ -1242,7 +1237,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
		ti->open_status = CLOSED;
		ti->open_status = CLOSED;
		ti->sap_status  = CLOSED;
		ti->sap_status  = CLOSED;
		ti->open_mode   = AUTOMATIC;
		ti->open_mode   = AUTOMATIC;
		dev->flags &= ~IFF_RUNNING;
		netif_carrier_off(dev);
		netif_stop_queue(dev);
		netif_stop_queue(dev);
		ti->open_action = RESTART;
		ti->open_action = RESTART;
		outb(0, dev->base_addr + ADAPTRESET);
		outb(0, dev->base_addr + ADAPTRESET);
@@ -1323,7 +1318,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
				break;
				break;
			}
			}
			netif_wake_queue(dev);
			netif_wake_queue(dev);
			dev->flags |= IFF_RUNNING;/*BMS 12/2000*/
			netif_carrier_on(dev);
			break;
			break;
		case DIR_INTERRUPT:
		case DIR_INTERRUPT:
		case DIR_MOD_OPEN_PARAMS:
		case DIR_MOD_OPEN_PARAMS:
@@ -1427,7 +1422,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs)
								ring_status);
								ring_status);
			if(ring_status& (REMOVE_RECV|AUTO_REMOVAL|LOBE_FAULT)){
			if(ring_status& (REMOVE_RECV|AUTO_REMOVAL|LOBE_FAULT)){
				netif_stop_queue(dev);
				netif_stop_queue(dev);
				dev->flags &= ~IFF_RUNNING;/*not typical Linux*/
				netif_carrier_off(dev);
				DPRINTK("Remove received, or Auto-removal error"
				DPRINTK("Remove received, or Auto-removal error"
					", or Lobe fault\n");
					", or Lobe fault\n");
				DPRINTK("We'll try to reopen the closed adapter"
				DPRINTK("We'll try to reopen the closed adapter"
Loading