pcmcia_disable_device(link->handle);
 }
 
-static int bluecard_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int bluecard_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 static struct pcmcia_device_id bluecard_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("BlueCard", "LSE041", 0xbaf16fbf, 0x657cc15e),
        PCMCIA_DEVICE_PROD_ID12("BTCFCARD", "LSE139", 0xe3987764, 0x2524b59c),
        .probe          = bluecard_attach,
        .remove         = bluecard_detach,
        .id_table       = bluecard_ids,
-       .suspend        = bluecard_suspend,
-       .resume         = bluecard_resume,
 };
 
 static int __init init_bluecard_cs(void)
 
        pcmcia_disable_device(link->handle);
 }
 
-static int bt3c_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int bt3c_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 
 static struct pcmcia_device_id bt3c_ids[] = {
        PCMCIA_DEVICE_PROD_ID13("3COM", "Bluetooth PC Card", 0xefce0a31, 0xd4ce9b02),
        .probe          = bt3c_attach,
        .remove         = bt3c_detach,
        .id_table       = bt3c_ids,
-       .suspend        = bt3c_suspend,
-       .resume         = bt3c_resume,
 };
 
 static int __init init_bt3c_cs(void)
 
        pcmcia_disable_device(link->handle);
 }
 
-static int btuart_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int btuart_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
-
 static struct pcmcia_device_id btuart_ids[] = {
        /* don't use this driver. Use serial_cs + hci_uart instead */
        PCMCIA_DEVICE_NULL
        .probe          = btuart_attach,
        .remove         = btuart_detach,
        .id_table       = btuart_ids,
-       .suspend        = btuart_suspend,
-       .resume         = btuart_resume,
 };
 
 static int __init init_btuart_cs(void)
 
        pcmcia_disable_device(link->handle);
 }
 
-static int dtl1_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int dtl1_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 
 static struct pcmcia_device_id dtl1_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("Nokia Mobile Phones", "DTL-1", 0xe1bfdd64, 0xe168480d),
        .probe          = dtl1_attach,
        .remove         = dtl1_detach,
        .id_table       = dtl1_ids,
-       .suspend        = dtl1_suspend,
-       .resume         = dtl1_resume,
 };
 
 static int __init init_dtl1_cs(void)
 
        struct cm4000_dev *dev;
 
        dev = link->priv;
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
        stop_monitor(dev);
 
        return 0;
        struct cm4000_dev *dev;
 
        dev = link->priv;
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
        if (link->open)
                start_monitor(dev);
 
 
        link->state &= ~DEV_CONFIG_PENDING;
 }
 
-static int reader_suspend(struct pcmcia_device *p_dev)
-{
-       dev_link_t *link = dev_to_instance(p_dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int reader_resume(struct pcmcia_device *p_dev)
-{
-       dev_link_t *link = dev_to_instance(p_dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 static void reader_release(dev_link_t *link)
 {
        cm4040_reader_release(link->priv);
        },
        .probe          = reader_attach,
        .remove         = reader_detach,
-       .suspend        = reader_suspend,
-       .resume         = reader_resume,
        .id_table       = cm4040_ids,
 };
 
 
        dev_link_t *link = dev_to_instance(dev);
        MGSLPC_INFO *info = link->priv;
 
-       link->state |= DEV_SUSPEND;
        info->stop = 1;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(dev);
        MGSLPC_INFO *info = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
        info->stop = 0;
 
        return 0;
 
     pcmcia_disable_device(link->handle);
 } /* ide_release */
 
-static int ide_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int ide_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
 
 /*======================================================================
 
        .probe          = ide_attach,
        .remove         = ide_detach,
        .id_table       = ide_ids,
-       .suspend        = ide_suspend,
-       .resume         = ide_resume,
 };
 
 static int __init init_ide_cs(void)
 
        pcmcia_disable_device(link->handle);
 } /* avmcs_release */
 
-static int avmcs_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int avmcs_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
-/*======================================================================
-
-    The card status event handler.  Mostly, this schedules other
-    stuff to run after an event is received.  A CARD_REMOVAL event
-    also sets some flags to discourage the net drivers from trying
-    to talk to the card any more.
-
-    When a CARD_REMOVAL event is received, we immediately set a flag
-    to block future accesses to this device.  All the functions that
-    actually access the device should check this flag to make sure
-    the card is still present.
-    
-======================================================================*/
-
 
 static struct pcmcia_device_id avmcs_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN-Controller B1", 0x95d42008, 0x845dc335),
        .probe = avmcs_attach,
        .remove = avmcs_detach,
        .id_table = avmcs_ids,
-       .suspend= avmcs_suspend,
-       .resume = avmcs_resume,
 };
 
 static int __init avmcs_init(void)
 
        pcmcia_disable_device(link->handle);
 } /* avma1cs_release */
 
-static int avma1cs_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int avma1cs_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 
 static struct pcmcia_device_id avma1cs_ids[] = {
        PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
        .probe          = avma1cs_attach,
        .remove         = avma1cs_detach,
        .id_table       = avma1cs_ids,
-       .suspend        = avma1cs_suspend,
-       .resume         = avma1cs_resume,
 };
- 
+
 /*====================================================================*/
 
 static int __init init_avma1_cs(void)
 
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
         dev->busy = 1;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
         dev->busy = 0;
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
        dev->stop = 1;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
        dev->stop = 0;
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
         dev->busy = 1;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
         dev->busy = 0;
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       tc574_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               tc574_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       tc589_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               tc589_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
+       if ((link->state & DEV_CONFIG) && (link->open))
                        netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       axnet_reset_8390(dev);
-                       AX88190_init(dev, 1);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               axnet_reset_8390(dev);
+               AX88190_init(dev, 1);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        com20020_dev_t *info = link->priv;
        struct net_device *dev = info->dev;
 
-       link->state |= DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               if (link->open) {
-                       netif_device_detach(dev);
-               }
-               pcmcia_release_configuration(link->handle);
-        }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        com20020_dev_t *info = link->priv;
        struct net_device *dev = info->dev;
 
-       link->state &= ~DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       int ioaddr = dev->base_addr;
-                       struct arcnet_local *lp = dev->priv;
-                       ARCRESET;
-               }
-        }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               int ioaddr = dev->base_addr;
+               struct arcnet_local *lp = dev->priv;
+               ARCRESET;
+       }
 
        return 0;
 }
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
-
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       fjn_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               fjn_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        ibmtr_dev_t *info = link->priv;
        struct net_device *dev = info->dev;
 
-       link->state |= DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-        }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        ibmtr_dev_t *info = link->priv;
        struct net_device *dev = info->dev;
 
-       link->state &= ~DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       ibmtr_probe(dev);       /* really? */
-                       netif_device_attach(dev);
-               }
-        }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               ibmtr_probe(dev);       /* really? */
+               netif_device_attach(dev);
+       }
 
        return 0;
 }
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
-
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       nmclan_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               nmclan_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       pcnet_reset_8390(dev);
-                       NS8390_init(dev, 1);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               pcnet_reset_8390(dev);
+               NS8390_init(dev, 1);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
                if (link->open)
                        netif_device_detach(dev);
        struct smc_private *smc = netdev_priv(dev);
        int i;
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
                if ((smc->manfid == MANFID_MEGAHERTZ) &&
                    (smc->cardid == PRODID_MEGAHERTZ_EM3288))
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open) {
+       if ((link->state & DEV_CONFIG) && (link->open)) {
                        netif_device_detach(dev);
                        do_powerdown(dev);
-               }
-               pcmcia_release_configuration(link->handle);
        }
 
        return 0;
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       do_reset(dev,1);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               do_reset(dev,1);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *local = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
+       if (link->state & DEV_CONFIG)
                netif_device_detach(local->eth_dev);
-               pcmcia_release_configuration(link->handle);
-       }
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        local_info_t *local = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
+       if ((link->state & DEV_CONFIG) && (link->open)) {
                reset_airo_card(local->eth_dev);
                netif_device_attach(local->eth_dev);
        }
 
        dev_link_t *link = dev_to_instance(dev);
        local_info_t *local = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
+       if (link->state & DEV_CONFIG)
                netif_device_detach(local->eth_dev);
-               pcmcia_release_configuration(link->handle);
-       }
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(dev);
        local_info_t *local = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
                atmel_open(local->eth_dev);
                netif_device_attach(local->eth_dev);
        }
 
 
        PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_SUSPEND\n", dev_info);
 
-       link->state |= DEV_SUSPEND;
-
        if (link->state & DEV_CONFIG) {
                struct hostap_interface *iface = netdev_priv(dev);
                if (iface && iface->local)
                        netif_device_detach(dev);
                }
                prism2_suspend(dev);
-               pcmcia_release_configuration(link->handle);
        }
 
        return 0;
 
        PDEBUG(DEBUG_EXTRA, "%s: CS_EVENT_PM_RESUME\n", dev_info);
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
                struct hostap_interface *iface = netdev_priv(dev);
                if (iface && iface->local)
                        dev_open = iface->local->num_dev_open > 0;
 
-               pcmcia_request_configuration(link->handle, &link->conf);
-
                prism2_hw_shutdown(dev, 1);
                prism2_hw_config(dev, dev_open ? 0 : 1);
                if (dev_open) {
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       netwave_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               netwave_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        int err = 0;
        unsigned long flags;
 
-       link->state |= DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
                /* This is probably racy, but I can't think of
                   a better way, short of rewriting the PCMCIA
 
                        spin_unlock_irqrestore(&priv->lock, flags);
                }
-
-               pcmcia_release_configuration(link->handle);
        }
 
        return 0;
        int err = 0;
        unsigned long flags;
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
-               /* FIXME: should we double check that this is
-                * the same card as we had before */
-               pcmcia_request_configuration(link->handle, &link->conf);
-
                if (! test_bit(0, &card->hard_reset_in_progress)) {
                        err = orinoco_reinit_firmware(dev);
                        if (err) {
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-
-               pcmcia_release_configuration(link->handle);
-        }
-
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-        if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       ray_reset(dev);
-                       netif_device_attach(dev);
-               }
-        }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               ray_reset(dev);
+               netif_device_attach(dev);
+       }
 
        return 0;
 }
 
        unsigned long flags;
        int err = 0;
 
-       link->state |= DEV_SUSPEND;
        /* Mark the device as stopped, to block IO until later */
        if (link->state & DEV_CONFIG) {
                spin_lock_irqsave(&priv->lock, flags);
                priv->hw_unavailable++;
 
                spin_unlock_irqrestore(&priv->lock, flags);
-
-               pcmcia_release_configuration(link->handle);
        }
 
        return 0;
        struct net_device *dev = link->priv;
        struct orinoco_private *priv = netdev_priv(dev);
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
-               /* FIXME: should we double check that this is
-                * the same card as we had before */
-               pcmcia_request_configuration(link->handle, &link->conf);
                netif_device_attach(dev);
                priv->hw_unavailable--;
                schedule_work(&priv->reset_work);
 
        /* Stop receiving new messages and wait end of transmission */
        wv_ru_stop(dev);
 
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
+
        /* Power down the module */
        hacr_write(dev->base_addr, HACR_DEFAULT & (~HACR_PWR_STAT));
 
-       /* The card is now suspended */
-       link->state |= DEV_SUSPEND;
-
-       if(link->state & DEV_CONFIG)
-       {
-               if(link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
-
        return 0;
 }
 
        struct net_device *     dev = (struct net_device *) link->priv;
 
        link->state &= ~DEV_SUSPEND;
-       if(link->state & DEV_CONFIG)
-       {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if(link->open)  /* If RESET -> True, If RESUME -> False ? */
-               {
-                       wv_hw_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               wv_hw_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        dev_link_t *link = dev_to_instance(p_dev);
        struct net_device *dev = link->priv;
 
-       link->state |= DEV_SUSPEND;
-
        wl3501_pwr_mgmt(dev->priv, WL3501_SUSPEND);
-       if (link->state & DEV_CONFIG) {
-               if (link->open)
-                       netif_device_detach(dev);
-               pcmcia_release_configuration(link->handle);
-       }
+       if ((link->state & DEV_CONFIG) && (link->open))
+               netif_device_detach(dev);
 
        return 0;
 }
        struct net_device *dev = link->priv;
 
        wl3501_pwr_mgmt(dev->priv, WL3501_RESUME);
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               if (link->open) {
-                       wl3501_reset(dev);
-                       netif_device_attach(dev);
-               }
+       if ((link->state & DEV_CONFIG) && (link->open)) {
+               wl3501_reset(dev);
+               netif_device_attach(dev);
        }
 
        return 0;
 
        pcmcia_disable_device(link->handle);
 } /* parport_cs_release */
 
-static int parport_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int parport_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
 
 static struct pcmcia_device_id parport_ids[] = {
        PCMCIA_DEVICE_FUNC_ID(3),
        .probe          = parport_attach,
        .remove         = parport_detach,
        .id_table       = parport_ids,
-       .suspend        = parport_suspend,
-       .resume         = parport_resume,
 };
 
 static int __init init_parport_cs(void)
 
  * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
  *
  * (C) 1999            David A. Hinds
- * (C) 2003 - 2005     Dominik Brodowski
+ * (C) 2003 - 2006     Dominik Brodowski
  */
 
 #include <linux/kernel.h>
 {
        struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
        struct pcmcia_driver *p_drv = NULL;
+       int ret;
 
        if (dev->driver)
                p_drv = to_pcmcia_drv(dev->driver);
 
-       if (p_drv && p_drv->suspend)
-               return p_drv->suspend(p_dev);
+       if (p_drv && p_drv->suspend) {
+               ret = p_drv->suspend(p_dev);
+               if (ret)
+                       return ret;
+               if (p_dev->instance) {
+                       p_dev->instance->state |= DEV_SUSPEND;
+                       if ((p_dev->instance->state & DEV_CONFIG) &&
+                           !(p_dev->instance->state & DEV_SUSPEND_NORELEASE))
+                               pcmcia_release_configuration(p_dev);
+               }
+       }
 
        return 0;
 }
 {
        struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
         struct pcmcia_driver *p_drv = NULL;
+       int ret;
 
        if (dev->driver)
                p_drv = to_pcmcia_drv(dev->driver);
 
-       if (p_drv && p_drv->resume)
+       if (p_drv && p_drv->resume) {
+               if (p_dev->instance) {
+                       p_dev->instance->state &= ~DEV_SUSPEND;
+                       if ((p_dev->instance->state & DEV_CONFIG) &&
+                           !(p_dev->instance->state & DEV_SUSPEND_NORELEASE)){
+                               ret = pcmcia_request_configuration(p_dev,
+                                                &p_dev->instance->conf);
+                               if (ret)
+                                       return ret;
+                       }
+               }
                return p_drv->resume(p_dev);
+       }
 
        return 0;
 }
 
        pcmcia_disable_device(link->handle);
 }
 
-static int aha152x_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
 static int aha152x_resume(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
        scsi_info_t *info = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-               aha152x_host_reset_host(info->host);
-       }
+       aha152x_host_reset_host(info->host);
 
        return 0;
 }
        .probe          = aha152x_attach,
        .remove         = aha152x_detach,
        .id_table       = aha152x_ids,
-       .suspend        = aha152x_suspend,
        .resume         = aha152x_resume,
 };
 
 
 
 /*====================================================================*/
 
-static int fdomain_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
 static int fdomain_resume(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
 
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
+       if (link->state & DEV_CONFIG)
                fdomain_16x0_bus_reset(NULL);
-       }
 
        return 0;
 }
        .probe          = fdomain_attach,
        .remove         = fdomain_detach,
        .id_table       = fdomain_ids,
-       .suspend        = fdomain_suspend,
        .resume         = fdomain_resume,
 };
 
 
        scsi_info_t *info = link->priv;
        nsp_hw_data *data;
 
-       link->state |= DEV_SUSPEND;
-
        nsp_dbg(NSP_DEBUG_INIT, "event: suspend");
 
        if (info->host != NULL) {
 
        info->stop = 1;
 
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
        return 0;
 }
 
 
        nsp_dbg(NSP_DEBUG_INIT, "event: resume");
 
-       link->state &= ~DEV_SUSPEND;
-
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
        info->stop = 0;
 
        if (info->host != NULL) {
 
 
 /*====================================================================*/
 
-static int qlogic_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
 static int qlogic_resume(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
                scsi_info_t *info = link->priv;
 
        .probe          = qlogic_attach,
        .remove         = qlogic_detach,
        .id_table       = qlogic_ids,
-       .suspend        = qlogic_suspend,
        .resume         = qlogic_resume,
 };
 
 
        return;
 } /* SYM53C500_config */
 
-static int sym53c500_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
 static int sym53c500_resume(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
        struct scsi_info_t *info = link->priv;
 
-       link->state &= ~DEV_SUSPEND;
        if (link->state & DEV_CONFIG) {
-               pcmcia_request_configuration(link->handle, &link->conf);
-
                /* See earlier comment about manufacturer IDs. */
                if ((info->manf_id == MANFID_MACNICA) ||
                    (info->manf_id == MANFID_PIONEER) ||
        .probe          = SYM53C500_attach,
        .remove         = SYM53C500_detach,
        .id_table       = sym53c500_ids,
-       .suspend        = sym53c500_suspend,
        .resume         = sym53c500_resume,
 };
 
 
 static int serial_suspend(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
-       link->state |= DEV_SUSPEND;
 
        if (link->state & DEV_CONFIG) {
                struct serial_info *info = link->priv;
                for (i = 0; i < info->ndev; i++)
                        serial8250_suspend_port(info->line[i]);
 
-               if (!info->slave)
-                       pcmcia_release_configuration(link->handle);
+               if (info->slave)
+                       link->state &= DEV_SUSPEND_NORELEASE;
        }
 
        return 0;
 static int serial_resume(struct pcmcia_device *dev)
 {
        dev_link_t *link = dev_to_instance(dev);
-       link->state &= ~DEV_SUSPEND;
 
        if (DEV_OK(link)) {
                struct serial_info *info = link->priv;
                int i;
 
-               if (!info->slave)
-                       pcmcia_request_configuration(link->handle, &link->conf);
-
                for (i = 0; i < info->ndev; i++)
                        serial8250_resume_port(info->line[i]);
        }
 
        pcmcia_disable_device(link->handle);
 }
 
-static int ixj_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int ixj_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (DEV_OK(link))
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 static struct pcmcia_device_id ixj_ids[] = {
        PCMCIA_DEVICE_MANF_CARD(0x0257, 0x0600),
        PCMCIA_DEVICE_NULL
        .probe          = ixj_attach,
        .remove         = ixj_detach,
        .id_table       = ixj_ids,
-       .suspend        = ixj_suspend,
-       .resume         = ixj_resume,
 };
 
 static int __init ixj_pcmcia_init(void)
 
        }
 }
 
-static int sl811_suspend(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state |= DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
-       return 0;
-}
-
-static int sl811_resume(struct pcmcia_device *dev)
-{
-       dev_link_t *link = dev_to_instance(dev);
-
-       link->state &= ~DEV_SUSPEND;
-       if (link->state & DEV_CONFIG)
-               pcmcia_request_configuration(link->handle, &link->conf);
-
-       return 0;
-}
-
 static int sl811_cs_attach(struct pcmcia_device *p_dev)
 {
        local_info_t *local;
        .probe          = sl811_cs_attach,
        .remove         = sl811_cs_detach,
        .id_table       = sl811_ids,
-       .suspend        = sl811_suspend,
-       .resume         = sl811_resume,
 };
 
 /*====================================================================*/
 
 /* Flags for device state */
 #define DEV_PRESENT            0x01
 #define DEV_CONFIG             0x02
-#define DEV_STALE_CONFIG       0x04    /* release on close */
-#define DEV_STALE_LINK         0x08    /* detach on release */
+#define DEV_SUSPEND_NORELEASE  0x04
 #define DEV_CONFIG_PENDING     0x10
 #define DEV_RELEASE_PENDING    0x20
 #define DEV_SUSPEND            0x40
 
        struct snd_pdacf *chip = link->priv;
 
        snd_printdd(KERN_DEBUG "SUSPEND\n");
-       link->state |= DEV_SUSPEND;
        if (chip) {
                snd_printdd(KERN_DEBUG "snd_pdacf_suspend calling\n");
                snd_pdacf_suspend(chip, PMSG_SUSPEND);
        }
 
-       snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
-
        return 0;
 }
 
        struct snd_pdacf *chip = link->priv;
 
        snd_printdd(KERN_DEBUG "RESUME\n");
-       link->state &= ~DEV_SUSPEND;
-
-       snd_printdd(KERN_DEBUG "CARD_RESET\n");
        if (DEV_OK(link)) {
-               snd_printdd(KERN_DEBUG "requestconfig...\n");
-               pcmcia_request_configuration(link->handle, &link->conf);
                if (chip) {
                        snd_printdd(KERN_DEBUG "calling snd_pdacf_resume\n");
                        snd_pdacf_resume(chip);
 
        struct vx_core *chip = link->priv;
 
        snd_printdd(KERN_DEBUG "SUSPEND\n");
-       link->state |= DEV_SUSPEND;
        if (chip) {
                snd_printdd(KERN_DEBUG "snd_vx_suspend calling\n");
                snd_vx_suspend(chip, PMSG_SUSPEND);
        }
-       snd_printdd(KERN_DEBUG "RESET_PHYSICAL\n");
-       if (link->state & DEV_CONFIG)
-               pcmcia_release_configuration(link->handle);
 
        return 0;
 }
        struct vx_core *chip = link->priv;
 
        snd_printdd(KERN_DEBUG "RESUME\n");
-       link->state &= ~DEV_SUSPEND;
-
-       snd_printdd(KERN_DEBUG "CARD_RESET\n");
        if (DEV_OK(link)) {
                //struct snd_vxpocket *vxp = (struct snd_vxpocket *)chip;
-               snd_printdd(KERN_DEBUG "requestconfig...\n");
-               pcmcia_request_configuration(link->handle, &link->conf);
                if (chip) {
                        snd_printdd(KERN_DEBUG "calling snd_vx_resume\n");
                        snd_vx_resume(chip);