Messages in this thread | | | From | Bartlomiej Zolnierkiewicz <> | Subject | Re: [patch 2.6] don't put IDE disks in standby mode on halt on Alpha | Date | Sat, 29 May 2004 20:07:38 +0200 |
| |
On Friday 28 of May 2004 23:37, Ivan Kokshaysky wrote: > On Fri, May 28, 2004 at 05:40:50PM +0200, Bartlomiej Zolnierkiewicz wrote: > > - AFAIR there are some buggy disks having flush cache > > bits that need standby anyway > > Oh horror. I wouldn't be surprised if some drives don't flush > the cache even on standby... > > > - you will hit 'halt problem' on alpha if your disk has > > write cache enabled and it doesn't have flush cache bits > > > > -EAGAIN ;) > > Yep... :-( > > Here's variant of the first patch with CONFIG_ALPHA and a Very Big Comment.
Looks good, thanks!
> Ivan. > > --- 2.6/drivers/ide/ide-disk.c Sat May 29 00:43:41 2004 > +++ linux/drivers/ide/ide-disk.c Sat May 29 00:43:06 2004 > @@ -1713,7 +1713,22 @@ static void ide_device_shutdown(struct d > { > ide_drive_t *drive = container_of(dev, ide_drive_t, gendev); > > +#ifdef CONFIG_ALPHA > + /* On Alpha, halt(8) doesn't actually turn the machine off, > + it puts you into the sort of firmware monitor. Typically, > + it's used to boot another kernel image, so it's not much > + different from reboot(8). Therefore, we don't need to > + spin down the disk in this case, especially since Alpha > + firmware doesn't handle disks in standby mode properly. > + On the other hand, it's reasonably safe to turn the power > + off when the shutdown process reaches the firmware prompt, > + as the firmware initialization takes rather long time - > + at least 10 seconds, which should be sufficient for > + the disk to expire its write cache. */ > + if (system_state != SYSTEM_POWER_OFF) { > +#else > if (system_state == SYSTEM_RESTART) { > +#endif > ide_cacheflush_p(drive); > return; > }
- 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/
| |