patch-2.3.46 linux/drivers/pcmcia/cs.c
Next file: linux/drivers/pcmcia/cs_internal.h
Previous file: linux/drivers/pci/pcisyms.c
Back to the patch index
Back to the overall index
- Lines: 112
- Date:
Tue Feb 15 08:53:46 2000
- Orig file:
v2.3.45/linux/drivers/pcmcia/cs.c
- Orig date:
Thu Feb 10 17:11:12 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
@@ -2,7 +2,7 @@
PCMCIA Card Services -- core services
- cs.c 1.247 2000/01/15 04:30:35
+ cs.c 1.249 2000/02/10 23:26:11
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
@@ -69,7 +69,7 @@
int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
static const char *version =
-"cs.c 1.247 2000/01/15 04:30:35 (David Hinds)";
+"cs.c 1.249 2000/02/10 23:26:11 (David Hinds)";
#endif
#ifdef CONFIG_PCI
@@ -341,6 +341,7 @@
s->sock = ns;
s->setup.data = sockets;
s->setup.function = &setup_socket;
+ s->setup_timeout = 0;
s->shutdown.data = sockets;
s->shutdown.function = &shutdown_socket;
/* base address = 0, map = 0 */
@@ -486,7 +487,17 @@
socket_info_t *s = socket_table[i];
get_socket_status(s, &val);
- if (val & SS_DETECT) {
+ if (val & SS_PENDING) {
+ /* Does the socket need more time? */
+ DEBUG(2, "cs: setup_socket(%ld): status pending\n", i);
+ if (++s->setup_timeout > 100) {
+ printk(KERN_NOTICE "cs: socket %ld voltage interrogation"
+ " timed out\n", i);
+ } else {
+ s->setup.expires = jiffies + HZ/10;
+ add_timer(&s->setup);
+ }
+ } else if (val & SS_DETECT) {
DEBUG(1, "cs: setup_socket(%ld): applying power\n", i);
s->state |= SOCKET_PRESENT;
s->socket.flags = 0;
@@ -532,7 +543,7 @@
udelay((long)reset_time);
s->socket.flags &= ~SS_RESET;
set_socket(s, &s->socket);
- s->unreset_timeout = 0;
+ s->setup_timeout = 0;
s->setup.expires = jiffies + unreset_delay;
s->setup.function = &unreset_socket;
add_timer(&s->setup);
@@ -571,12 +582,11 @@
}
} else {
DEBUG(2, "cs: socket %ld not ready yet\n", i);
- if (s->unreset_timeout > unreset_limit) {
+ if (++s->setup_timeout > unreset_limit) {
printk(KERN_NOTICE "cs: socket %ld timed out during"
" reset\n", i);
s->state &= ~EVENT_MASK;
} else {
- s->unreset_timeout++;
s->setup.expires = jiffies + unreset_check;
add_timer(&s->setup);
}
@@ -1156,6 +1166,8 @@
return s->cap.cb_dev->subordinate;
}
+EXPORT_SYMBOL(pcmcia_lookup_bus);
+
#endif
/*======================================================================
@@ -2188,7 +2200,7 @@
{
memory_handle_t m;
int ret = pcmcia_open_memory(a1, a2, &m);
- (memory_handle_t *)a1 = m;
+ *(memory_handle_t *)a1 = m;
return ret;
}
break;
@@ -2202,7 +2214,7 @@
{
eraseq_handle_t w;
int ret = pcmcia_register_erase_queue(a1, a2, &w);
- (eraseq_handle_t *)a1 = w;
+ *(eraseq_handle_t *)a1 = w;
return ret;
}
break;
@@ -2227,7 +2239,7 @@
{
window_handle_t w;
int ret = pcmcia_request_window(a1, a2, &w);
- (window_handle_t *)a1 = w;
+ *(window_handle_t *)a1 = w;
return ret;
}
break;
@@ -2297,7 +2309,6 @@
EXPORT_SYMBOL(pcmcia_get_status);
EXPORT_SYMBOL(pcmcia_get_tuple_data);
EXPORT_SYMBOL(pcmcia_insert_card);
-EXPORT_SYMBOL(pcmcia_lookup_bus);
EXPORT_SYMBOL(pcmcia_map_mem_page);
EXPORT_SYMBOL(pcmcia_modify_configuration);
EXPORT_SYMBOL(pcmcia_modify_window);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)