Copyright 2004 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
dad@ target,lun:partition
This driver handles the ide disk drives on SPARC platforms. The type of disk drive is determined using the ATA IDE identify device command and by reading the volume label stored on the drive. The dad device driver supports the Solaris SPARC VTOC and the EFI/GPT disk volume labels.
The block-files access the disk using the system's normal buffering mechanism and are read and written without regard to physical disk records. There is also a "raw" interface that provides for direct transmission between the disk and the user's read or write buffer. A single read or write call usually results in one I/O operation; raw I/O is therefore considerably more efficient when many bytes are transmitted. The names of the block files are found in /dev/dsk. Raw file names are found in /dev/rdsk.
I/O requests to the raw device must be aligned on a 512-byte (DEV_BSIZE) boundary and must have a length that is a multiple of 512 bytes. Requests that do not meet the restrictions cause the driver to return an EINVAL error. I/O requests to the block device have no alignment or length restrictions.
Each device maintains I/O statistics both for the device and for each partition allocated on that device. For each device/partition, the driver accumulates reads, writes, bytes read, and bytes written. The driver also takes hi-resolution time stamps at queue entry and exit points, which facilitates monitoring the residence time and cumulative residence-length product for each queue.
Each device also has error statistics associated with it. These must include counters for hard errors, soft errors and transport errors. Other data may be implemented as required.
block files
raw files
where:
cn
controller n
tn
IDE target id n (0-3)
dn
Always 0.
sn
partition n (0-7)
The target ide numbers are assigned as:
0
Master disk on Primary channel.
1
Slave disk on Primary channel.
2
Master disk on Secondary channel
3
Slave disk on Secondary channel.
Refer to dkio(7I).
EACCES
Permission denied.
EBUSY
The partition was opened exclusively by another thread.
EFAULT
Argument was a bad address.
EINVAL
Invalid argument.
EIO
I/O error occurred.
ENOTTY
The device does not support the requested ioctl function.
ENXIO
The device did not exist during opening.
EROFS
The device is a read-only device.
format(1M), mount(1M), lseek(2), read(2), write(2), driver.conf(4), vfstab(4), dkio(7I)
X3T10 ATA-4 specifications.
Command:<number>, Error:<number>, Status:<number>
Indicates that the command failed with an error and provides status register contents. Where <number> is a hexadecimal value.
offline
The driver has decided that the target disk is no longer there.
disk ok
The target disk is now responding again.
disk not responding to selection
The target disk is not responding.
i/o to invalid geometry
The geometry of the drive could not be established.
incomplete read/write - retrying/giving up
There was a residue after the command completed normally.
no bp for disk label
A bp with consistent memory could not be allocated.
no memory for disk label
Free memory pool exhausted.
ATA transport failed: reason 'nnnn': {retrying|giving}
The host adapter has failed to transport a command to the target for the reason stated. The driver will either retry the command or, ultimately, give up.
no mem for property
Free memory pool exhausted.
transport rejected (<n>)
Host adapter driver was unable to accept a command.
Device Fault
Device fault - reason for such error is vendor specific.