From: drew@ophelia.cs.colorado.edu (Drew Eckhardt)
Subject: foo
Organization: University of Colorado at Boulder
Date: Mon, 11 Jan 1993 07:51:44 GMT

In article <C0JqMH.J3D@ra.nrl.navy.mil> you write:
>In article <C0JnHJ.1Hvz@austin.ibm.com> mwpoag@thurston.austin.ibm.com (Michae
l Wayne Poag) writes:
>> 1) send the spin-up code to a drive on an st01
>> 2) activate a drive added after boot-up
>>
>>I am running v.98p1 of HJ Lu's distribution 
>>The st01 is recognized, and the drive too, but this drive has
>>no jumper for spin-up on power-up...
>>
>>Is there any new scsi code in the newer kernels that would help.
>
>	I am not aware of any special scsi command to spin up a drive, so I
>guess the answer is that the newer kernel is unlikely to help you much.  I
>grepped the scsi specifications for variations on "Spin up", and came up empty
.
>All I can suggest is that you contact the manufacturer and find out what is
>needed - it is possible that there is some kind of drive specific command that
>must be sent before the drive spins up.

There is a standard SCSI command for this.  Some drives are configured so 
that they don't spin up on power up, and instead wait for the START STOP UNIT
command (Most notably, DEC does this with their discs on their 
Decstations).  In some cases it is jumper selectable (some HP disks), 
or software configurable on one of the mode pages (some DEC disks).

The command you want is opcode 1BH, START STOP UNIT.  

Note that the semmantics are slightly different for SCSI-I/SCSI-II - 
SCSI-1 specifies the LoEj bit as reserved (so it should be set to zero).

8.2.17. START STOP UNIT Command


                     Table 8-33: START STOP UNIT Command

==============================================================================
  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
Byte |        |        |        |        |        |        |        |        |
==============================================================================
 0   |                           Operation Code (1Bh)                        |
-----|-----------------------------------------------------------------------|
 1   | Logical Unit Number      |                  Reserved         | Immed  |
-----|-----------------------------------------------------------------------|
 2   |                           Reserved                                    |
-----|-----------------------------------------------------------------------|
 3   |                           Reserved                                    |
-----|-----------------------------------------------------------------------|
 4   |                           Reserved                  |  LoEj  |  Start |
-----|-----------------------------------------------------------------------|
 5   |                           Control                                     |
==============================================================================

  The START STOP UNIT command (Table 8-33) requests that the target enable or
disable the logical unit for media access operations.

  An immediate (Immed) bit of one indicates that status shall be returned as
soon as the command descriptor block has been validated.  An Immed bit of zero
indicates that status shall be returned after the operation is completed.

  A load eject (LoEj) bit of zero requests that no action be taken regarding
loading or ejecting the medium.  A LoEj bit of one requests that the medium
shall be be unloaded if the start bit is zero.  A LoEj bit of one requests
that the medium is to be loaded if the start bit is one.

  A start bit of one requests the logical unit be made ready for use.  A start
b.it of zero requests that the logical unit be stopped (media cannot be
accessed by the initiator).

  Targets that contain cache memory shall implicitly perform a SYNCHRONIZE
CACHE command for the entire medium prior to executing the STOP UNIT command.


>	Since you have not indicated anything that would suggest otherwise, it
>is also possible that your drive is dead.  Older Seagates in particular have
>problems spinning up because (as I recall) the heads get stuck to the platters
.
>There is some kind of lubricant that is used internally, but as the drive gets
>old the lubricant gets sticky.  

The 296N, 277R/N, and 251 are all built around the same HDA and can 
suffer from the same 251 stiction problem.

>If this is the case, then drive replacement is
>strongly recommended. When I ran across this, I was able to get the drive to
>spin up by lightly hitting the drive with a screwdriver handle, but this shoul
d
>probably only be done when you are in a position to run a backup of some kind.
>You should also make sure that there is not a spin-up command that needs to be
>sent before you try any of this :-).

On some disks, spin-up is controlled by a jumper.

Eric : 

The disk driver should probably do a TEST UNIT READY (op code 0), and if that 
fails do a START STOP UNIT command with a ~60 second timeout and try again
before failure.

-- 
Boycott AT&T for their absurd anti-BSDI lawsuit. | Drew Eckhardt
Condemn Colorado for Amendment Two.		 | drew@cs.colorado.edu
Use Linux, the fast, flexible, and free 386 unix |