Re: software suspend in 2.5.70-mm3.

hugang (hugang@soulinfo.com)
Tue, 3 Jun 2003 22:35:11 +0800


On 03 Jun 2003 14:22:48 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

> On Maw, 2003-06-03 at 14:11, hugang wrote:
> > Hi Pavel Machek:
> >
> > I try the 2.5.70-mm3 with software suspend function. When suspend it will oops at ide-disk.c 1526 line
> > BUG_ON (HWGROUP(drive)->handler);
> >
> > I'm disable this check, The software suspend can work, and also can resumed. But this fix is not best way. I found in ide-io.c 1196
> > hwgroup->handler = NULL;
> > is the problem.
>
> The only way to make the suspend work properly is to queue the suspend
> sequence wit the other requests. Ben was doing some playing with this
> but I'm not sure what happened to it.
>
Yes the above patch is not safe, When i'm run updatedb and suspsned, After resume will oops at kjournal.

Here is another test on it, it can works with updatedb.
-
I found a best way to fix it. here is it. With the patch, I'm run updatedb and suspend for 5 counts, every things is ok.

--- ide-disk.c.old Tue Jun 3 22:22:13 2003
+++ ide-disk.c Tue Jun 3 22:16:22 2003
@@ -1523,7 +1523,10 @@
do_idedisk_standby(drive);
drive->blocked = 1;

- BUG_ON (HWGROUP(drive)->handler);
+ /*BUG_ON (HWGROUP(drive)->handler);*/
+ while(HWGROUP(drive)->handler) {
+ schedule();
+ }
return 0;
}

-- 
Hu Gang / Steve
Email        : huagng@soulinfo.com, steve@soulinfo.com
GPG FinePrint: 4099 3F1D AE01 1817 68F7  D499 A6C2 C418 86C8 610E
http://soulinfo.com/~hugang/HuGang.asc
ICQ#         : 205800361
Registered Linux User : 204016
-
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/