aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/com20020_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/com20020_cs.c')
-rw-r--r--drivers/net/pcmcia/com20020_cs.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index a0ec5e7aacc6..0748c3d49544 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -387,13 +387,8 @@ static int com20020_suspend(struct pcmcia_device *p_dev)
387 com20020_dev_t *info = link->priv; 387 com20020_dev_t *info = link->priv;
388 struct net_device *dev = info->dev; 388 struct net_device *dev = info->dev;
389 389
390 link->state |= DEV_SUSPEND; 390 if ((link->state & DEV_CONFIG) && (link->open))
391 if (link->state & DEV_CONFIG) { 391 netif_device_detach(dev);
392 if (link->open) {
393 netif_device_detach(dev);
394 }
395 pcmcia_release_configuration(link->handle);
396 }
397 392
398 return 0; 393 return 0;
399} 394}
@@ -404,15 +399,11 @@ static int com20020_resume(struct pcmcia_device *p_dev)
404 com20020_dev_t *info = link->priv; 399 com20020_dev_t *info = link->priv;
405 struct net_device *dev = info->dev; 400 struct net_device *dev = info->dev;
406 401
407 link->state &= ~DEV_SUSPEND; 402 if ((link->state & DEV_CONFIG) && (link->open)) {
408 if (link->state & DEV_CONFIG) { 403 int ioaddr = dev->base_addr;
409 pcmcia_request_configuration(link->handle, &link->conf); 404 struct arcnet_local *lp = dev->priv;
410 if (link->open) { 405 ARCRESET;
411 int ioaddr = dev->base_addr; 406 }
412 struct arcnet_local *lp = dev->priv;
413 ARCRESET;
414 }
415 }
416 407
417 return 0; 408 return 0;
418} 409}