diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/netwave_cs.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl3501_cs.c | 2 |
13 files changed, 21 insertions, 22 deletions
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c index 70e3cca09787..fab93360f017 100644 --- a/drivers/net/pcmcia/3c574_cs.c +++ b/drivers/net/pcmcia/3c574_cs.c | |||
@@ -728,7 +728,7 @@ static int el3_open(struct net_device *dev) | |||
728 | struct el3_private *lp = netdev_priv(dev); | 728 | struct el3_private *lp = netdev_priv(dev); |
729 | struct pcmcia_device *link = lp->p_dev; | 729 | struct pcmcia_device *link = lp->p_dev; |
730 | 730 | ||
731 | if (!DEV_OK(link)) | 731 | if (!pcmcia_dev_present(link)) |
732 | return -ENODEV; | 732 | return -ENODEV; |
733 | 733 | ||
734 | link->open++; | 734 | link->open++; |
@@ -1176,7 +1176,7 @@ static int el3_close(struct net_device *dev) | |||
1176 | 1176 | ||
1177 | DEBUG(2, "%s: shutting down ethercard.\n", dev->name); | 1177 | DEBUG(2, "%s: shutting down ethercard.\n", dev->name); |
1178 | 1178 | ||
1179 | if (DEV_OK(link)) { | 1179 | if (pcmcia_dev_present(link)) { |
1180 | unsigned long flags; | 1180 | unsigned long flags; |
1181 | 1181 | ||
1182 | /* Turn off statistics ASAP. We update lp->stats below. */ | 1182 | /* Turn off statistics ASAP. We update lp->stats below. */ |
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c index 3d05f66e9c70..875a0fe251e7 100644 --- a/drivers/net/pcmcia/3c589_cs.c +++ b/drivers/net/pcmcia/3c589_cs.c | |||
@@ -557,7 +557,7 @@ static int el3_open(struct net_device *dev) | |||
557 | struct el3_private *lp = netdev_priv(dev); | 557 | struct el3_private *lp = netdev_priv(dev); |
558 | struct pcmcia_device *link = lp->p_dev; | 558 | struct pcmcia_device *link = lp->p_dev; |
559 | 559 | ||
560 | if (!DEV_OK(link)) | 560 | if (!pcmcia_dev_present(link)) |
561 | return -ENODEV; | 561 | return -ENODEV; |
562 | 562 | ||
563 | link->open++; | 563 | link->open++; |
@@ -818,7 +818,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev) | |||
818 | unsigned long flags; | 818 | unsigned long flags; |
819 | struct pcmcia_device *link = lp->p_dev; | 819 | struct pcmcia_device *link = lp->p_dev; |
820 | 820 | ||
821 | if (DEV_OK(link)) { | 821 | if (pcmcia_dev_present(link)) { |
822 | spin_lock_irqsave(&lp->lock, flags); | 822 | spin_lock_irqsave(&lp->lock, flags); |
823 | update_stats(dev); | 823 | update_stats(dev); |
824 | spin_unlock_irqrestore(&lp->lock, flags); | 824 | spin_unlock_irqrestore(&lp->lock, flags); |
@@ -922,7 +922,7 @@ static void set_multicast_list(struct net_device *dev) | |||
922 | kio_addr_t ioaddr = dev->base_addr; | 922 | kio_addr_t ioaddr = dev->base_addr; |
923 | u16 opts = SetRxFilter | RxStation | RxBroadcast; | 923 | u16 opts = SetRxFilter | RxStation | RxBroadcast; |
924 | 924 | ||
925 | if (!(DEV_OK(link))) return; | 925 | if (!pcmcia_dev_present(link)) return; |
926 | if (dev->flags & IFF_PROMISC) | 926 | if (dev->flags & IFF_PROMISC) |
927 | opts |= RxMulticast | RxProm; | 927 | opts |= RxMulticast | RxProm; |
928 | else if (dev->mc_count || (dev->flags & IFF_ALLMULTI)) | 928 | else if (dev->mc_count || (dev->flags & IFF_ALLMULTI)) |
@@ -938,7 +938,7 @@ static int el3_close(struct net_device *dev) | |||
938 | 938 | ||
939 | DEBUG(1, "%s: shutting down ethercard.\n", dev->name); | 939 | DEBUG(1, "%s: shutting down ethercard.\n", dev->name); |
940 | 940 | ||
941 | if (DEV_OK(link)) { | 941 | if (pcmcia_dev_present(link)) { |
942 | /* Turn off statistics ASAP. We update lp->stats below. */ | 942 | /* Turn off statistics ASAP. We update lp->stats below. */ |
943 | outw(StatsDisable, ioaddr + EL3_CMD); | 943 | outw(StatsDisable, ioaddr + EL3_CMD); |
944 | 944 | ||
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 0f1219c11853..56233afcb2b3 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -530,7 +530,7 @@ static int axnet_open(struct net_device *dev) | |||
530 | 530 | ||
531 | DEBUG(2, "axnet_open('%s')\n", dev->name); | 531 | DEBUG(2, "axnet_open('%s')\n", dev->name); |
532 | 532 | ||
533 | if (!DEV_OK(link)) | 533 | if (!pcmcia_dev_present(link)) |
534 | return -ENODEV; | 534 | return -ENODEV; |
535 | 535 | ||
536 | link->open++; | 536 | link->open++; |
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c index 7cb20b6b9348..09b11761cdfa 100644 --- a/drivers/net/pcmcia/fmvj18x_cs.c +++ b/drivers/net/pcmcia/fmvj18x_cs.c | |||
@@ -1112,7 +1112,7 @@ static int fjn_open(struct net_device *dev) | |||
1112 | 1112 | ||
1113 | DEBUG(4, "fjn_open('%s').\n", dev->name); | 1113 | DEBUG(4, "fjn_open('%s').\n", dev->name); |
1114 | 1114 | ||
1115 | if (!DEV_OK(link)) | 1115 | if (!pcmcia_dev_present(link)) |
1116 | return -ENODEV; | 1116 | return -ENODEV; |
1117 | 1117 | ||
1118 | link->open++; | 1118 | link->open++; |
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c index fd191143cb2f..4260c2128f47 100644 --- a/drivers/net/pcmcia/nmclan_cs.c +++ b/drivers/net/pcmcia/nmclan_cs.c | |||
@@ -853,7 +853,7 @@ static int mace_open(struct net_device *dev) | |||
853 | mace_private *lp = netdev_priv(dev); | 853 | mace_private *lp = netdev_priv(dev); |
854 | struct pcmcia_device *link = lp->p_dev; | 854 | struct pcmcia_device *link = lp->p_dev; |
855 | 855 | ||
856 | if (!DEV_OK(link)) | 856 | if (!pcmcia_dev_present(link)) |
857 | return -ENODEV; | 857 | return -ENODEV; |
858 | 858 | ||
859 | link->open++; | 859 | link->open++; |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index d9661410f2ff..506e777c5f06 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -992,7 +992,7 @@ static int pcnet_open(struct net_device *dev) | |||
992 | 992 | ||
993 | DEBUG(2, "pcnet_open('%s')\n", dev->name); | 993 | DEBUG(2, "pcnet_open('%s')\n", dev->name); |
994 | 994 | ||
995 | if (!DEV_OK(link)) | 995 | if (!pcmcia_dev_present(link)) |
996 | return -ENODEV; | 996 | return -ENODEV; |
997 | 997 | ||
998 | link->open++; | 998 | link->open++; |
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 7d565f26a3bf..e74bf5014ef6 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1259,7 +1259,7 @@ static int smc_open(struct net_device *dev) | |||
1259 | #endif | 1259 | #endif |
1260 | 1260 | ||
1261 | /* Check that the PCMCIA card is still here. */ | 1261 | /* Check that the PCMCIA card is still here. */ |
1262 | if (!DEV_OK(link)) | 1262 | if (!pcmcia_dev_present(link)) |
1263 | return -ENODEV; | 1263 | return -ENODEV; |
1264 | /* Physical device present signature. */ | 1264 | /* Physical device present signature. */ |
1265 | if (check_sig(link) < 0) { | 1265 | if (check_sig(link) < 0) { |
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index 0141c5037f41..a92a3134c833 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -1525,7 +1525,7 @@ do_open(struct net_device *dev) | |||
1525 | 1525 | ||
1526 | /* Check that the PCMCIA card is still here. */ | 1526 | /* Check that the PCMCIA card is still here. */ |
1527 | /* Physical device present signature. */ | 1527 | /* Physical device present signature. */ |
1528 | if (!DEV_OK(link)) | 1528 | if (!pcmcia_dev_present(link)) |
1529 | return -ENODEV; | 1529 | return -ENODEV; |
1530 | 1530 | ||
1531 | /* okay */ | 1531 | /* okay */ |
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 25fb919b3791..26bf1127524d 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -216,13 +216,12 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
216 | /* Call-back function to interrogate PCMCIA-specific information | 216 | /* Call-back function to interrogate PCMCIA-specific information |
217 | about the current existance of the card */ | 217 | about the current existance of the card */ |
218 | static int card_present(void *arg) | 218 | static int card_present(void *arg) |
219 | { | 219 | { |
220 | struct pcmcia_device *link = (struct pcmcia_device *)arg; | 220 | struct pcmcia_device *link = (struct pcmcia_device *)arg; |
221 | if (link->suspended) | 221 | |
222 | return 0; | 222 | if (pcmcia_dev_present(link)) |
223 | else if (pcmcia_dev_present(link)) | ||
224 | return 1; | 223 | return 1; |
225 | 224 | ||
226 | return 0; | 225 | return 0; |
227 | } | 226 | } |
228 | 227 | ||
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c index a2cb9b0fa3d6..55bed923fbe9 100644 --- a/drivers/net/wireless/hostap/hostap_cs.c +++ b/drivers/net/wireless/hostap/hostap_cs.c | |||
@@ -210,7 +210,7 @@ static int prism2_config(struct pcmcia_device *link); | |||
210 | static int prism2_pccard_card_present(local_info_t *local) | 210 | static int prism2_pccard_card_present(local_info_t *local) |
211 | { | 211 | { |
212 | struct hostap_cs_priv *hw_priv = local->hw_priv; | 212 | struct hostap_cs_priv *hw_priv = local->hw_priv; |
213 | if (hw_priv != NULL && hw_priv->link != NULL && DEV_OK(hw_priv->link)) | 213 | if (hw_priv != NULL && hw_priv->link != NULL && pcmcia_dev_present(hw_priv->link)) |
214 | return 1; | 214 | return 1; |
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index fbc8595cde39..9343d970537b 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -1107,7 +1107,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id, struct pt_regs *regs | |||
1107 | 1107 | ||
1108 | status = inb(iobase + NETWAVE_REG_ASR); | 1108 | status = inb(iobase + NETWAVE_REG_ASR); |
1109 | 1109 | ||
1110 | if (!DEV_OK(link)) { | 1110 | if (!pcmcia_dev_present(link)) { |
1111 | DEBUG(1, "netwave_interrupt: Interrupt with status 0x%x " | 1111 | DEBUG(1, "netwave_interrupt: Interrupt with status 0x%x " |
1112 | "from removed or suspended card!\n", status); | 1112 | "from removed or suspended card!\n", status); |
1113 | break; | 1113 | break; |
@@ -1346,7 +1346,7 @@ static int netwave_open(struct net_device *dev) { | |||
1346 | 1346 | ||
1347 | DEBUG(1, "netwave_open: starting.\n"); | 1347 | DEBUG(1, "netwave_open: starting.\n"); |
1348 | 1348 | ||
1349 | if (!DEV_OK(link)) | 1349 | if (!pcmcia_dev_present(link)) |
1350 | return -ENODEV; | 1350 | return -ENODEV; |
1351 | 1351 | ||
1352 | link->open++; | 1352 | link->open++; |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 85712ffb842a..879eb427607c 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -1961,7 +1961,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
1961 | 1961 | ||
1962 | local = (ray_dev_t *)dev->priv; | 1962 | local = (ray_dev_t *)dev->priv; |
1963 | link = (struct pcmcia_device *)local->finder; | 1963 | link = (struct pcmcia_device *)local->finder; |
1964 | if (!(pcmcia_dev_present(link)) || link->suspended ) { | 1964 | if (!pcmcia_dev_present(link)) { |
1965 | DEBUG(2,"ray_cs interrupt from device not present or suspended.\n"); | 1965 | DEBUG(2,"ray_cs interrupt from device not present or suspended.\n"); |
1966 | return IRQ_NONE; | 1966 | return IRQ_NONE; |
1967 | } | 1967 | } |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index b6578059de34..e52a650f6737 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1387,7 +1387,7 @@ static int wl3501_open(struct net_device *dev) | |||
1387 | link = this->p_dev; | 1387 | link = this->p_dev; |
1388 | 1388 | ||
1389 | spin_lock_irqsave(&this->lock, flags); | 1389 | spin_lock_irqsave(&this->lock, flags); |
1390 | if (!DEV_OK(link)) | 1390 | if (!pcmcia_dev_present(link)) |
1391 | goto out; | 1391 | goto out; |
1392 | netif_device_attach(dev); | 1392 | netif_device_attach(dev); |
1393 | link->open++; | 1393 | link->open++; |