Subject: Re: scsi-disks hardsectored to 1024 byte/sec
To: None <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@most.weird.com>
List: current-users
Date: 07/17/1998 00:44:21
[ On Thu, July 16, 1998 at 19:26:49 (-0700), Erik E. Fair wrote: ]
> Subject: Re: scsi-disks hardsectored to 1024 byte/sec
>
> We need a SCSI tool that can read and interpret the various mode pages and
> so on. Got any candidates?

The tools in FreeBSD seem half decent.

The really simple stuff is done by sdd from Ian W. Dall
<ian.dall@dsto.defence.gov.au>.  I've got a copy of version 0.1, but I
don't know were I got it from!  ;-)

The best tool for this that I've ever run across is scsiping, which
unfortunately only runs on SunOS-4 and 5 to date.

	ftp://ftp.cdf.utoronto.ca/pub/jdd/scsiping/
	ftp://ftp.fwi.uva.nl/pub/scsiping/

I've appended a sample report from it.

Peek in here for something that can read and write them but not
interpret them:

	ftp://ftp.cdf.utoronto.ca/pub/jdd/scsimodepage/

It needs to learn how to use user-mode SCSI commands under NetBSD (only
works on SunOS 4 & 5 right now), but it shouldn't be hard to teach it.
John may even maintain it if he gets the appropriate changes back.

A slightly more SunOS-specific program that prints out other info about
scsi devices:

	ftp://ftp.cdf.utoronto.ca/pub/jdd/scsiinfo/

-- 
							Greg A. Woods

+1 416 443-1734      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>


00:41 [143] $ /local/sbin/scsiping /dev/rsd0c
==============
hostname /dev/rsd0c
==============
READ_CAPACITY:
    Capacity:               2061108
INQUIRY:
    Peripheral qualifier:   0 currently connected
    Peripheral device-type: 0 direct
    Device-type modifier:   0
    Removable medium:       No
    ISO version:            0
    ECMA version:           0
    ANSI version:           2
    Async event notific.    No
    Term.i/o process msg:   No
    Response data format:   2 (SCSI-2)
    Relative addressing:    No
    Wide bus 32:            No
    Wide bus 16:            Yes
    Sync transfer:          Yes
    Linked commands:        No
    Command queing:         Yes
    Soft reset:             No
    Vendor:                 'SEAGATE '
    Product:                'ST31200W SUN1.05'
    Revision:               '8724'
    Comment1:               '00643277            '
    Comment2:               '                                        '
    Comment3:               '                                        '

*** Mode Sense:                         curr         chg         def        save
Medium Type                                0           0           0           0
Device-specific                 
Length of pages(@8)             
Density code                               0           0           0           0
Number of blocks                           0           0           0           0
Block length                    

    Read-Write Error Recovery Parameters
*** Page 0x01:                          curr         chg         def        save
Autowrite realloc enabled              False        True       False       False
Autoread realloc enabled                True        True        True        True
Transfer block                          True        True        True        True
Read continuous                        False       False       False       False
Enable early correction                False        True       False       False
Post error                              True        True        True        True
Disable transfer on error              False        True       False       False
Disable correction                     False        True       False       False
Read retry count                          16         255          16          16
Correction span                           48           0          48          48
Head offset count                          0           0           0           0
Data strobe off. cnt                       0           0           0           0
Write retry count                         22         255          22          22
Recovery time limit                    65535           0       65535       65535
curr     |81 0a 64 10 30 00 00 00 16 00 ff ff                |  d 0           |
chg      |81 0a ef ff 00 00 00 00 ff 00 00 00                |                |
def      |81 0a 64 10 30 00 00 00 16 00 ff ff                |  d 0           |
save     |81 0a 64 10 30 00 00 00 16 00 ff ff                |  d 0           |

    Disconnect-Reconnect Page
*** Page 0x02:                          curr         chg         def        save
Buffer full ratio                        128         255         128         128
Buffer empty ratio                       128         255         128         128
Bus inactivity limit                      10           0          10          10
Disc. time limit                           0           0           0           0
Conn. time limit                           0           0           0           0
Max burst size                             0           0           0           0
Data Transfer Disconnect Contr.            0           0           0           0
curr     |82 0e 80 80 00 0a 00 00 00 00 00 00 00 00 00 00    |                |
chg      |82 0e ff ff 00 00 00 00 00 00 00 00 80 00 00 00    |                |
def      |82 0e 80 80 00 0a 00 00 00 00 00 00 00 00 00 00    |                |
save     |82 0e 80 80 00 0a 00 00 00 00 00 00 00 00 00 00    |                |

    Direct Access Device Format Parameters
*** Page 0x03:                          curr         chg         def        save
Tracks/zone                                9       65535           9           9
AltSect/zone                               9       65535           9           9
AltTrack/zone                              0           0           0           0
AltTrack/LU                               18       65535          18          18
Sect/track                                85           0          85          85
Byte/sect                                512           0         512         512
InterLeave                                 1       65535           1           1
Track skew                                13           0          13          13
Cyl. skew                                 23           0          23          23
Soft SECtor formatting                 False       False       False       False
Hard SECtor formatting                  True       False        True        True
ReMovaBle                              False       False       False       False
SURFace allocation                         0           0           0           0
curr     |83 16 00 09 00 09 00 00 00 12 00 55 02 00 00 01    |           U    |
         |00 0d 00 17 40 00 00 00                            |    @           |
chg      |83 16 ff ff ff ff 00 00 ff ff 00 00 00 00 ff ff    |                |
         |00 00 00 00 00 00 00 00                            |                |
def      |83 16 00 09 00 09 00 00 00 12 00 55 02 00 00 01    |           U    |
         |00 0d 00 17 40 00 00 00                            |    @           |
save     |83 16 00 09 00 09 00 00 00 12 00 55 02 00 00 01    |           U    |
         |00 0d 00 17 40 00 00 00                            |    @           |

    Rigid Disk Drive Geometry Parameters
*** Page 0x04:                          curr         chg         def        save
Cylinders                               2700           0        2700        2700
Heads                                      9           0           9           9
Write Precomp cyl start                    0           0           0           0
Reduced Write Current cyl start            0           0           0           0
Drive Step rate                            0           0           0           0
Landing zone cylinder                      0           0           0           0
Rotation Pos. Lck                          0           0           0           0
Rotation offset                            0           0           0           0
RPM                                     5411           0        5411        5411
curr     |84 16 00 0a 8c 09 00 00 00 00 00 00 00 00 00 00    |                |
         |00 00 00 00 15 23 00 00                            |     #          |
chg      |84 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |                |
         |00 00 00 00 00 00 00 00                            |                |
def      |84 16 00 0a 8c 09 00 00 00 00 00 00 00 00 00 00    |                |
         |00 00 00 00 15 23 00 00                            |     #          |
save     |84 16 00 0a 8c 09 00 00 00 00 00 00 00 00 00 00    |                |
         |00 00 00 00 15 23 00 00                            |     #          |

    Verify Error Recovery Page
*** Page 0x07:                          curr         chg         def        save
Enable Early Recovery                  False        True       False       False
Post Error                             False        True       False       False
Disable Transfer on Error              False        True       False       False
Disable Correction                     False        True       False       False
Verify retry count                        33         255          33          33
Verify retry span                         48           0          48          48
Recovery time limit                    65535           0       65535       65535
curr     |87 0a 00 21 30 00 00 00 00 00 ff ff                |   !0           |
chg      |87 0a 0f ff 00 00 00 00 00 00 00 00                |                |
def      |87 0a 00 21 30 00 00 00 00 00 ff ff                |   !0           |
save     |87 0a 00 21 30 00 00 00 00 00 ff ff                |   !0           |

    Caching Page
*** Page 0x08:                          curr         chg         def        save
Write cache enable                     False        True       False       False
Multiplication factor                  False       False       False       False
Read cache disable                     False        True       False       False
Demand rd reten. pri                       0           0           0           0
Write reten. pri                           0           0           0           0
Dis. pre-fetch xfer-len                65535       65535       65535       65535
Minimum pre-fetch                          0       65535           0           0
Maximum pre-fetch:                       118       65535         118         118
Max pre-fetch-ceil                     65535           0       65535       65535
curr     |88 12 90 00 ff ff 00 00 00 76 ff ff 80 02 00 00    |         v      |
         |00 00 00 00                                        |                |
chg      |88 12 bd 00 ff ff ff ff ff ff 00 00 a0 ff ff ff    |                |
         |00 00 00 00                                        |                |
def      |88 12 90 00 ff ff 00 00 00 76 ff ff 80 02 00 00    |         v      |
         |00 00 00 00                                        |                |
save     |88 12 90 00 ff ff 00 00 00 76 ff ff 80 02 00 00    |         v      |
         |00 00 00 00                                        |                |

    Control Mode Page
*** Page 0x0a:                          curr         chg         def        save
Report Log Exception Condition         False        True       False       False
Queue Alg. modifier                        1           1           1           1
Queue Err. mgmt                            0           0           0           0
Disable queing                             0           1           0           0
Enbl Extdd Conting. Allegiance             0           0           0           0
Ready AEN Permission                       0           0           0           0
Unit Attention AEN Permission              0           0           0           0
Error AEN Permission                       0           0           0           0
EAN Holdoff                                0           0           0           0
curr     |8a 0a 00 10 00 00 00 00 00 00 00 00                |                |
chg      |8a 0a 03 11 00 00 00 00 00 00 00 00                |                |
def      |8a 0a 00 10 00 00 00 00 00 00 00 00                |                |
save     |8a 0a 00 10 00 00 00 00 00 00 00 00                |                |

    Notch and Partition Page
*** Page 0x0c:                          curr         chg         def        save
Notched drive                              1           0           1           1
Log/Phys notch                             0           1           0           0
Max notches                               23           0          23          23
Active notch                               0       65535           0           0
Start boundary                             0           0           0           0
End boundary                               0           0           0           0
Pages notched                         0x000a      0x0000      0x000a      0x000a
curr     |8c 16 80 00 00 17 00 00 00 00 00 00 00 0a 89 08    |                |
         |00 00 00 00 00 00 10 00                            |                |
chg      |8c 16 40 00 00 00 ff ff 00 00 00 00 00 00 00 00    |  @             |
         |00 00 00 00 00 00 00 00                            |                |
def      |8c 16 80 00 00 17 00 00 00 00 00 00 00 0a 89 08    |                |
         |00 00 00 00 00 00 10 00                            |                |
save     |8c 16 80 00 00 17 00 00 00 00 00 00 00 0a 89 08    |                |
         |00 00 00 00 00 00 10 00                            |                |

*** Page 0x34:                  
curr     |b4 1e 01 00 00 07 f6 00 15 00 00 00 48 00 02 15    |            H   |
         |18 05 dc 53 55 4e 31 2e 30 35 00 00 00 00 00 00    |   SUN1.05      |
chg      |b4 1e 00 ff ff ff ff ff ff ff ff ff ff ff ff 00    |                |
         |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    |                |
def      |b4 1e 01 00 00 07 f6 00 15 00 00 00 48 00 02 15    |            H   |
         |18 05 dc 53 55 4e 31 2e 30 35 00 00 00 00 00 00    |   SUN1.05      |
save     |b4 1e 01 00 00 07 f6 00 15 00 00 00 48 00 02 15    |            H   |
         |18 05 dc 53 55 4e 31 2e 30 35 00 00 00 00 00 00    |   SUN1.05      |

    CCS Caching Page
*** Page 0x38:                          curr         chg         def        save
Cache control and size          
Prefetch threshold              
Max. prefetch                   
Max. prefetch multiplier        
Min. prefetch                   
Min. prefetch multiplier        
curr     |b8 00                                              |                |
chg      |b8 00                                              |                |
def      |b8 00                                              |                |
save     |b8 00                                              |                |

*** Page 0x00:                  
curr     |80 02 00 00                                        |                |
chg      |80 02 76 00                                        |  v             |
def      |80 02 00 00                                        |                |
save     |80 02 00 00                                        |                |