DKIP(4spp)
NAME
dkip − Interphase SMD disk controller device
SYNOPSIS
{
"dkip",_dkipinit,_dkipopen,
_dkipstrategy,_nulldev,_dkipioctl,
DTTYPE_BLOCK,
DTFS_AUTO,"Interphase SMD disk controller"
}
DESCRIPTION
Dkip is the interface to the Interphase SMD disk controller device. Dkip supports multiple controllers with a maximum of two disks per controller. For a list of the many supported disk drives via this interface, refer to the Interphase SMD disk controller User’s Guide.
Disk devices on MIPS computers systems contain a volume header that describes the contents of the device, parameters of the physical disk drive, and the partition layout of the device. The volume header is a block located at the beginning of all disk media. Refer to dvh(spp) for details on the disk volume header format.
REGISTERS
Dkip supports multiple disk controllers with control registers relative to VME A16 Supervisor address space. The address for controller 0 is hardwired at 0x8600, and the address for controller 1 is hardwired at 0x8800. The user may access other dkip device control registers by specifying the negative of the address rather than the controller number.
IOCTLS
Dkip supports the following ioctls:
ioctl(fd, DIOCGETVH, vhp)
Gets the disk volume header for the dkip device which is open on fd and copies it to the struct volume_header pointed to by vhp. Indicates if exception was via "utlbmiss", or general exception. Literals EXCEPT_UTLB, and EXCEPT_NORM are defined in <saio/saioctl.h> _badvaddr_save R2000 system coproc. badvaddr register _cause_save R2000 system coproc. cause register _sp_save stack pointer at time of exception _sr_save R2000 system coproc. status register _stack_mode stack in use at time of exception Literals MODE_NORMAL and MODE_FAULT are defined in <saio/saioctl.h>
Sets the volume header information used by the dkip driver to that pointed to by vhp. DIOCSETVH only changes the information used by the disk driver software, it does NOT change the volume header information on the disk itself.
ioctl(fd, DIOCGETCTLR, cip)
Gets the controller information for the device associated with descriptor fd and copies it to the struct ctlr_info pointed to by cip.
ioctl(fd, DIOCNOECC, noeccp)
Enables/diables the use of ECC by the disk controller on the device associated with the descriptor fd. ECC is the error correction algorithm the disk controller applies to erroneous data fields after all retries and/or reseeks have been exhausted. If the integer pointed to by noeccp is zero then ECC is disabled, otherwise ECC is enabled.
ioctl(fd, DIOCFMTMAP, fmip)
Allows formatting of a track, mapping of a track, mapping of a sector, and slipping of a sector on the device associated with the descriptor fd. The specific operation and any other information required is relayed through the struct fmt_map_info pointed to by fmip.
ioctl(fd, DIOCVFYSEC, vip)
Checks one or more logically sequential sectors, of previously written data, on the device associated with the descriptor fd for ECC errors in a non-distructive manner. The logical block number and count are indicated in the struct verify_info pointed to by vip.
ioctl(fd, DIOCDIAG, dip)
Causes the power-up diagnostics to be executed on the device associated with the descriptor fd. Dip points to the struct diag_info which contains the necessary information for this operation.
ioctl(fd, DIOCRDEFECTS, mdp)
Causes the media defect information contained on the specified track of the device associated with the descriptor fd to be read. The cylinder and track to read is specified in the struct media_defect pointed to by mdp. After the operation is performed, the media defect information is placed in the struct media_defect pointed to by mdp.
DIAGNOSTICS
The following diagnostics are printed by the dkip driver:
ip bad unit
An invalid unit number was specified.
ip bad controller number
An invalid controller number was specified.
ip bad partition
An invalid partition number was specified. The partition number must be in the range 0 through NPARTAB .
no interphase controller at 0x%x
No device responded to references to the control registers at the address shown.
ip(%d, %d, %d): can’t read volume header
A volume header was not present on the device indicated, or was incorrectly formatted, or a volume header checksum error was detected. The first of the three numbers shown is the controller number, the second is the unit number, and the third is the partition number.
ip bad unit number (volume)
The unit number indicates a multi-volume device; however, the volume header information does not indicate that multiple volumes are allowed on this device.
ip bad partition
The partition entry in the volume header for the specified partition indicates that the partition is empty.
read beyond end of partition
A read is requested beyond the end of the partition.
cc not multiple of sector size
The specified character count for a read or write operation is not a multiple of the sector size.
ip error: csr=%r
This is the beginning of the printed information when some type of device error occurs. The control and status register for the dkip controller, information pertaining to the type of error, and drive status information is printed.
ip(%d, %d, %d) FAILS SELF-DIAGNOSTIC
The device failed during it’s power-up diagnostic sequence.
waiting for ip(%d, %d, %d) to come ready...
The dkip driver is waiting for the device to co