login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
28
Re: PCMCIA insert on resume
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Rafael J. Wysocki <rjw@...>
To: Pavel Machek <pavel@...>
Cc: Rodolfo Giometti <giometti@...>, <linux-kernel@...>, Russell King <rmk+lkml@...>
Subject:
Re: PCMCIA insert on resume
Date: Sunday, October 28, 2007 - 2:55 pm
On Saturday, 27 October 2007 09:45, Pavel Machek wrote:
quoted text
> Hi! > > > I don't understand why, on resume, the function socket_resume() (in > > drivers/pcmcia/cs.c) do: > > > > if (!(skt->state & SOCKET_PRESENT)) { > > skt->state &= ~SOCKET_SUSPEND; > > return socket_insert(skt); > > } > > > > This cause a powered off socket before suspend to be powered on during > > resume. > > > > To avoid such (erroneous?) behaviour I propose this patch: > > > > 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; > > > > With this patch if the socket was powered down before the suspend, at > > resume time it's not powered on and you need a "pccardctl insert" to > > activate the socket. > > Seems okay to me, but I do not know much about pcmcia. Add > signed-off-by, changelog at the beggining, cc me, rafael and akpm... ?
Actually, there are some objections wrt this patch from Russell King. Greetings, Rafael -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
PCMCIA insert on resume
, Rodolfo Giometti
, (Wed Oct 24, 10:34 am)
Re: PCMCIA insert on resume
, Pavel Machek
, (Sat Oct 27, 3:45 am)
Re: PCMCIA insert on resume
, Rafael J. Wysocki
, (Sun Oct 28, 2:55 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Al Boldi
Re: [ck] Re: [ANNOUNCE] RSDL completely fair starvation free interactive cpu sched...
Ingo Molnar
Re: [patch] sched_clock(): cleanups
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Amit K. Arora
[RFC] Heads up on sys_fallocate()
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 18/37] dccp: Support for Mandatory options
Denys Vlasenko
[PATCH 1/2] bnx2: factor out gzip unpacker
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
992 guests
online.
Online users
zeekec
Syndicate