diff options
-rw-r--r-- | drivers/net/au1000_eth.c | 10 | ||||
-rw-r--r-- | drivers/net/bmac.c | 2 | ||||
-rw-r--r-- | drivers/net/sk98lin/skge.c | 8 | ||||
-rw-r--r-- | drivers/net/tlan.c | 4 | ||||
-rw-r--r-- | drivers/net/tokenring/ibmtr.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/lmc/lmc_main.c | 8 | ||||
-rw-r--r-- | include/linux/if.h | 2 |
7 files changed, 13 insertions, 32 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 5a2efd343db4..c82b9cd1c924 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -1681,10 +1681,6 @@ static int au1000_init(struct net_device *dev) | |||
1681 | control |= MAC_FULL_DUPLEX; | 1681 | control |= MAC_FULL_DUPLEX; |
1682 | } | 1682 | } |
1683 | 1683 | ||
1684 | /* fix for startup without cable */ | ||
1685 | if (!link) | ||
1686 | dev->flags &= ~IFF_RUNNING; | ||
1687 | |||
1688 | aup->mac->control = control; | 1684 | aup->mac->control = control; |
1689 | aup->mac->vlan1_tag = 0x8100; /* activate vlan support */ | 1685 | aup->mac->vlan1_tag = 0x8100; /* activate vlan support */ |
1690 | au_sync(); | 1686 | au_sync(); |
@@ -1709,16 +1705,14 @@ static void au1000_timer(unsigned long data) | |||
1709 | if_port = dev->if_port; | 1705 | if_port = dev->if_port; |
1710 | if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) { | 1706 | if (aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed) == 0) { |
1711 | if (link) { | 1707 | if (link) { |
1712 | if (!(dev->flags & IFF_RUNNING)) { | 1708 | if (!netif_carrier_ok(dev)) { |
1713 | netif_carrier_on(dev); | 1709 | netif_carrier_on(dev); |
1714 | dev->flags |= IFF_RUNNING; | ||
1715 | printk(KERN_INFO "%s: link up\n", dev->name); | 1710 | printk(KERN_INFO "%s: link up\n", dev->name); |
1716 | } | 1711 | } |
1717 | } | 1712 | } |
1718 | else { | 1713 | else { |
1719 | if (dev->flags & IFF_RUNNING) { | 1714 | if (netif_carrier_ok(dev)) { |
1720 | netif_carrier_off(dev); | 1715 | netif_carrier_off(dev); |
1721 | dev->flags &= ~IFF_RUNNING; | ||
1722 | dev->if_port = 0; | 1716 | dev->if_port = 0; |
1723 | printk(KERN_INFO "%s: link down\n", dev->name); | 1717 | printk(KERN_INFO "%s: link down\n", dev->name); |
1724 | } | 1718 | } |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 734bd4ee3f9b..00e5257b176f 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1412,7 +1412,6 @@ static int bmac_open(struct net_device *dev) | |||
1412 | bp->opened = 1; | 1412 | bp->opened = 1; |
1413 | bmac_reset_and_enable(dev); | 1413 | bmac_reset_and_enable(dev); |
1414 | enable_irq(dev->irq); | 1414 | enable_irq(dev->irq); |
1415 | dev->flags |= IFF_RUNNING; | ||
1416 | return 0; | 1415 | return 0; |
1417 | } | 1416 | } |
1418 | 1417 | ||
@@ -1425,7 +1424,6 @@ static int bmac_close(struct net_device *dev) | |||
1425 | int i; | 1424 | int i; |
1426 | 1425 | ||
1427 | bp->sleeping = 1; | 1426 | bp->sleeping = 1; |
1428 | dev->flags &= ~(IFF_UP | IFF_RUNNING); | ||
1429 | 1427 | ||
1430 | /* disable rx and tx */ | 1428 | /* disable rx and tx */ |
1431 | config = bmread(dev, RXCFG); | 1429 | config = bmread(dev, RXCFG); |
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 05b827f79f54..1ccb2989001c 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c | |||
@@ -4212,7 +4212,7 @@ SK_BOOL DualNet; | |||
4212 | Flags); | 4212 | Flags); |
4213 | 4213 | ||
4214 | SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_HARD_RST); | 4214 | SkGeStopPort(pAC, IoC, FromPort, SK_STOP_ALL, SK_HARD_RST); |
4215 | pAC->dev[Param.Para32[0]]->flags &= ~IFF_RUNNING; | 4215 | netif_carrier_off(pAC->dev[Param.Para32[0]]); |
4216 | spin_unlock_irqrestore( | 4216 | spin_unlock_irqrestore( |
4217 | &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, | 4217 | &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock, |
4218 | Flags); | 4218 | Flags); |
@@ -4355,7 +4355,7 @@ SK_BOOL DualNet; | |||
4355 | } | 4355 | } |
4356 | 4356 | ||
4357 | /* Inform the world that link protocol is up. */ | 4357 | /* Inform the world that link protocol is up. */ |
4358 | pAC->dev[Param.Para32[0]]->flags |= IFF_RUNNING; | 4358 | netif_carrier_on(pAC->dev[Param.Para32[0]]); |
4359 | 4359 | ||
4360 | break; | 4360 | break; |
4361 | case SK_DRV_NET_DOWN: /* SK_U32 Reason */ | 4361 | case SK_DRV_NET_DOWN: /* SK_U32 Reason */ |
@@ -4368,7 +4368,7 @@ SK_BOOL DualNet; | |||
4368 | } else { | 4368 | } else { |
4369 | DoPrintInterfaceChange = SK_TRUE; | 4369 | DoPrintInterfaceChange = SK_TRUE; |
4370 | } | 4370 | } |
4371 | pAC->dev[Param.Para32[1]]->flags &= ~IFF_RUNNING; | 4371 | netif_carrier_off(pAC->dev[Param.Para32[1]]); |
4372 | break; | 4372 | break; |
4373 | case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */ | 4373 | case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */ |
4374 | SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, | 4374 | 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, | |||
4961 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4961 | #ifdef CONFIG_NET_POLL_CONTROLLER |
4962 | dev->poll_controller = &SkGePollController; | 4962 | dev->poll_controller = &SkGePollController; |
4963 | #endif | 4963 | #endif |
4964 | dev->flags &= ~IFF_RUNNING; | ||
4965 | SET_NETDEV_DEV(dev, &pdev->dev); | 4964 | SET_NETDEV_DEV(dev, &pdev->dev); |
4966 | SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps); | 4965 | SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps); |
4967 | 4966 | ||
@@ -5035,7 +5034,6 @@ static int __devinit skge_probe_one(struct pci_dev *pdev, | |||
5035 | dev->set_mac_address = &SkGeSetMacAddr; | 5034 | dev->set_mac_address = &SkGeSetMacAddr; |
5036 | dev->do_ioctl = &SkGeIoctl; | 5035 | dev->do_ioctl = &SkGeIoctl; |
5037 | dev->change_mtu = &SkGeChangeMtu; | 5036 | dev->change_mtu = &SkGeChangeMtu; |
5038 | dev->flags &= ~IFF_RUNNING; | ||
5039 | SET_NETDEV_DEV(dev, &pdev->dev); | 5037 | SET_NETDEV_DEV(dev, &pdev->dev); |
5040 | SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps); | 5038 | SET_ETHTOOL_OPS(dev, &SkGeEthtoolOps); |
5041 | 5039 | ||
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index a7ffa64502dd..ce116624f136 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -2807,7 +2807,7 @@ void TLan_PhyMonitor( struct net_device *dev ) | |||
2807 | if (priv->link) { | 2807 | if (priv->link) { |
2808 | priv->link = 0; | 2808 | priv->link = 0; |
2809 | printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name); | 2809 | printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name); |
2810 | dev->flags &= ~IFF_RUNNING; | 2810 | netif_carrier_off(dev); |
2811 | TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); | 2811 | TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); |
2812 | return; | 2812 | return; |
2813 | } | 2813 | } |
@@ -2817,7 +2817,7 @@ void TLan_PhyMonitor( struct net_device *dev ) | |||
2817 | if ((phy_status & MII_GS_LINK) && !priv->link) { | 2817 | if ((phy_status & MII_GS_LINK) && !priv->link) { |
2818 | priv->link = 1; | 2818 | priv->link = 1; |
2819 | printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name); | 2819 | printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name); |
2820 | dev->flags |= IFF_RUNNING; | 2820 | netif_carrier_on(dev); |
2821 | } | 2821 | } |
2822 | 2822 | ||
2823 | /* Setup a new monitor */ | 2823 | /* Setup a new monitor */ |
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c index c098863bdd9d..3873917a9c22 100644 --- a/drivers/net/tokenring/ibmtr.c +++ b/drivers/net/tokenring/ibmtr.c | |||
@@ -888,11 +888,6 @@ static int tok_open(struct net_device *dev) | |||
888 | ti->sap_status = CLOSED; /* CLOSED or OPEN */ | 888 | ti->sap_status = CLOSED; /* CLOSED or OPEN */ |
889 | ti->open_failure = NO; /* NO or YES */ | 889 | ti->open_failure = NO; /* NO or YES */ |
890 | ti->open_mode = MANUAL; /* MANUAL or AUTOMATIC */ | 890 | ti->open_mode = MANUAL; /* MANUAL or AUTOMATIC */ |
891 | /* 12/2000 not typical Linux, but we can use RUNNING to let us know when | ||
892 | the network has crapped out or cables are disconnected. Useful because | ||
893 | the IFF_UP flag stays up the whole time, until ifconfig tr0 down. | ||
894 | */ | ||
895 | dev->flags &= ~IFF_RUNNING; | ||
896 | 891 | ||
897 | ti->sram_phys &= ~1; /* to reverse what we do in tok_close */ | 892 | ti->sram_phys &= ~1; /* to reverse what we do in tok_close */ |
898 | /* init the spinlock */ | 893 | /* init the spinlock */ |
@@ -1242,7 +1237,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
1242 | ti->open_status = CLOSED; | 1237 | ti->open_status = CLOSED; |
1243 | ti->sap_status = CLOSED; | 1238 | ti->sap_status = CLOSED; |
1244 | ti->open_mode = AUTOMATIC; | 1239 | ti->open_mode = AUTOMATIC; |
1245 | dev->flags &= ~IFF_RUNNING; | 1240 | netif_carrier_off(dev); |
1246 | netif_stop_queue(dev); | 1241 | netif_stop_queue(dev); |
1247 | ti->open_action = RESTART; | 1242 | ti->open_action = RESTART; |
1248 | outb(0, dev->base_addr + ADAPTRESET); | 1243 | outb(0, dev->base_addr + ADAPTRESET); |
@@ -1323,7 +1318,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
1323 | break; | 1318 | break; |
1324 | } | 1319 | } |
1325 | netif_wake_queue(dev); | 1320 | netif_wake_queue(dev); |
1326 | dev->flags |= IFF_RUNNING;/*BMS 12/2000*/ | 1321 | netif_carrier_on(dev); |
1327 | break; | 1322 | break; |
1328 | case DIR_INTERRUPT: | 1323 | case DIR_INTERRUPT: |
1329 | case DIR_MOD_OPEN_PARAMS: | 1324 | case DIR_MOD_OPEN_PARAMS: |
@@ -1427,7 +1422,7 @@ irqreturn_t tok_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
1427 | ring_status); | 1422 | ring_status); |
1428 | if(ring_status& (REMOVE_RECV|AUTO_REMOVAL|LOBE_FAULT)){ | 1423 | if(ring_status& (REMOVE_RECV|AUTO_REMOVAL|LOBE_FAULT)){ |
1429 | netif_stop_queue(dev); | 1424 | netif_stop_queue(dev); |
1430 | dev->flags &= ~IFF_RUNNING;/*not typical Linux*/ | 1425 | netif_carrier_off(dev); |
1431 | DPRINTK("Remove received, or Auto-removal error" | 1426 | DPRINTK("Remove received, or Auto-removal error" |
1432 | ", or Lobe fault\n"); | 1427 | ", or Lobe fault\n"); |
1433 | DPRINTK("We'll try to reopen the closed adapter" | 1428 | DPRINTK("We'll try to reopen the closed adapter" |
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c index 15e545f66cd7..2b948ea397d5 100644 --- a/drivers/net/wan/lmc/lmc_main.c +++ b/drivers/net/wan/lmc/lmc_main.c | |||
@@ -723,7 +723,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/ | |||
723 | /* lmc_reset (sc); Why reset??? The link can go down ok */ | 723 | /* lmc_reset (sc); Why reset??? The link can go down ok */ |
724 | 724 | ||
725 | /* Inform the world that link has been lost */ | 725 | /* Inform the world that link has been lost */ |
726 | dev->flags &= ~IFF_RUNNING; | 726 | netif_carrier_off(dev); |
727 | } | 727 | } |
728 | 728 | ||
729 | /* | 729 | /* |
@@ -736,7 +736,7 @@ static void lmc_watchdog (unsigned long data) /*fold00*/ | |||
736 | /* lmc_reset (sc); Again why reset??? */ | 736 | /* lmc_reset (sc); Again why reset??? */ |
737 | 737 | ||
738 | /* Inform the world that link protocol is back up. */ | 738 | /* Inform the world that link protocol is back up. */ |
739 | dev->flags |= IFF_RUNNING; | 739 | netif_carrier_on(dev); |
740 | 740 | ||
741 | /* Now we have to tell the syncppp that we had an outage | 741 | /* Now we have to tell the syncppp that we had an outage |
742 | * and that it should deal. Calling sppp_reopen here | 742 | * and that it should deal. Calling sppp_reopen here |
@@ -1168,8 +1168,6 @@ static void lmc_running_reset (struct net_device *dev) /*fold00*/ | |||
1168 | sc->lmc_media->set_link_status (sc, 1); | 1168 | sc->lmc_media->set_link_status (sc, 1); |
1169 | sc->lmc_media->set_status (sc, NULL); | 1169 | sc->lmc_media->set_status (sc, NULL); |
1170 | 1170 | ||
1171 | //dev->flags |= IFF_RUNNING; | ||
1172 | |||
1173 | netif_wake_queue(dev); | 1171 | netif_wake_queue(dev); |
1174 | 1172 | ||
1175 | sc->lmc_txfull = 0; | 1173 | sc->lmc_txfull = 0; |
@@ -1233,8 +1231,6 @@ static int lmc_ifdown (struct net_device *dev) /*fold00*/ | |||
1233 | csr6 &= ~LMC_DEC_SR; /* Turn off the Receive bit */ | 1231 | csr6 &= ~LMC_DEC_SR; /* Turn off the Receive bit */ |
1234 | LMC_CSR_WRITE (sc, csr_command, csr6); | 1232 | LMC_CSR_WRITE (sc, csr_command, csr6); |
1235 | 1233 | ||
1236 | dev->flags &= ~IFF_RUNNING; | ||
1237 | |||
1238 | sc->stats.rx_missed_errors += | 1234 | sc->stats.rx_missed_errors += |
1239 | LMC_CSR_READ (sc, csr_missed_frames) & 0xffff; | 1235 | LMC_CSR_READ (sc, csr_missed_frames) & 0xffff; |
1240 | 1236 | ||
diff --git a/include/linux/if.h b/include/linux/if.h index d73a9d62f208..ce627d9092ef 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define IFF_LOOPBACK 0x8 /* is a loopback net */ | 33 | #define IFF_LOOPBACK 0x8 /* is a loopback net */ |
34 | #define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ | 34 | #define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ |
35 | #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ | 35 | #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ |
36 | #define IFF_RUNNING 0x40 /* resources allocated */ | 36 | #define IFF_RUNNING 0x40 /* interface running and carrier ok */ |
37 | #define IFF_NOARP 0x80 /* no ARP protocol */ | 37 | #define IFF_NOARP 0x80 /* no ARP protocol */ |
38 | #define IFF_PROMISC 0x100 /* receive all packets */ | 38 | #define IFF_PROMISC 0x100 /* receive all packets */ |
39 | #define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ | 39 | #define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ |