aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/xirc2ps_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/xirc2ps_cs.c')
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 2b57a87371f3..19347bcb2f15 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -1109,13 +1109,9 @@ static int xirc2ps_suspend(struct pcmcia_device *p_dev)
1109 dev_link_t *link = dev_to_instance(p_dev); 1109 dev_link_t *link = dev_to_instance(p_dev);
1110 struct net_device *dev = link->priv; 1110 struct net_device *dev = link->priv;
1111 1111
1112 link->state |= DEV_SUSPEND; 1112 if ((link->state & DEV_CONFIG) && (link->open)) {
1113 if (link->state & DEV_CONFIG) {
1114 if (link->open) {
1115 netif_device_detach(dev); 1113 netif_device_detach(dev);
1116 do_powerdown(dev); 1114 do_powerdown(dev);
1117 }
1118 pcmcia_release_configuration(link->handle);
1119 } 1115 }
1120 1116
1121 return 0; 1117 return 0;
@@ -1126,13 +1122,9 @@ static int xirc2ps_resume(struct pcmcia_device *p_dev)
1126 dev_link_t *link = dev_to_instance(p_dev); 1122 dev_link_t *link = dev_to_instance(p_dev);
1127 struct net_device *dev = link->priv; 1123 struct net_device *dev = link->priv;
1128 1124
1129 link->state &= ~DEV_SUSPEND; 1125 if ((link->state & DEV_CONFIG) && (link->open)) {
1130 if (link->state & DEV_CONFIG) { 1126 do_reset(dev,1);
1131 pcmcia_request_configuration(link->handle, &link->conf); 1127 netif_device_attach(dev);
1132 if (link->open) {
1133 do_reset(dev,1);
1134 netif_device_attach(dev);
1135 }
1136 } 1128 }
1137 1129
1138 return 0; 1130 return 0;