login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
7
Re: [PATCH] mtd/chips: add missing set_current_state() to cfi_{amdstd,staa}_sync()
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Dmitry Adamushko <dmitry.adamushko@...>
Cc: <linux-mtd@...>, <dwmw2@...>, <linux-kernel@...>
Subject:
Re: [PATCH] mtd/chips: add missing set_current_state() to cfi_{amdstd,staa}_sync()
Date: Monday, April 7, 2008 - 7:15 pm
On Thu, 03 Apr 2008 21:38:23 +0200 Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:
quoted text
> From: Dmitry Adamushko <dmitry.adamushko@gmail.com> > Subject: [mtd/chips] add missing set_current_state() to cfi_{amdstd,staa}_sync() > > cfi_amdstd_sync() and cfi_staa_sync() call schedule() without changing > task's state appropriately. > > In case of e.g. chip->state == FL_ERASING, cfi_*_sync() will be busy-looping > either redundantly for a fixed interval of time (for SCHED_NORMAL tasks) or > possibly endlessly (for RT tasks and UP). > > Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com> > > --- > > diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c > index d072e87..458d477 100644 > --- a/drivers/mtd/chips/cfi_cmdset_0002.c > +++ b/drivers/mtd/chips/cfi_cmdset_0002.c > @@ -1763,6 +1763,7 @@ static void cfi_amdstd_sync (struct mtd_info *mtd) > > default: > /* Not an idle state */ > + set_current_state(TASK_UNINTERRUPTIBLE); > add_wait_queue(&chip->wq, &wait); > > spin_unlock(chip->mutex); > diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c > index b344ff8..492e2ab 100644 > --- a/drivers/mtd/chips/cfi_cmdset_0020.c > +++ b/drivers/mtd/chips/cfi_cmdset_0020.c > @@ -1015,6 +1015,7 @@ static void cfi_staa_sync (struct mtd_info *mtd) > > default: > /* Not an idle state */ > + set_current_state(TASK_UNINTERRUPTIBLE); > add_wait_queue(&chip->wq, &wait); > > spin_unlock_bh(chip->mutex);
The change certainly looks correct. Has it been runtime tested? Thanks. --
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:
[PATCH] mtd/chips: add missing set_current_state() to cfi_{a...
, Dmitry Adamushko
, (Thu Apr 3, 3:38 pm)
Re: [PATCH] mtd/chips: add missing set_current_state() to cf...
, Andrew Morton
, (Mon Apr 7, 7:15 pm)
Re: [PATCH] mtd/chips: add missing set_current_state() to cf...
, Dmitry Adamushko
, (Tue Apr 8, 4:21 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Justin C. Sherrill
Mailing list archive
Ingo Molnar
[patch 08/13] syslets: x86, add move_user_context() method
git
:
linux-netdev
:
Steven Rostedt
Re: -rt scheduling: wakeup bug?
David Miller
[GIT]: Networking
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
12 users
and
924 guests
online.
Online users
strcmp
zeekec
laptopsetlczw
michellestarl27
childrensfurni
electricpatioh
loanschicagopx
torontomortgag
razmikmckayjzs
findphonenumbe
extralongshowe
xphomenetworkt
Syndicate