Subject: Re: powerhooks and SCSI disks
To: None <tech-kern@netbsd.org>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: tech-kern
Date: 12/16/2005 19:26:55
On Fri, Dec 16, 2005 at 01:13:06PM -0500, Michael Lorenz wrote:
> Hello,
> 
> > > I'm currently looking for ways to improve power management on
> > > SPARCbooks, mainly adding things like some sort of standby mode,
> > > turning off unused peripherals and so on. We can for instance turn
> > > off power for the internl SCSI disk ( in case a drive wouldn't
> > > honour a motor stop command ) So, I have a few questions:
> > > - are there any objections against adding a power hook to sd so it
> > > would
> > >   flush the drive's cache before we're going to remove power?
> > > - is there anything to do after turning the drive back on to resume
> > >   operation? 
> > 
> > Please look at PR#31981.
> 
> I see. Could that be drive- or controller-specific? I used to spin down
> drives like that on various sparc(64) boxes without ever getting any
> kind of problem, they just spun up again when needed. Controllers in
> question were esp and esiop, drives were various Seagate Barracudas ( 4,
> 9 and 50GB models ) and a Toshiba 2.5" drive behind a SCSI-IDE bridge.

The report was about an IBM drive on esiop. I moved my / since then to a
18 gig Barracuda, so I tried again. I isuued scsictl sd0 stop. Then I type
mount. It returned "Input/Output error" and the messages

sd0(esiop0:0:0:0):  Check Condition on CDB: 0x28 00 00 d3 c7 20 00 00 10 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Not Ready, Initialization Command Required
     FRU CODE:  0x2

sd0(esiop0:0:0:0):  Check Condition on CDB: 0x28 00 00 ed f4 c6 00 00 02 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Not Ready, Initialization Command Required
     FRU CODE:  0x2

sd0(esiop0:0:0:0):  Check Condition on CDB: 0x28 00 00 ed f4 c6 00 00 02 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Not Ready, Initialization Command Required
     FRU CODE:  0x2

sd0(esiop0:0:0:0):  Check Condition on CDB: 0x2a 00 00 e3 58 80 00 00 10 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Not Ready, Initialization Command Required
     FRU CODE:  0x2

sd0(esiop0:0:0:0):  Check Condition on CDB: 0x2a 00 00 f7 8f f8 00 00 02 00
    SENSE KEY:  Not Ready
     ASC/ASCQ:  Logical Unit Not Ready, Initialization Command Required
     FRU CODE:  0x2

were printed on console without any sign that the drive is going to spin
up. So I did scsictl sd0 start, the drive spin up and everything was fine
again. So the problem still remains with another drive.

Pavel Cahyna