1.\" 2.\" Device driver optimized for the Symbios/LSI 53C896/53C895A/53C1010 3.\" PCI SCSI controllers. 4.\" 5.\" Copyright (C) 1999-2000 Gerard Roudier <groudier@club-internet.fr> 6.\" 7.\" This driver also supports the following Symbios/LSI PCI SCSI chips: 8.\" 53C810A, 53C825A, 53C860, 53C875, 53C876, 53C885, 53C895, 9.\" 53C810, 53C815, 53C825 and the 53C1510D is 53C8XX mode. 10.\" 11.\" 12.\" This driver for FreeBSD-CAM is derived from the Linux sym53c8xx driver. 13.\" Copyright (C) 1998-1999 Gerard Roudier 14.\" 15.\" The sym53c8xx driver is derived from the ncr53c8xx driver that had been 16.\" a port of the FreeBSD ncr driver to Linux-1.2.13. 17.\" 18.\" The original ncr driver has been written for 386bsd and FreeBSD by 19.\" Wolfgang Stanglmeier <wolf@cologne.de> 20.\" Stefan Esser <se@mi.Uni-Koeln.de> 21.\" Copyright (C) 1994 Wolfgang Stanglmeier 22.\" 23.\" The initialization code, and part of the code that addresses 24.\" FreeBSD-CAM services is based on the aic7xxx driver for FreeBSD-CAM 25.\" written by Justin T. Gibbs. 26.\" 27.\" Other major contributions: 28.\" 29.\" NVRAM detection and reading. 30.\" Copyright (C) 1997 Richard Waltham <dormouse@farsrobt.demon.co.uk> 31.\" 32.\" ---------------------------------------------------------------------------- 33.\" 34.\" Redistribution and use in source and binary forms, with or without 35.\" modification, are permitted provided that the following conditions 36.\" are met: 37.\" 1. Redistributions of source code must retain the above copyright 38.\" notice, this list of conditions and the following disclaimer. 39.\" 2. Redistributions in binary form must reproduce the above copyright 40.\" notice, this list of conditions and the following disclaimer in the 41.\" documentation and/or other materials provided with the distribution. 42.\" 3. The name of the author may not be used to endorse or promote products 43.\" derived from this software without specific prior written permission. 44.\" 45.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 46.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 47.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 48.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 49.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 50.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 51.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 52.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 53.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 54.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 55.\" SUCH DAMAGE. 56.\" 57.\" $FreeBSD$ 58.\" 59.Dd December 26, 2020 60.Dt SYM 4 61.Os 62.Sh NAME 63.Nm sym 64.Nd NCR/Symbios/LSI Logic 53C8XX PCI SCSI host adapter driver 65.Sh SYNOPSIS 66To compile this driver into the kernel, 67place the following lines in your 68kernel configuration file: 69.Bd -ragged -offset indent 70.Cd "device pci" 71.Cd "device scbus" 72.Cd "device sym" 73.Pp 74To disable PCI parity checking (needed for broken bridges): 75.Cd "options SYM_SETUP_PCI_PARITY=<boolean>" 76.Pp 77To control driver probing against HVD buses: 78.Cd "options SYM_SETUP_SCSI_DIFF=<bit combination>" 79.Pp 80Alternatively, to load the driver as a 81module at boot time, place the following line in 82.Xr loader.conf 5 : 83.Bd -literal -offset indent 84sym_load="YES" 85.Ed 86.Sh DESCRIPTION 87This driver provides support for the Symbios/LSI Logic 53C8XX 88PCI SCSI controllers. 89.Pp 90Driver features include support for wide SCSI busses and fast10, fast20, 91fast40 and fast80-dt synchronous data transfers depending on controller 92capabilities. 93It also provides generic SCSI features such as tagged command 94queueing and auto-request sense. 95This driver is configured by default 96for a maximum of 446 outstanding commands per bus, 8 LUNs per target 97and 64 tagged tasks per LUN. 98These numbers are not so much limited by design 99as they are considered reasonable values for current SCSI technology. 100These values can be increased by changing appropriate 101constants in driver header files (not recommended). 102.Pp 103This driver supports the entire Symbios 53C8XX family of PCI SCSI 104controllers. 105It also offers the advantage of architectural improvements available 106only with newer chips. 107.Pp 108.Nm 109notably handles phase mismatch from SCRIPTS for the 53C896, 53C895A, 110and 53C1010 cores. 111As a result, it guarantees that no more than 1 interrupt 112per IO completion is delivered to the CPU, and that the SCRIPTS processor 113is never stalled waiting for CPU attention in normal situations. 114.Pp 115.Nm 116also uses LOAD/STORE SCRIPTS instructions for chips that support it. 117Only the early 810, 815 and 825 NCR chips do not support LOAD/STORE. 118Use of LOAD/STORE instead of MEMORY MOVE allows SCRIPTS to access IO 119registers internal to the chip (no external PCI cycles). 120As a result, the driver guarantees that no PCI self-mastering will occur 121for chips that support LOAD/STORE. 122.Pp 123LOAD/STORE instructions are also faster than MEMORY MOVE because 124they do not involve the chip DMA FIFO and are coded on 2 DWORDs 125instead of 3. 126.Pp 127For the early NCR 810, 815 and 825 chips, the driver uses a separate 128SCRIPTS set that uses MEMORY MOVE instructions for data movements. 129This is because LOAD/STORE are not supported by these chips. 130.Pp 131HVD/LVD capable controllers (895, 895A, 896, and 897) report 132the actual bus mode in the STEST4 chip IO registers. 133This feature 134allows the driver to safely probe against bus mode and to set up the chip 135accordingly. 136By default the driver only supports HVD for these chips. 137For other chips that can support HVD but not LVD, the driver has to probe 138implementation dependent registers (GPIO) in order to detect HVD bus mode. 139Only HVD implementations that conform with Symbios Logic recommendations can 140be detected by the driver. 141When the 142.Ar SYM_SETUP_SCSI_DIFF 143kernel option is assigned 144a value of 1, the driver will also probe against HVD for 825a, 875, 876 and 145885 chips, assuming Symbios Logic compatible implementation of HVD. 146.Pp 147When the 148.Ar SYM_SETUP_PCI_PARITY 149is assigned a value of 0, the 150driver will not enable PCI parity checking for 53C8XX devices. 151PCI parity 152checking should not be an option for PCI SCSI controllers, but some 153systems have been reported to fail using 53C8XX chips, due to spurious or 154permanent PCI parity errors detected. 155This option is supplied for 156convenience but it is neither recommended nor supported. 157.Pp 158This driver offers other options 159that are not currently exported to the user. 160They are defined and documented in the 161.Pa sym_conf.h 162driver file. 163Changing these options is not recommended unless absolutely necessary. 164Some of these 165options are planned to be exported through 166.Xr sysctl 3 167or an equivalent mechanism 168in a future driver releases and therefore, 169no compatibility is guaranteed. 170.Pp 171At initialization, the driver tries to detect and read user settings from 172controller NVRAM. 173The Symbios/Logic NVRAM layout and the Tekram NVRAM 174layout are currently supported. 175If the reading of the NVRAM succeeds, the 176following settings are taken into account and reported to CAM: 177.Bl -column "SCSI parity checking" "Symbios" 178.It Em "Host settings Symbios Tekram" 179.It "SCSI parity checking Y N" 180.It "Host SCSI ident Y Y" 181.It "Verbose messages Y N" 182.It "Scan targets hi-lo Y N" 183.It "Avoid SCSI bus reset Y N" 184.El 185.Bl -column "Synchronous period" "Symbios" 186.It Em "Device settings Symbios Tekram" 187.It "Synchronous period Y Y" 188.It "SCSI bus width Y Y" 189.It "Queue tag enable Y Y" 190.It "Number of tags NA Y" 191.It "Disconnect enable Y Y" 192.It "Scan at boot time Y N" 193.It "Scan LUN Y N" 194.El 195.Pp 196Devices that are configured as disabled for 'scan' in the NVRAM are not 197reported to CAM at system start-up. 198They can be discovered later using 199the 200.Ql camcontrol rescan 201command. 202.Pp 203The table below summarizes the main features and capabilities of the 204NCR/Symbios/LSI Logic 53C8XX family of PCI SCSI controllers. 205.Bl -column sym53c1510d "80MHz" "Width" "SRAM" "PCI64" 206.It Em "Chip Sync Width SRAM PCI64 Supported" 207.It "sym53c810 10MHz 8Bit N N Y" 208.It "sym53c810a 10MHz 8Bit N N Y" 209.It "sym53c815 10MHz 8Bit N N Y" 210.It "sym53c825 10MHz 16Bit N N Y" 211.It "sym53c825a 10MHz 16Bit 4KB N Y" 212.It "sym53c860 20MHz 8Bit N N Y" 213.It "sym53c875 20MHz 16Bit 4KB N Y" 214.It "sym53c876 20MHz 16Bit 4KB N Y" 215.It "sym53c885 20MHz 16Bit 4KB N Y" 216.It "sym53c895 40MHz 16Bit 4KB N Y" 217.It "sym53c895A 40MHz 16Bit 8KB N Y" 218.It "sym53c896 40MHz 16Bit 8KB Y Y" 219.It "sym53c897 40MHz 16Bit 8KB Y Y" 220.It "sym53c1510D 40MHz 16Bit 4KB Y Y" 221.It "sym53c1010 80MHz 16Bit 8KB Y Y" 222.El 223.Sh HARDWARE 224The 225.Nm 226driver provides support for the following Symbios/LSI Logic PCI SCSI 227controllers: 228.Pp 229.Bl -bullet -compact 230.It 231.Tn 53C810 232.It 233.Tn 53C810A 234.It 235.Tn 53C815 236.It 237.Tn 53C825 238.It 239.Tn 53C825A 240.It 241.Tn 53C860 242.It 243.Tn 53C875 244.It 245.Tn 53C876 246.It 247.Tn 53C895 248.It 249.Tn 53C895A 250.It 251.Tn 53C896 252.It 253.Tn 53C897 254.It 255.Tn 53C1000 256.It 257.Tn 53C1000R 258.It 259.Tn 53C1010-33 260.It 261.Tn 53C1010-66 262.It 263.Tn 53C1510D 264.El 265.Pp 266The SCSI controllers supported by 267.Nm 268can be either embedded on a motherboard, or on 269one of the following add-on boards: 270.Pp 271.Bl -bullet -compact 272.It 273ASUS SC-200, SC-896 274.It 275Data Technology DTC3130 (all variants) 276.It 277DawiControl DC2976UW 278.It 279Diamond FirePort (all) 280.It 281NCR cards (all) 282.It 283Symbios cards (all) 284.It 285Tekram DC390W, 390U, 390F, 390U2B, 390U2W, 390U3D, and 390U3W 286.It 287Tyan S1365 288.El 289.Sh MISC 290The DEC KZPCA-AA is a rebadged SYM8952U. 291.Sh SEE ALSO 292.Xr cd 4 , 293.Xr da 4 , 294.Xr sa 4 , 295.Xr scsi 4 , 296.Xr camcontrol 8 297.Sh HISTORY 298The 299.Nm 300driver appeared in 301.Fx 4.0 . 302.Sh AUTHORS 303.An -nosplit 304The 305.Nm 306driver was written by 307.An Gerard Roudier 308and is derived from the 309Linux sym53c8xx driver from the same author. 310The sym53c8xx driver is derived from the ncr53c8xx driver, 311which was ported from the 312.Fx 313.Xr ncr 4 314driver to Linux-1.2.13. 315The original 316.Xr ncr 4 317driver was written for 318.Bx 386 319and 320.Fx 321by 322.An Wolfgang Stanglmeier 323and 324.An Stefan Esser . 325.Sh BUGS 326No known bugs. 327