return ret;
} /* send_event */
-#define cs_to_timeout(cs) (((cs) * HZ + 99) / 100)
-
static void socket_remove_drivers(struct pcmcia_socket *skt)
{
client_t *client;
socket_remove_drivers(skt);
skt->state &= SOCKET_INUSE|SOCKET_PRESENT;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(shutdown_delay));
+ msleep(shutdown_delay * 10);
skt->state &= SOCKET_INUSE;
shutdown_socket(skt);
}
skt->socket.flags &= ~SS_RESET;
skt->ops->set_socket(skt, &skt->socket);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(unreset_delay));
+ msleep(unreset_delay * 10);
for (i = 0; i < unreset_limit; i++) {
skt->ops->get_status(skt, &status);
if (status & SS_READY)
return CS_SUCCESS;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(unreset_check));
+ msleep(unreset_check * 10);
}
cs_err(skt, "time out after reset.\n");
if (!(status & SS_DETECT))
return CS_NO_CARD;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(initial_delay));
+ msleep(initial_delay * 10);
for (i = 0; i < 100; i++) {
skt->ops->get_status(skt, &status);
if (!(status & SS_PENDING))
break;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(10));
+ msleep(100);
}
if (status & SS_PENDING) {
/*
* Wait "vcc_settle" for the supply to stabilise.
*/
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(vcc_settle));
+ msleep(vcc_settle * 10);
skt->ops->get_status(skt, &status);
if (!(status & SS_POWERON)) {
if (!(skt->state & SOCKET_SUSPEND)) {
int status;
- if (!(skt->state & SOCKET_PRESENT)) {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(cs_to_timeout(2));
- }
+ if (!(skt->state & SOCKET_PRESENT))
+ msleep(20);
skt->ops->get_status(skt, &status);
if ((skt->state & SOCKET_PRESENT) &&
(*handle)->dev_info, s);
if (!win->ctl.res)
return CS_IN_USE;
- win->ctl.sys_start = win->ctl.res->start;
- win->ctl.sys_stop = win->ctl.res->end;
- } else {
- win->ctl.sys_start = req->Base;
- win->ctl.sys_stop = req->Base + req->Size - 1;
}
(*handle)->state |= CLIENT_WIN_REQ(w);
s->state |= SOCKET_WIN_REQ(w);
/* Return window handle */
- req->Base = win->ctl.sys_start;
+ if (s->features & SS_CAP_STATIC_MAP) {
+ req->Base = win->ctl.static_start;
+ } else {
+ req->Base = win->ctl.res->start;
+ }
*wh = win;
return CS_SUCCESS;