SUMMARY: scsi issues - isp0

From: Rachel Polanskis (rachel@nepean.uws.edu.au)
Date: Mon Jun 15 1998 - 01:00:05 CDT


Thanks to all who responded to or read my long posting!

The best responses I have are summarised here.

<Kevin.Sheehan@uniq.com.au>
suggested to me that I had the scsi-options in /kernel/drv/isp.conf
set incorrectly.

I had the options set to 0x1f8
which did not initiate wide transfers.

I now have the isp.conf looking like:

scsi-options=0x3f8;

Which turns on WIDE SCSI support, and also enables the other desired
functions.

In /etc/system I have the following globals set:

set sd:sd_max_throttle=16
set scsi_options=0x1f8

The first option throttles the number of TCQ commands
(my original problem from 6 months ago)
and the second enables FAST SCSI for the esp controller
and associated disks.

What is the priority of the /etc/system over /kernel/drv/isp.conf?

I imagine that the variables in system are set as desired, then if there
is a difference in isp.conf, that value is taken.

A version of "ndd" for the SCSI interface would be wonderful!

...
>> Can someone please help me interpret the output of these differing "views"
>> of "scsiinfo" and tell me why the expensive disks and isp controller
>> we bought from Sun don't seemt to want to support anything but Narrow
>> and no TCQ, in spite of setting it up otherwise in "isp.conf"?!

> 1) you didn't enable wide scsi in the options you set - you need to add 0x200
> 2) TCQ (TaggedQueueing) is clearly enabled, as both disks show it on ispX
> 3) the Archive Python does not do tagged queueing it appears
> 4) synchronous information for a device includes both negotiated rate and
> what the device claims (often erroneously or defaulted) as a maximum.
>
> In short, turn on wide (0x200) in the options and you should be right.

Also thanks to <bbyoung@amoco.com> who gave me the following:

Here are some somewhat inchoate notes that I put together when I was trying to
turn off command queueing for a single target.. I was also confused by the
output of scsiinfo; maybe you've heard something from our august moderator, the
author of that excellent work...

>From /usr/include/sys/scsi/impl/services.h
/*
 * Common Capability Strings Array
 */
#define SCSI_CAP_DMA_MAX 0
#define SCSI_CAP_MSG_OUT 1
#define SCSI_CAP_DISCONNECT 2
#define SCSI_CAP_SYNCHRONOUS 3
#define SCSI_CAP_WIDE_XFER 4
#define SCSI_CAP_PARITY 5
#define SCSI_CAP_INITIATOR_ID 6
#define SCSI_CAP_UNTAGGED_QING 7
#define SCSI_CAP_TAGGED_QING 8
#define SCSI_CAP_ARQ 9
#define SCSI_CAP_LINKED_CMDS 10
#define SCSI_CAP_SECTOR_SIZE 11
#define SCSI_CAP_TOTAL_SECTORS 12
#define SCSI_CAP_GEOMETRY 13
#define SCSI_CAP_RESET_NOTIFICATION 14
#define SCSI_CAP_QFULL_RETRIES 15
#define SCSI_CAP_QFULL_RETRY_INTERVAL 16

* It seems these option bits can be found in the file:
        *
        * /usr/include/sys/scsi/impl/uscsi.h
/*
 * flags for uscsi_flags field
 */
#define USCSI_WRITE 0x00000 /* send data to device */
#define USCSI_SILENT 0x00001 /* no error messages */
#define USCSI_DIAGNOSE 0x00002 /* fail if any error occurs */
#define USCSI_ISOLATE 0x00004 /* isolate from normal commands */
#define USCSI_READ 0x00008 /* get data from device */
#define USCSI_ASYNC 0x01000 /* Set bus to asynchronous mode */
#define USCSI_SYNC 0x02000 /* Return bus to sync mode if possible */
#define USCSI_RESET 0x04000 /* Reset target */
#define USCSI_RESET_ALL 0x08000 /* Reset all targets */
#define USCSI_RQENABLE 0x10000 /* Enable Request Sense extensions */
/*
 * the following flags should not be used at user level but may
 * be used by a scsi target driver for internal commands
 */
#define USCSI_NOPARITY 0x00010 /* run command without parity */
#define USCSI_NODISCON 0x00020 /* run command without disconnects */
#define USCSI_NOINTR 0x00040 /* No interrupts, NEVER to use this flag */
#define USCSI_NOTAG 0x00100 /* Disable tagged queueing */
#define USCSI_OTAG 0x00200 /* ORDERED QUEUE tagged cmd */
#define USCSI_HTAG 0x00400 /* HEAD OF QUEUE tagged cmd */
#define USCSI_HEAD 0x00800 /* Head of HA que */
#
#
# Also from /usr/include/sys/scsi/conf/autoconf.h...

/*
 * SCSI subsystem options - global word of options are available
 *
 * bits 0-2 are reserved for debugging/informational level
 * bit 3 reserved for a global disconnect/reconnect switch
 * bit 4 reserved for a global linked command capability switch
 * bit 5 reserved for a global synchronous SCSI capability switch
 *
 * the rest of the bits are reserved for future use
 *
 */
 
#define SCSI_DEBUG_TGT 0x1 /* debug statements in target drivers */
#define SCSI_DEBUG_LIB 0x2 /* debug statements in library */
#define SCSI_DEBUG_HA 0x4 /* debug statements in host adapters */
 
 

#define SCSI_OPTIONS_DR 0x8 /* Global disconnect/reconnect */
#define SCSI_OPTIONS_LINK 0x10 /* Global linked commands */
#define SCSI_OPTIONS_SYNC 0x20 /* Global synchronous xfer capability */
#define SCSI_OPTIONS_PARITY 0x40 /* Global parity support */
#define SCSI_OPTIONS_TAG 0x80 /* " tagged command support */
#define SCSI_OPTIONS_FAST 0x100 /* " FAST scsi support */
#define SCSI_OPTIONS_WIDE 0x200 /* " WIDE scsi support */
#define SCSI_OPTIONS_FAST20 0x400 /* " FAST20 scsi support */

from prtconf -v
.
.
.
SUNW,fas, instance #0
            Driver software properties:
                name <target6-TQ> length <4>
                    value <0x00000000>.
                name <target6-wide> length <4>
                    value <0x00000000>.
                name <target6-sync-speed> length <4>
                    value <0x00002710>.
                name <target0-TQ> length <4>
                    value <0x00000001>.
                name <target0-wide> length <4>
                    value <0x00000000>.
                name <target0-sync-speed> length <4>
                    value <0x00002710>.
                name <pm_norm_pwr> length <4>
                    value <0x00000001>.
                name <pm_timestamp> length <4>
                    value <0x3549c8e0>.
                name <scsi-options> length <4>
                    value <0x000007f8>.
                                  ^^^

echo 'obase=2;ibase=16;7F8' | bc
11111111000
|||||||||||
 9876543210
SCSI option value to set the corresponding bit to 1
Disconnect/reconnect 0x008 (bit3=1, starting with bit 0)
Linked commands 0x010 (bit4=1)
Synchronous transfer 0x020 (bit5=1)
Parity 0x040 (bit6=1)
Tagged Queuing 0x080 (bit7=1)
Fast scsi 0x100 (bit8=1, or bit 9 if starting with 1)
Wide scsi 0x200 (bit9=1)
Fast 20 scsi 0x400 (bit10=1)

SO.......

1 Fast scsi
1 Fast scsi
1 Tagged Queuing
1 Parity
1 Synchronous transfer
1 Linked commands
1 Disconnect/reconnect
0
0
0

We want

1 Fast scsi
1 Fast scsi
0 Tagged Queuing
1 Parity
1 Synchronous transfer
1 Linked commands
1 Disconnect/reconnect
0
0
0

 48 -> echo 'obase=16;ibase=2;1101111000'|bc
378

entry in /kernel/drv/fas.conf...
#
# This is for the root
#

name="fas" parent="/sbus@3,0/SUNW,fas@3,8800000"
        reg=3,0x8800000,0x10,3,0x8810000,0x40
        target0-scsi-options=0x378
        scsi-options=0x7f8;

#

rachel

Rachel Polanskis University of Western Sydney, Nepean
UNIX Admin PO Box 10, Kingswood NSW 2747
Systems && Operations Computing && Communications Division K'wood
r.polanskis@nepean.uws.edu.au Phone: +61 (47) 360 291



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:41 CDT