1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

- When doing suspend/resume, only try to suspend those drivers on active

slots.  Otherwise, we try to suspend drivers who have been disabled
  already.

[
The only reason the drivers are still on the list is because of race
conditions where the card is removed while the driver is in use.  We
leave the drivers on the slot list (leaving all of their structures in
place in case a process is using it) but set it's state to empty so that
further uses by the pccard code know not to expect active cards.
]
This commit is contained in:
Nate Williams 1997-10-23 02:30:39 +00:00
parent 63ea538413
commit 2e6bafc0a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30660

View File

@ -355,8 +355,10 @@ slot_suspend(void *arg)
struct slot *sp = arg;
struct pccard_dev *dp;
for (dp = sp->devices; dp; dp = dp->next)
(void)dp->drv->suspend(dp);
if (slot->state == filled) {
for (dp = sp->devices; dp; dp = dp->next)
(void)dp->drv->suspend(dp);
}
sp->ctrl->disable(sp);
return (0);
}
@ -387,8 +389,10 @@ slot_resume(void *arg)
sp->ctrl->power(sp);
if (sp->irq)
sp->ctrl->mapirq(sp, sp->irq);
for (dp = sp->devices; dp; dp = dp->next)
(void)dp->drv->init(dp, 0);
if (slot->state == filled) {
for (dp = sp->devices; dp; dp = dp->next)
(void)dp->drv->init(dp, 0);
}
}
return (0);
}