From: Drew Eckhardt (drew@romeo.cs.colorado.edu)
Date: 03/31/93


From: drew@romeo.cs.colorado.edu (Drew Eckhardt)
Subject: Re: Can linux use Adaptec SCSI bridge controllers?
Date: Thu, 1 Apr 1993 04:03:22 GMT

In article <C4rJDz.229@jabba.ess.harris.com> sonny@trantor.harris-atd.com (Bob Davis) writes:
> Does linux support the use of Adaptec SCSI-to-RLL or -MFM or
>-SMD bridge controllers?

People have had success with old sun shoeboxes (Adaptec SCSI->MFM
bridge), I have a SCSI->SMD bridge (in storage right now).

>Is the low level software necessary for low-level
>formatting the disks which are attached to such bridge controllers included
>in the source distribution?

Not exactly - you have to write a program to do appropriate
SCSI_IOCTL_SEND_COMMAND ioctls on the disk(s), a vendor specific
MODE SELECT followed by a FORMAT UNIT.

You might have to force detection of the disk (ie, hack up
scsi.c in scan_scsis and the initialization code in sd.c) to
get it recognized so you can ioctl() it.

>As I understand it, an unusual SCSI MODE SELECT
>command first must be issued to the bridge controllers which stashes away
>the drive geometry on the MFM/RLL/SMD drives so that a subsequent
>SCSI FORMAT command can find it and proceed with the required actions
>to format the drive. SCSI drives normally come from the manufacturer
>with the geometry information and low-level format already done. So
>the standard drive SCSI users need never be concerned with this matter.
>But those of us contemplating the use of bridge controllers must worry
>about this. I want to use such bridge controllers on my Adaptec AHA1542A
>host adapter.
>
> If you can help me in this low-level SCSI formatting problem
>by pointing me either to software needed to do the MODE SELECT thing
>or can tell me where the software might be in the linux source, I
>will be most grateful.
>

See the bridge board manual for the correct vendor specific
mode select command, kernel/blk_drv/scsi/scsi_ioctl.h and
scsi.h for the appropriate IOCTL values and SCSI opcodes respectively.

The argument to the ioctl is a pointer to a buffer that looks like

In length (4 bytes) - amount of data to transfer to disk
Out length (4 bytes) - amount of data to transfer from disk
Command (6, 10, or 12 bytes. Size is determined by opcode)
Data to disk (n bytes).

Data transfered in from the disk will start at where the command
was stored.

-- 
Boycott USL/Novell 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       |