Re: New Software Suspend Patch for testing.

Pavel Machek (pavel@ucw.cz)
Sat, 5 Apr 2003 01:03:21 +0200


Hi!

> > @@ -1804,7 +1801,8 @@
> > if ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
> > printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n",
> > drive->name, drive->head);
> > - if ((drive->id->cfs_enable_2 & 0x3000) && drive->wcache)
> > + if (((drive->id->cfs_enable_2 & 0x3000) && drive->wcache) ||
> > + ((drive->id->command_set_1 & 0x20) && drive->id->cfs_enable_1 & 0x20))
> > if (do_idedisk_flushcache(drive))
> > printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
> > drive->name);
> >
> > Is this swsusp related?
>
> Yes. Under 2.4, some people found that if the writeback cache isn't
> flushed before we powerdown, the image isn't completely saved. This was
> the fix (the first test is the original one, the second is based upon
> hdparm's tests for writeback cache).

But this looks like you are fixing generic bug, which could make
kernel do something very wrong even without swsusp, right? If so,
submit it to Alan, ASAP.

> > What is this?
>
> Used in the 2.4 version for kswsusp daemon. It provides another way to
> start the process. I agree with you that we probably don't want to
> implement this in 2.5 - I just forgot about removing it (I'm not
> claiming that this code is perfectly cleaned up!)

Sorry, I figured out it might be easier if I give you at least some
comments before you start splitting patch up -- it should be easier
for you this way.

Pavel

-- 
When do you have heart between your knees?
-
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/