[PATCH] Fix PCMCIA resume with card inserted

Russell King rmk at arm.linux.org.uk
Sun Mar 20 10:42:00 EST 2005


The following patch fixes a minor but annoying issue with PCMCIA
resume.  When a machine is suspended with an empty socket, and
then resumed with a card in the socket, the card is ignored.  The
following patch adjusts the resume paths such that we detect the
card and properly initialise it.

Signed-off-by: Russell King <rmk at arm.linux.org.uk>

--- orig/drivers/pcmcia/cs.c	Sat Mar 19 11:22:12 2005
+++ linux/drivers/pcmcia/cs.c	Sun Mar 20 15:27:37 2005
@@ -587,6 +587,11 @@ static int socket_resume(struct pcmcia_s
 	skt->ops->init(skt);
 	skt->ops->set_socket(skt, &skt->socket);
 
+	if (!(skt->state & SOCKET_PRESENT)) {
+		skt->state &= ~SOCKET_SUSPEND;
+		return socket_insert(skt);
+	}
+
 	ret = socket_setup(skt, resume_delay);
 	if (ret == CS_SUCCESS) {
 		/*

-- 
Russell King




More information about the linux-pcmcia mailing list