GG(4I) — Unix Programmer’s Manual
NAME
gg − ISI raw SCSI interface driver
SYNOPSIS
GG0 at address 000ffffc0 vector 0x78 level 6
GG at ∗∗∗ no address ∗∗∗ no vector
DESCRIPTION
The GG devices provide access to any SCSI device, including the initiator, the SCSI-U. The first digit of the supported devices identifies which SCSI bus of the possible four is attached to the CPU. The second digit identifies the SCSI device id of the specific device to be accessed. The logical unit number is specified as part of the command request package sent to the target SCSI device.
The SCSI-U, which is usually SCSI id 7, can be a target as well as an initiator, and has its own set of commands, which are documented in the SCSI-U Hardware Manual. Commands for other devices will be found in their manuals.
The rgg devices are used by opening the appropriate device, and then calling ioctl(). The ioctl to use, GGIOCCMD, is defined in <sys/ggio.h>. The call requires that the user first set up a DCB structure (hadb_dcb) in user memory. This structure is defined in both the SCSI-U Hardware Manual and in <sys/gsreg.h>. The CDB structure (dcb_cdb) is part of the DCB, and conforms to the CDB as described by the ANSI specification. For examples of programs using the GG device, see the source code for /etc/gdbad or /etc/scsimon.
The flag qi_flags&1 disables the use of disconnect/reconnect, which is enabled on all devices by default.
The SCSI-U hardware byte-swaps all data sent to devices. Byte-swapping medium data poses no problem, because the data will be byte-swapped again when it is read from the device, but byte-swapping command data renders commands unintelligible. Therefore, the SCSI-U firmware automatically byte-swaps command data before sending it to the device, ensuring that it will be read properly after the SCSI-U hardware byte-swaps it again.
You can control software byte-swapping with two flags: qi_flags&2 and qi_flags&4. When these flags are set to 0, command data is byte-swapped by the SCSI-U firmware before being sent to the device, but medium data is not.
Setting qi_flags&2 to 1 disables software byte-swapping of command data. This flag must be set to 0 when using the SCSI-U.
Setting qi_flags&4 to 1 enables software byte-swapping of medium data. The data will be byte-swapped twice, slowing down transfers, but making the stored data readable by other controllers or CPUs.
FILES
rgg00 - rgg07
rgg10 - rgg17
rgg20 - rgg27
rgg30 - rgg37
SEE ALSO
gd(4i), gt(4i), gdbad(8i), scsimon(8i)
VME-SCSI Hardware Reference Manual
4th Berkeley Distribution — 15 April 1988