[PATCH] PCMCIA: prevent auto insert during resume.



If a socket has been ejected before sleeping, at resume time it
shouldn't be awaked.

Signed-off-by: Rodolfo Giometti <giometti@xxxxxxxx>
---
drivers/pcmcia/cs.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 729e37d..d69de74 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -562,10 +562,8 @@ static int socket_resume(struct pcmcia_socket *skt)
skt->ops->init(skt);
skt->ops->set_socket(skt, &skt->socket);

- if (!(skt->state & SOCKET_PRESENT)) {
- skt->state &= ~SOCKET_SUSPEND;
- return socket_insert(skt);
- }
+ if (!(skt->state & SOCKET_PRESENT))
+ goto resume_exit;

ret = socket_setup(skt, SS_COMA, resume_delay);
if (ret == CS_SUCCESS) {
@@ -599,6 +597,7 @@ static int socket_resume(struct pcmcia_socket *skt)
socket_shutdown(skt);
}

+resume_exit:
skt->state &= ~SOCKET_SUSPEND;

return CS_SUCCESS;
--
1.5.2.5

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Linux poll() again
    ... On Thu, 11 May 2006, Nishanth Aravamudan wrote: ... A socket isn't a file-system and the ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH] bluetooth : rfcomm tty BUG_ON() code fix
    ... /* It's safe to call module_puthere because socket still ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH 15/40] KVM: Disable pagefaults during copy_from_user_inatomic()
    ... this is needed in order to disable the fault-in ... code from sleeping. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [patch 3/9] x86: threadinfo: Merge thread sync state definitions
    ... x86_64 has an additional TS_COMPAT that is harmless ... and not sleeping */ ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: Error binding socket: address already in use
    ... How can I overcome this problem? ... man 7 socket ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)