public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jiri Slaby <jirislaby@gmail.com>, Jason Lunz <lunz@gehennom.net>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, andre@linux-ide.org, pavel@suse.cz,
	linux-pm@osdl.org, linux-ide@vger.kernel.org
Subject: Re: swsusp regression [Was: 2.6.18-rc3-mm2]
Date: Tue, 8 Aug 2006 13:07:26 +0200	[thread overview]
Message-ID: <20060808110726.GN4025@suse.de> (raw)
In-Reply-To: <20060808110447.GM4025@suse.de>

On Tue, Aug 08 2006, Jens Axboe wrote:
> On Tue, Aug 08 2006, Rafael J. Wysocki wrote:
> > On Tuesday 08 August 2006 12:43, Jens Axboe wrote:
> > > On Tue, Aug 08 2006, Jiri Slaby wrote:
> > > > Rafael J. Wysocki wrote:
> > > > >On Monday 07 August 2006 18:23, Jason Lunz wrote:
> > > > >>In gmane.linux.kernel, you wrote:
> > > > >>>>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/
> > > > >>>I tried it and guess what :)... swsusp doesn't work :@.
> > > > >>>
> > > > >>>This time I was able to dump process states with sysrq-t:
> > > > >>>http://www.fi.muni.cz/~xslaby/sklad/ide2.gif
> > > > >>>
> > > > >>>My guess is ide2/2.0 dies (hpt370 driver), since last thing kernel 
> > > > >>>prints is suspending device 2.0
> > > > >>Does it go away if you revert this?
> > > > >>ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc3/2.6.18-rc3-mm2/broken-out/ide-reprogram-disk-pio-timings-on-resume.patch
> > > > >>
> > > > >>That should only affect resume, not suspend, but it does mess around
> > > > >>with ide power management. Is this maybe happening on the *second*
> > > > >>suspend?
> > > > >>
> > > > >>>-hdc: ATAPI 63X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
> > > > >>>+hdc: ATAPI CD-ROM drive, 0kB Cache, UDMA(33)
> > > > >>This looks suspicious. -mm does have several ide-fix-hpt3xx patches.
> > > > >
> > > > >I found that git-block.patch broke the suspend for me.  Still have no idea
> > > > >what's up with it.
> > > > 
> > > > I suspect elevator changes. The wait_for_completion is not woken in
> > > > ide-io by ll_rw_blk. But I don't understand block layer too much.
> > > 
> > > The ide changes are far more likely, it's probably missing a completion.
> > 
> > Actually I think the commit f74bf2e6b415588e562fdcfdd454d587eb33cd46
> > (Remove ->waiting member from struct request) is wrong, because
> > generic_ide_suspend() uses the end_of_io member of rq to pass the PM data
> > to ide_do_drive_cmd() where the pointer gets overwritten by &wait (must_wait
> > is "true", because action == ide_wait).  Previously &wait was stored in
> > rq->waiting and it didn't overwrite the PM data.
> 
> Indeed, that looks broken now. That must be what is screwing it up. With
> the former patch applied, did cdrom detection still look funny to you?
> 
> I'll concoct a fix for that breakage.

Something like this.

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index db647a9..38479a2 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -141,7 +141,7 @@ enum {
 
 static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error)
 {
-	struct request_pm_state *pm = rq->end_io_data;
+	struct request_pm_state *pm = rq->data;
 
 	if (drive->media != ide_disk)
 		return;
@@ -164,7 +164,7 @@ static void ide_complete_power_step(ide_
 
 static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq)
 {
-	struct request_pm_state *pm = rq->end_io_data;
+	struct request_pm_state *pm = rq->data;
 	ide_task_t *args = rq->special;
 
 	memset(args, 0, sizeof(*args));
@@ -421,7 +421,7 @@ void ide_end_drive_cmd (ide_drive_t *dri
 			}
 		}
 	} else if (blk_pm_request(rq)) {
-		struct request_pm_state *pm = rq->end_io_data;
+		struct request_pm_state *pm = rq->data;
 #ifdef DEBUG_PM
 		printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n",
 			drive->name, rq->pm->pm_step, stat, err);
@@ -933,7 +933,7 @@ #endif
 
 static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
 {
-	struct request_pm_state *pm = rq->end_io_data;
+	struct request_pm_state *pm = rq->data;
 
 	if (blk_pm_suspend_request(rq) &&
 	    pm->pm_step == ide_pm_state_start_suspend)
@@ -1018,7 +1018,7 @@ #endif
 		    rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
 			return execute_drive_cmd(drive, rq);
 		else if (blk_pm_request(rq)) {
-			struct request_pm_state *pm = rq->end_io_data;
+			struct request_pm_state *pm = rq->data;
 #ifdef DEBUG_PM
 			printk("%s: start_power_step(step: %d)\n",
 				drive->name, rq->pm->pm_step);
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index d7b4499..0fd1e1c 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1219,7 +1219,7 @@ static int generic_ide_suspend(struct de
 	memset(&args, 0, sizeof(args));
 	rq.cmd_type = REQ_TYPE_PM_SUSPEND;
 	rq.special = &args;
-	rq.end_io_data = &rqpm;
+	rq.data = &rqpm;
 	rqpm.pm_step = ide_pm_state_start_suspend;
 	rqpm.pm_state = state.event;
 
@@ -1238,7 +1238,7 @@ static int generic_ide_resume(struct dev
 	memset(&args, 0, sizeof(args));
 	rq.cmd_type = REQ_TYPE_PM_RESUME;
 	rq.special = &args;
-	rq.end_io_data = &rqpm;
+	rq.data = &rqpm;
 	rqpm.pm_step = ide_pm_state_start_resume;
 	rqpm.pm_state = PM_EVENT_ON;
 

-- 
Jens Axboe


  reply	other threads:[~2006-08-08 11:06 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-06 10:08 2.6.18-rc3-mm2 Andrew Morton
2006-08-06 11:09 ` 2.6.18-rc3-mm2 Michal Piotrowski
2006-08-07  9:52   ` 2.6.18-rc3-mm2 Balbir Singh
2006-08-07 12:16     ` 2.6.18-rc3-mm2 Michal Piotrowski
2006-08-07 14:05       ` 2.6.18-rc3-mm2 Balbir Singh
2006-08-06 13:33 ` 2.6.18-rc3-mm2 Mattia Dongili
2006-08-06 14:55   ` 2.6.18-rc3-mm2 [BUG at mm/vmscan.c:383!] Hugh Dickins
2006-08-06 17:02     ` Mattia Dongili
2006-08-06 14:11 ` 2.6.18-rc3-mm2 Reuben Farrelly
     [not found] ` <b637ec0b0608060848k22af58cbo6f13cee19498c2d2@mail.gmail.com>
2006-08-06 19:09   ` 2.6.18-rc3-mm2 Andrew Morton
2006-08-07  2:18     ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-07 18:47       ` 2.6.18-rc3-mm2 Fabio Comolli
2006-08-07 19:00         ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-08 14:41           ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-08 17:42             ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-08 18:16               ` 2.6.18-rc3-mm2 Fabio Comolli
2006-08-08 18:24                 ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-08 18:36                   ` 2.6.18-rc3-mm2 Fabio Comolli
2006-08-09  3:47                     ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-09  7:11                       ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-09 19:47                       ` 2.6.18-rc3-mm2 Fabio Comolli
2006-08-09 20:13                         ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-08 20:32               ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-08 18:14           ` 2.6.18-rc3-mm2 Fabio Comolli
2006-08-06 22:42 ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-06 22:54   ` 2.6.18-rc3-mm2 Andrew Morton
2006-08-07  9:15     ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-07 20:34       ` 2.6.18-rc3-mm2 Rafael J. Wysocki
2006-08-07 20:55         ` 2.6.18-rc3-mm2 Andrew Morton
2006-08-08  5:21           ` 2.6.18-rc3-mm2 Jens Axboe
2006-08-07  2:18   ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-07  2:20     ` 2.6.18-rc3-mm2 Dmitry Torokhov
2006-08-07  2:07 ` 2.6.18-rc3-mm2 Grant Coady
2006-08-07  9:28 ` swsusp regression [Was: 2.6.18-rc3-mm2] Jiri Slaby
2006-08-07 16:23   ` Jason Lunz
2006-08-07 20:47     ` Rafael J. Wysocki
2006-08-08  8:41       ` Jens Axboe
2006-08-08  9:49         ` Jiri Slaby
2006-08-08 10:43           ` Jens Axboe
2006-08-08 10:08       ` Jiri Slaby
2006-08-08 10:43         ` Jens Axboe
2006-08-08 10:59           ` Rafael J. Wysocki
2006-08-08 11:04             ` Jens Axboe
2006-08-08 11:07               ` Jens Axboe [this message]
2006-08-08 11:16                 ` Rafael J. Wysocki
2006-08-08 11:19                   ` Jens Axboe
2006-08-08 13:50                     ` Rafael J. Wysocki
2006-08-08 14:06                       ` Jens Axboe
2006-08-08 16:41                         ` Jiri Slaby
2006-08-08 17:53                           ` Jens Axboe
2006-08-07 21:09     ` Jiri Slaby
2006-08-07 13:40 ` x86_64 command line truncated Andy Whitcroft
2006-08-07 14:05   ` Andi Kleen
2006-08-07 14:37     ` x86_64 command line truncated II Andi Kleen
2006-08-07 14:42       ` Andy Whitcroft
2006-08-07 14:46         ` Andi Kleen
2006-08-07 15:04           ` Andy Whitcroft
2006-08-07 15:12             ` [PATCH] x86_64 dirty fix to restore dual command line store Andy Whitcroft
2006-08-07 21:47               ` Keith Mannthey
2006-08-07 21:59                 ` Keith Mannthey
2006-08-07 14:38     ` x86_64 command line truncated Andy Whitcroft
2006-08-07 15:15       ` Andrew Morton
2006-08-07 15:58         ` Andi Kleen
2006-08-07 15:49 ` [-mm patch] make arch/i386/kernel/acpi/boot.c:acpi_force static Adrian Bunk
2006-08-07 16:07   ` Andi Kleen
2006-08-07 15:49 ` [-mm patch] make arch/i386/kernel/apic.c:enable_local_apic static Adrian Bunk
2006-08-07 15:49 ` [-mm patch] net/: make code static Adrian Bunk
2006-08-08  4:51   ` David Miller
2006-08-07 15:50 ` [-mm patch] drivers/crypto/geode-aes.c: cleanups Adrian Bunk
2006-08-07 19:38 ` resume from S3 regression [Was: 2.6.18-rc3-mm2] Mattia Dongili
2006-08-07 20:02   ` Andrew Morton
2006-08-07 20:57     ` Mattia Dongili
2006-08-07 22:09       ` Mattia Dongili
2006-08-07 21:04 ` [RFC: -mm patch] bcm43xx_main.c: remove 3 functions Adrian Bunk
2006-08-08 18:32   ` Michael Buesch
2006-08-08 19:42     ` Adrian Bunk
2006-08-09  4:47       ` Michael Buesch
2006-08-08 22:14     ` Jeff Garzik
2006-08-08 14:39 ` 2.6.18-rc3-mm2: reiserfs problem? Rafael J. Wysocki
2006-08-08 15:12   ` Andrew Morton
     [not found]   ` <20060804192540.17098.39244.stgit@warthog.cambridge.redhat.com>
2006-08-08 17:23     ` [PATCH] ReiserFS: Make sure all dentries refs are released before calling kill_block_super() David Howells
2006-08-08 23:16       ` Rafael J. Wysocki
2006-08-09 10:14         ` David Howells
2006-08-09 10:23           ` Rafael J. Wysocki
2006-08-09 11:00         ` David Howells
2006-08-09 13:43     ` [PATCH] ReiserFS: Make sure all dentries refs are released before calling kill_block_super() [try #2] David Howells
2006-08-09 21:56       ` Rafael J. Wysocki
2006-08-10 10:16         ` David Howells
2006-08-09 19:06 ` 2.6.18-rc3-mm2 - ext3 locking issue? Valdis.Kletnieks
2006-08-09 20:01   ` Andrew Morton
2006-08-09 20:43     ` Valdis.Kletnieks
2006-08-10  3:32       ` Valdis.Kletnieks
2006-08-10 11:40         ` Jiri Slaby
2006-08-10 15:27           ` Andrew Morton
2006-08-10 17:33             ` Mattia Dongili
2006-08-10 17:43               ` Jiri Slaby
2006-08-10 17:44               ` Valdis.Kletnieks
2006-08-11  6:17                 ` Andrew Morton
2006-08-11  6:55                   ` Valdis.Kletnieks
2006-08-11 22:39           ` Laurent Riffard
2006-08-15 23:38   ` Valdis.Kletnieks
2006-08-10  9:04 ` 2.6.18-rc3-mm2 - OOM storm Laurent Riffard
2006-08-10  9:19   ` Andrew Morton
2006-08-10 23:20     ` Laurent Riffard
2006-08-11 12:31       ` Laurent Riffard
2006-08-11 21:50         ` Mike Galbraith
2006-08-11  8:33     ` Mike Galbraith
2006-08-11  6:55       ` Andrew Morton
2006-08-11  9:37         ` Mike Galbraith
2006-08-12 15:07     ` [patch] " Mike Galbraith
2006-08-12 21:26       ` Laurent Riffard
2006-08-10 12:13 ` [patch] Use rwsems instead of custom locking scheme in net/socket.c and net/dccp/ccid.c Frederik Deweerdt
2006-08-10 12:57   ` David Miller
2006-08-10 13:19     ` Frederik Deweerdt
2006-08-10 13:43 ` 2.6.18-rc3-mm2 [oops: shrink_dcache_for_umount_subtree ?] Reuben Farrelly
2006-08-10 15:38   ` Andrew Morton
2006-08-10 17:38 ` 2.6.18-rc3-mm2 - IPV6_MULTIPLE_TABLES borked Valdis.Kletnieks
2006-08-10 20:02   ` Patrick McHardy
2006-08-10 21:44     ` Valdis.Kletnieks
2006-08-11  2:15 ` 2.6.18-rc3-mm2 - BUG in rt6_lookup() from ipv6_del_addr() Valdis.Kletnieks
2006-08-11  4:20   ` David Miller
2006-08-11 18:11 ` 2.6.18-rc3-mm2 Mark Haverkamp
2006-08-11 18:36   ` 2.6.18-rc3-mm2 Andrew Morton
2006-08-11 20:31     ` 2.6.18-rc3-mm2 Mark Haverkamp
2006-08-11 22:58       ` 2.6.18-rc3-mm2 Andrew Morton
2006-08-23 17:02         ` 2.6.18-rc3-mm2 Mark Haverkamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060808110726.GN4025@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=andre@linux-ide.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@osdl.org \
    --cc=lunz@gehennom.net \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox