sym53c8xx_2.txt 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. The Linux SYM-2 driver documentation file
  2. Written by Gerard Roudier <groudier@free.fr>
  3. 21 Rue Carnot
  4. 95170 DEUIL LA BARRE - FRANCE
  5. Updated by Matthew Wilcox <matthew@wil.cx>
  6. 2004-10-09
  7. ===============================================================================
  8. 1. Introduction
  9. 2. Supported chips and SCSI features
  10. 3. Advantages of this driver for newer chips.
  11. 3.1 Optimized SCSI SCRIPTS
  12. 3.2 New features appeared with the SYM53C896
  13. 4. Memory mapped I/O versus normal I/O
  14. 5. Tagged command queueing
  15. 6. Parity checking
  16. 7. Profiling information
  17. 8. Control commands
  18. 8.1 Set minimum synchronous period
  19. 8.2 Set wide size
  20. 8.3 Set maximum number of concurrent tagged commands
  21. 8.4 Set debug mode
  22. 8.5 Set flag (no_disc)
  23. 8.6 Set verbose level
  24. 8.7 Reset all logical units of a target
  25. 8.8 Abort all tasks of all logical units of a target
  26. 9. Configuration parameters
  27. 10. Boot setup commands
  28. 10.1 Syntax
  29. 10.2 Available arguments
  30. 10.2.1 Default number of tagged commands
  31. 10.2.2 Burst max
  32. 10.2.3 LED support
  33. 10.2.4 Differential mode
  34. 10.2.5 IRQ mode
  35. 10.2.6 Check SCSI BUS
  36. 10.2.7 Suggest a default SCSI id for hosts
  37. 10.2.8 Verbosity level
  38. 10.2.9 Debug mode
  39. 10.2.10 Settle delay
  40. 10.2.11 Serial NVRAM
  41. 10.2.12 Exclude a host from being attached
  42. 10.3 Converting from old options
  43. 10.4 SCSI BUS checking boot option
  44. 11. SCSI problem troubleshooting
  45. 15.1 Problem tracking
  46. 15.2 Understanding hardware error reports
  47. 12. Serial NVRAM support (by Richard Waltham)
  48. 17.1 Features
  49. 17.2 Symbios NVRAM layout
  50. 17.3 Tekram NVRAM layout
  51. ===============================================================================
  52. 1. Introduction
  53. This driver supports the whole SYM53C8XX family of PCI-SCSI controllers.
  54. It also support the subset of LSI53C10XX PCI-SCSI controllers that are based
  55. on the SYM53C8XX SCRIPTS language.
  56. It replaces the sym53c8xx+ncr53c8xx driver bundle and shares its core code
  57. with the FreeBSD SYM-2 driver. The `glue' that allows this driver to work
  58. under Linux is contained in 2 files named sym_glue.h and sym_glue.c.
  59. Other drivers files are intended not to depend on the Operating System
  60. on which the driver is used.
  61. The history of this driver can be summarized as follows:
  62. 1993: ncr driver written for 386bsd and FreeBSD by:
  63. Wolfgang Stanglmeier <wolf@cologne.de>
  64. Stefan Esser <se@mi.Uni-Koeln.de>
  65. 1996: port of the ncr driver to Linux-1.2.13 and rename it ncr53c8xx.
  66. Gerard Roudier
  67. 1998: new sym53c8xx driver for Linux based on LOAD/STORE instruction and that
  68. adds full support for the 896 but drops support for early NCR devices.
  69. Gerard Roudier
  70. 1999: port of the sym53c8xx driver to FreeBSD and support for the LSI53C1010
  71. 33 MHz and 66MHz Ultra-3 controllers. The new driver is named `sym'.
  72. Gerard Roudier
  73. 2000: Add support for early NCR devices to FreeBSD `sym' driver.
  74. Break the driver into several sources and separate the OS glue
  75. code from the core code that can be shared among different O/Ses.
  76. Write a glue code for Linux.
  77. Gerard Roudier
  78. 2004: Remove FreeBSD compatibility code. Remove support for versions of
  79. Linux before 2.6. Start using Linux facilities.
  80. This README file addresses the Linux version of the driver. Under FreeBSD,
  81. the driver documentation is the sym.8 man page.
  82. Information about new chips is available at LSILOGIC web server:
  83. http://www.lsilogic.com/
  84. SCSI standard documentations are available at T10 site:
  85. http://www.t10.org/
  86. Useful SCSI tools written by Eric Youngdale are part of most Linux
  87. distributions:
  88. scsiinfo: command line tool
  89. scsi-config: TCL/Tk tool using scsiinfo
  90. 2. Supported chips and SCSI features
  91. The following features are supported for all chips:
  92. Synchronous negotiation
  93. Disconnection
  94. Tagged command queuing
  95. SCSI parity checking
  96. PCI Master parity checking
  97. Other features depends on chip capabilities.
  98. The driver notably uses optimized SCRIPTS for devices that support
  99. LOAD/STORE and handles PHASE MISMATCH from SCRIPTS for devices that
  100. support the corresponding feature.
  101. The following table shows some characteristics of the chip family.
  102. On board LOAD/STORE HARDWARE
  103. Chip SDMS BIOS Wide SCSI std. Max. sync SCRIPTS PHASE MISMATCH
  104. ---- --------- ---- --------- ---------- ---------- --------------
  105. 810 N N FAST10 10 MB/s N N
  106. 810A N N FAST10 10 MB/s Y N
  107. 815 Y N FAST10 10 MB/s N N
  108. 825 Y Y FAST10 20 MB/s N N
  109. 825A Y Y FAST10 20 MB/s Y N
  110. 860 N N FAST20 20 MB/s Y N
  111. 875 Y Y FAST20 40 MB/s Y N
  112. 875A Y Y FAST20 40 MB/s Y Y
  113. 876 Y Y FAST20 40 MB/s Y N
  114. 895 Y Y FAST40 80 MB/s Y N
  115. 895A Y Y FAST40 80 MB/s Y Y
  116. 896 Y Y FAST40 80 MB/s Y Y
  117. 897 Y Y FAST40 80 MB/s Y Y
  118. 1510D Y Y FAST40 80 MB/s Y Y
  119. 1010 Y Y FAST80 160 MB/s Y Y
  120. 1010_66* Y Y FAST80 160 MB/s Y Y
  121. * Chip supports 33MHz and 66MHz PCI bus clock.
  122. Summary of other supported features:
  123. Module: allow to load the driver
  124. Memory mapped I/O: increases performance
  125. Control commands: write operations to the proc SCSI file system
  126. Debugging information: written to syslog (expert only)
  127. Scatter / gather
  128. Shared interrupt
  129. Boot setup commands
  130. Serial NVRAM: Symbios and Tekram formats
  131. 3. Advantages of this driver for newer chips.
  132. 3.1 Optimized SCSI SCRIPTS.
  133. All chips except the 810, 815 and 825, support new SCSI SCRIPTS instructions
  134. named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
  135. to/from memory much faster that the MOVE MEMORY instruction that is supported
  136. by the 53c7xx and 53c8xx family.
  137. The LOAD/STORE instructions support absolute and DSA relative addressing
  138. modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
  139. of MOVE MEMORY instructions.
  140. Due to the lack of LOAD/STORE SCRIPTS instructions by earlier chips, this
  141. driver also incorporates a different SCRIPTS set based on MEMORY MOVE, in
  142. order to provide support for the entire SYM53C8XX chips family.
  143. 3.2 New features appeared with the SYM53C896
  144. Newer chips (see above) allows handling of the phase mismatch context from
  145. SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
  146. until the C code has saved the context of the transfer).
  147. The 896 and 1010 chips support 64 bit PCI transactions and addressing,
  148. while the 895A supports 32 bit PCI transactions and 64 bit addressing.
  149. The SCRIPTS processor of these chips is not true 64 bit, but uses segment
  150. registers for bit 32-63. Another interesting feature is that LOAD/STORE
  151. instructions that address the on-chip RAM (8k) remain internal to the chip.
  152. 4. Memory mapped I/O versus normal I/O
  153. Memory mapped I/O has less latency than normal I/O and is the recommended
  154. way for doing IO with PCI devices. Memory mapped I/O seems to work fine on
  155. most hardware configurations, but some poorly designed chipsets may break
  156. this feature. A configuration option is provided for normal I/O to be
  157. used but the driver defaults to MMIO.
  158. 5. Tagged command queueing
  159. Queuing more than 1 command at a time to a device allows it to perform
  160. optimizations based on actual head positions and its mechanical
  161. characteristics. This feature may also reduce average command latency.
  162. In order to really gain advantage of this feature, devices must have
  163. a reasonable cache size (No miracle is to be expected for a low-end
  164. hard disk with 128 KB or less).
  165. Some known old SCSI devices do not properly support tagged command queuing.
  166. Generally, firmware revisions that fix this kind of problems are available
  167. at respective vendor web/ftp sites.
  168. All I can say is that I never have had problem with tagged queuing using
  169. this driver and its predecessors. Hard disks that behaved correctly for
  170. me using tagged commands are the following:
  171. - IBM S12 0662
  172. - Conner 1080S
  173. - Quantum Atlas I
  174. - Quantum Atlas II
  175. - Seagate Cheetah I
  176. - Quantum Viking II
  177. - IBM DRVS
  178. - Quantum Atlas IV
  179. - Seagate Cheetah II
  180. If your controller has NVRAM, you can configure this feature per target
  181. from the user setup tool. The Tekram Setup program allows to tune the
  182. maximum number of queued commands up to 32. The Symbios Setup only allows
  183. to enable or disable this feature.
  184. The maximum number of simultaneous tagged commands queued to a device
  185. is currently set to 16 by default. This value is suitable for most SCSI
  186. disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
  187. <= 10 ms), using a larger value may give better performances.
  188. This driver supports up to 255 commands per device, and but using more than
  189. 64 is generally not worth-while, unless you are using a very large disk or
  190. disk arrays. It is noticeable that most of recent hard disks seem not to
  191. accept more than 64 simultaneous commands. So, using more than 64 queued
  192. commands is probably just resource wasting.
  193. If your controller does not have NVRAM or if it is managed by the SDMS
  194. BIOS/SETUP, you can configure tagged queueing feature and device queue
  195. depths from the boot command-line. For example:
  196. sym53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
  197. will set tagged commands queue depths as follow:
  198. - target 2 all luns on controller 0 --> 15
  199. - target 3 all luns on controller 0 --> 15
  200. - target 4 all luns on controller 0 --> 7
  201. - target 1 lun 0 on controller 1 --> 32
  202. - all other target/lun --> 4
  203. In some special conditions, some SCSI disk firmwares may return a
  204. QUEUE FULL status for a SCSI command. This behaviour is managed by the
  205. driver using the following heuristic:
  206. - Each time a QUEUE FULL status is returned, tagged queue depth is reduced
  207. to the actual number of disconnected commands.
  208. - Every 200 successfully completed SCSI commands, if allowed by the
  209. current limit, the maximum number of queueable commands is incremented.
  210. Since QUEUE FULL status reception and handling is resource wasting, the
  211. driver notifies by default this problem to user by indicating the actual
  212. number of commands used and their status, as well as its decision on the
  213. device queue depth change.
  214. The heuristic used by the driver in handling QUEUE FULL ensures that the
  215. impact on performances is not too bad. You can get rid of the messages by
  216. setting verbose level to zero, as follow:
  217. 1st method: boot your system using 'sym53c8xx=verb:0' option.
  218. 2nd method: apply "setverbose 0" control command to the proc fs entry
  219. corresponding to your controller after boot-up.
  220. 6. Parity checking
  221. The driver supports SCSI parity checking and PCI bus master parity
  222. checking. These features must be enabled in order to ensure safe
  223. data transfers. Some flawed devices or mother boards may have problems
  224. with parity. The options to defeat parity checking have been removed
  225. from the driver.
  226. 7. Profiling information
  227. This driver does not provide profiling information as did its predecessors.
  228. This feature was not this useful and added complexity to the code.
  229. As the driver code got more complex, I have decided to remove everything
  230. that didn't seem actually useful.
  231. 8. Control commands
  232. Control commands can be sent to the driver with write operations to
  233. the proc SCSI file system. The generic command syntax is the
  234. following:
  235. echo "<verb> <parameters>" >/proc/scsi/sym53c8xx/0
  236. (assumes controller number is 0)
  237. Using "all" for "<target>" parameter with the commands below will
  238. apply to all targets of the SCSI chain (except the controller).
  239. Available commands:
  240. 8.1 Set minimum synchronous period factor
  241. setsync <target> <period factor>
  242. target: target number
  243. period: minimum synchronous period.
  244. Maximum speed = 1000/(4*period factor) except for special
  245. cases below.
  246. Specify a period of 0, to force asynchronous transfer mode.
  247. 9 means 12.5 nano-seconds synchronous period
  248. 10 means 25 nano-seconds synchronous period
  249. 11 means 30 nano-seconds synchronous period
  250. 12 means 50 nano-seconds synchronous period
  251. 8.2 Set wide size
  252. setwide <target> <size>
  253. target: target number
  254. size: 0=8 bits, 1=16bits
  255. 8.3 Set maximum number of concurrent tagged commands
  256. settags <target> <tags>
  257. target: target number
  258. tags: number of concurrent tagged commands
  259. must not be greater than configured (default: 16)
  260. 8.4 Set debug mode
  261. setdebug <list of debug flags>
  262. Available debug flags:
  263. alloc: print info about memory allocations (ccb, lcb)
  264. queue: print info about insertions into the command start queue
  265. result: print sense data on CHECK CONDITION status
  266. scatter: print info about the scatter process
  267. scripts: print info about the script binding process
  268. tiny: print minimal debugging information
  269. timing: print timing information of the NCR chip
  270. nego: print information about SCSI negotiations
  271. phase: print information on script interruptions
  272. Use "setdebug" with no argument to reset debug flags.
  273. 8.5 Set flag (no_disc)
  274. setflag <target> <flag>
  275. target: target number
  276. For the moment, only one flag is available:
  277. no_disc: not allow target to disconnect.
  278. Do not specify any flag in order to reset the flag. For example:
  279. - setflag 4
  280. will reset no_disc flag for target 4, so will allow it disconnections.
  281. - setflag all
  282. will allow disconnection for all devices on the SCSI bus.
  283. 8.6 Set verbose level
  284. setverbose #level
  285. The driver default verbose level is 1. This command allows to change
  286. th driver verbose level after boot-up.
  287. 8.7 Reset all logical units of a target
  288. resetdev <target>
  289. target: target number
  290. The driver will try to send a BUS DEVICE RESET message to the target.
  291. 8.8 Abort all tasks of all logical units of a target
  292. cleardev <target>
  293. target: target number
  294. The driver will try to send a ABORT message to all the logical units
  295. of the target.
  296. 9. Configuration parameters
  297. Under kernel configuration tools (make menuconfig, for example), it is
  298. possible to change some default driver configuration parameters.
  299. If the firmware of all your devices is perfect enough, all the
  300. features supported by the driver can be enabled at start-up. However,
  301. if only one has a flaw for some SCSI feature, you can disable the
  302. support by the driver of this feature at linux start-up and enable
  303. this feature after boot-up only for devices that support it safely.
  304. Configuration parameters:
  305. Use normal IO (default answer: n)
  306. Answer "y" if you suspect your mother board to not allow memory mapped I/O.
  307. May slow down performance a little.
  308. Default tagged command queue depth (default answer: 16)
  309. Entering 0 defaults to tagged commands not being used.
  310. This parameter can be specified from the boot command line.
  311. Maximum number of queued commands (default answer: 32)
  312. This option allows you to specify the maximum number of tagged commands
  313. that can be queued to a device. The maximum supported value is 255.
  314. Synchronous transfers frequency (default answer: 80)
  315. This option allows you to specify the frequency in MHz the driver
  316. will use at boot time for synchronous data transfer negotiations.
  317. 0 means "asynchronous data transfers".
  318. 10. Boot setup commands
  319. 10.1 Syntax
  320. Setup commands can be passed to the driver either at boot time or as
  321. parameters to modprobe, as described in Documentation/kernel-parameters.txt
  322. Example of boot setup command under lilo prompt:
  323. lilo: linux root=/dev/sda2 sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
  324. - enable tagged commands, up to 4 tagged commands queued.
  325. - set synchronous negotiation speed to 10 Mega-transfers / second.
  326. - set DEBUG_NEGO flag.
  327. The following command will install the driver module with the same
  328. options as above.
  329. modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
  330. 10.2 Available arguments
  331. 10.2.1 Default number of tagged commands
  332. cmd_per_lun=0 (or cmd_per_lun=1) tagged command queuing disabled
  333. cmd_per_lun=#tags (#tags > 1) tagged command queuing enabled
  334. #tags will be truncated to the max queued commands configuration parameter.
  335. 10.2.2 Burst max
  336. burst=0 burst disabled
  337. burst=255 get burst length from initial IO register settings.
  338. burst=#x burst enabled (1<<#x burst transfers max)
  339. #x is an integer value which is log base 2 of the burst transfers max.
  340. By default the driver uses the maximum value supported by the chip.
  341. 10.2.3 LED support
  342. led=1 enable LED support
  343. led=0 disable LED support
  344. Do not enable LED support if your scsi board does not use SDMS BIOS.
  345. (See 'Configuration parameters')
  346. 10.2.4 Differential mode
  347. diff=0 never set up diff mode
  348. diff=1 set up diff mode if BIOS set it
  349. diff=2 always set up diff mode
  350. diff=3 set diff mode if GPIO3 is not set
  351. 10.2.5 IRQ mode
  352. irqm=0 always open drain
  353. irqm=1 same as initial settings (assumed BIOS settings)
  354. irqm=2 always totem pole
  355. 10.2.6 Check SCSI BUS
  356. buschk=<option bits>
  357. Available option bits:
  358. 0x0: No check.
  359. 0x1: Check and do not attach the controller on error.
  360. 0x2: Check and just warn on error.
  361. 10.2.7 Suggest a default SCSI id for hosts
  362. hostid=255 no id suggested.
  363. hostid=#x (0 < x < 7) x suggested for hosts SCSI id.
  364. If a host SCSI id is available from the NVRAM, the driver will ignore
  365. any value suggested as boot option. Otherwise, if a suggested value
  366. different from 255 has been supplied, it will use it. Otherwise, it will
  367. try to deduce the value previously set in the hardware and use value
  368. 7 if the hardware value is zero.
  369. 10.2.8 Verbosity level
  370. verb=0 minimal
  371. verb=1 normal
  372. verb=2 too much
  373. 10.2.9 Debug mode
  374. debug=0 clear debug flags
  375. debug=#x set debug flags
  376. #x is an integer value combining the following power-of-2 values:
  377. DEBUG_ALLOC 0x1
  378. DEBUG_PHASE 0x2
  379. DEBUG_POLL 0x4
  380. DEBUG_QUEUE 0x8
  381. DEBUG_RESULT 0x10
  382. DEBUG_SCATTER 0x20
  383. DEBUG_SCRIPT 0x40
  384. DEBUG_TINY 0x80
  385. DEBUG_TIMING 0x100
  386. DEBUG_NEGO 0x200
  387. DEBUG_TAGS 0x400
  388. DEBUG_FREEZE 0x800
  389. DEBUG_RESTART 0x1000
  390. You can play safely with DEBUG_NEGO. However, some of these flags may
  391. generate bunches of syslog messages.
  392. 10.2.10 Settle delay
  393. settle=n delay for n seconds
  394. After a bus reset, the driver will delay for n seconds before talking
  395. to any device on the bus. The default is 3 seconds and safe mode will
  396. default it to 10.
  397. 10.2.11 Serial NVRAM
  398. NB: option not currently implemented.
  399. nvram=n do not look for serial NVRAM
  400. nvram=y test controllers for onboard serial NVRAM
  401. (alternate binary form)
  402. nvram=<bits options>
  403. 0x01 look for NVRAM (equivalent to nvram=y)
  404. 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
  405. 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
  406. 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
  407. 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
  408. 10.2.12 Exclude a host from being attached
  409. excl=<io_address>,...
  410. Prevent host at a given io address from being attached.
  411. For example 'excl=0xb400,0xc000' indicate to the
  412. driver not to attach hosts at address 0xb400 and 0xc000.
  413. 10.3 Converting from old style options
  414. Previously, the sym2 driver accepted arguments of the form
  415. sym53c8xx=tags:4,sync:10,debug:0x200
  416. As a result of the new module parameters, this is no longer available.
  417. Most of the options have remained the same, but tags has become
  418. cmd_per_lun to reflect its different purposes. The sample above would
  419. be specified as:
  420. modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200
  421. or on the kernel boot line as:
  422. sym53c8xx.cmd_per_lun=4 sym53c8xx.sync=10 sym53c8xx.debug=0x200
  423. 10.4 SCSI BUS checking boot option.
  424. When this option is set to a non-zero value, the driver checks SCSI lines
  425. logic state, 100 micro-seconds after having asserted the SCSI RESET line.
  426. The driver just reads SCSI lines and checks all lines read FALSE except RESET.
  427. Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
  428. RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
  429. Unfortunately, the following common SCSI BUS problems are not detected:
  430. - Only 1 terminator installed.
  431. - Misplaced terminators.
  432. - Bad quality terminators.
  433. On the other hand, either bad cabling, broken devices, not conformant
  434. devices, ... may cause a SCSI signal to be wrong when te driver reads it.
  435. 15. SCSI problem troubleshooting
  436. 15.1 Problem tracking
  437. Most SCSI problems are due to a non conformant SCSI bus or too buggy
  438. devices. If unfortunately you have SCSI problems, you can check the
  439. following things:
  440. - SCSI bus cables
  441. - terminations at both end of the SCSI chain
  442. - linux syslog messages (some of them may help you)
  443. If you do not find the source of problems, you can configure the
  444. driver or devices in the NVRAM with minimal features.
  445. - only asynchronous data transfers
  446. - tagged commands disabled
  447. - disconnections not allowed
  448. Now, if your SCSI bus is ok, your system has every chance to work
  449. with this safe configuration but performances will not be optimal.
  450. If it still fails, then you can send your problem description to
  451. appropriate mailing lists or news-groups. Send me a copy in order to
  452. be sure I will receive it. Obviously, a bug in the driver code is
  453. possible.
  454. My current email address: Gerard Roudier <groudier@free.fr>
  455. Allowing disconnections is important if you use several devices on
  456. your SCSI bus but often causes problems with buggy devices.
  457. Synchronous data transfers increases throughput of fast devices like
  458. hard disks. Good SCSI hard disks with a large cache gain advantage of
  459. tagged commands queuing.
  460. 15.2 Understanding hardware error reports
  461. When the driver detects an unexpected error condition, it may display a
  462. message of the following pattern.
  463. sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
  464. sym0: script cmd = 19000000
  465. sym0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
  466. Some fields in such a message may help you understand the cause of the
  467. problem, as follows:
  468. sym0:1: ERROR (0:48) (1-21-65) (f/95/0) @ (script 7c0:19000000).
  469. .....A.........B.C....D.E..F....G.H..I.......J.....K...L.......
  470. Field A : target number.
  471. SCSI ID of the device the controller was talking with at the moment the
  472. error occurs.
  473. Field B : DSTAT io register (DMA STATUS)
  474. Bit 0x40 : MDPE Master Data Parity Error
  475. Data parity error detected on the PCI BUS.
  476. Bit 0x20 : BF Bus Fault
  477. PCI bus fault condition detected
  478. Bit 0x01 : IID Illegal Instruction Detected
  479. Set by the chip when it detects an Illegal Instruction format
  480. on some condition that makes an instruction illegal.
  481. Bit 0x80 : DFE Dma Fifo Empty
  482. Pure status bit that does not indicate an error.
  483. If the reported DSTAT value contains a combination of MDPE (0x40),
  484. BF (0x20), then the cause may be likely due to a PCI BUS problem.
  485. Field C : SIST io register (SCSI Interrupt Status)
  486. Bit 0x08 : SGE SCSI GROSS ERROR
  487. Indicates that the chip detected a severe error condition
  488. on the SCSI BUS that prevents the SCSI protocol from functioning
  489. properly.
  490. Bit 0x04 : UDC Unexpected Disconnection
  491. Indicates that the device released the SCSI BUS when the chip
  492. was not expecting this to happen. A device may behave so to
  493. indicate the SCSI initiator that an error condition not reportable using the SCSI protocol has occurred.
  494. Bit 0x02 : RST SCSI BUS Reset
  495. Generally SCSI targets do not reset the SCSI BUS, although any
  496. device on the BUS can reset it at any time.
  497. Bit 0x01 : PAR Parity
  498. SCSI parity error detected.
  499. On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
  500. PAR (0x01) may be detected by the chip. If your SCSI system sometimes
  501. encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
  502. BUS problem is likely the cause of these errors.
  503. For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
  504. that contains some minimal comments on IO register bits.
  505. Field D : SOCL Scsi Output Control Latch
  506. This register reflects the state of the SCSI control lines the
  507. chip want to drive or compare against.
  508. Field E : SBCL Scsi Bus Control Lines
  509. Actual value of control lines on the SCSI BUS.
  510. Field F : SBDL Scsi Bus Data Lines
  511. Actual value of data lines on the SCSI BUS.
  512. Field G : SXFER SCSI Transfer
  513. Contains the setting of the Synchronous Period for output and
  514. the current Synchronous offset (offset 0 means asynchronous).
  515. Field H : SCNTL3 Scsi Control Register 3
  516. Contains the setting of timing values for both asynchronous and
  517. synchronous data transfers.
  518. Field I : SCNTL4 Scsi Control Register 4
  519. Only meaningful for 53C1010 Ultra3 controllers.
  520. Understanding Fields J, K, L and dumps requires to have good knowledge of
  521. SCSI standards, chip cores functionnals and internal driver data structures.
  522. You are not required to decode and understand them, unless you want to help
  523. maintain the driver code.
  524. 17. Serial NVRAM (added by Richard Waltham: dormouse@farsrobt.demon.co.uk)
  525. 17.1 Features
  526. Enabling serial NVRAM support enables detection of the serial NVRAM included
  527. on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
  528. serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
  529. host adaptor and its attached drives.
  530. The Symbios NVRAM also holds data on the boot order of host adaptors in a
  531. system with more than one host adaptor. This information is no longer used
  532. as it's fundamentally incompatible with the hotplug PCI model.
  533. Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
  534. and this is used to distinguish between Symbios compatible and Tekram host
  535. adaptors. This is used to disable the Symbios compatible "diff" setting
  536. incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
  537. configuration parameter is set enabling both Symbios and Tekram boards to be
  538. used together with the Symbios cards using all their features, including
  539. "diff" support. ("led pin" support for Symbios compatible cards can remain
  540. enabled when using Tekram cards. It does nothing useful for Tekram host
  541. adaptors but does not cause problems either.)
  542. The parameters the driver is able to get from the NVRAM depend on the
  543. data format used, as follow:
  544. Tekram format Symbios format
  545. General and host parameters
  546. Boot order N Y
  547. Host SCSI ID Y Y
  548. SCSI parity checking Y Y
  549. Verbose boot messages N Y
  550. SCSI devices parameters
  551. Synchronous transfer speed Y Y
  552. Wide 16 / Narrow Y Y
  553. Tagged Command Queuing enabled Y Y
  554. Disconnections enabled Y Y
  555. Scan at boot time N Y
  556. In order to speed up the system boot, for each device configured without
  557. the "scan at boot time" option, the driver forces an error on the
  558. first TEST UNIT READY command received for this device.
  559. 17.2 Symbios NVRAM layout
  560. typical data at NVRAM address 0x100 (53c810a NVRAM)
  561. -----------------------------------------------------------
  562. 00 00
  563. 64 01
  564. 8e 0b
  565. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
  566. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62
  567. 04 00 03 00 00 10 00 58 00 00 01 00 00 63
  568. 04 00 01 00 00 10 00 48 00 00 01 00 00 61
  569. 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  570. 0f 00 08 08 64 00 0a 00
  571. 0f 00 08 08 64 00 0a 00
  572. 0f 00 08 08 64 00 0a 00
  573. 0f 00 08 08 64 00 0a 00
  574. 0f 00 08 08 64 00 0a 00
  575. 0f 00 08 08 64 00 0a 00
  576. 0f 00 08 08 64 00 0a 00
  577. 0f 00 08 08 64 00 0a 00
  578. 0f 00 08 08 64 00 0a 00
  579. 0f 00 08 08 64 00 0a 00
  580. 0f 00 08 08 64 00 0a 00
  581. 0f 00 08 08 64 00 0a 00
  582. 0f 00 08 08 64 00 0a 00
  583. 0f 00 08 08 64 00 0a 00
  584. 0f 00 08 08 64 00 0a 00
  585. 0f 00 08 08 64 00 0a 00
  586. 00 00 00 00 00 00 00 00
  587. 00 00 00 00 00 00 00 00
  588. 00 00 00 00 00 00 00 00
  589. 00 00 00 00 00 00 00 00
  590. 00 00 00 00 00 00 00 00
  591. 00 00 00 00 00 00 00 00
  592. 00 00 00 00 00 00 00 00
  593. 00 00 00 00 00 00 00 00
  594. 00 00 00 00 00 00 00 00
  595. 00 00 00 00 00 00 00 00
  596. 00 00 00 00 00 00 00 00
  597. 00 00 00 00 00 00 00 00
  598. 00 00 00 00 00 00 00 00
  599. 00 00 00 00 00 00 00 00
  600. 00 00 00 00 00 00 00 00
  601. 00 00 00 00 00 00 00 00
  602. 00 00 00 00 00 00 00 00
  603. 00 00 00 00 00 00 00 00
  604. 00 00 00 00 00 00 00 00
  605. fe fe
  606. 00 00
  607. 00 00
  608. -----------------------------------------------------------
  609. NVRAM layout details
  610. NVRAM Address 0x000-0x0ff not used
  611. 0x100-0x26f initialised data
  612. 0x270-0x7ff not used
  613. general layout
  614. header - 6 bytes,
  615. data - 356 bytes (checksum is byte sum of this data)
  616. trailer - 6 bytes
  617. ---
  618. total 368 bytes
  619. data area layout
  620. controller set up - 20 bytes
  621. boot configuration - 56 bytes (4x14 bytes)
  622. device set up - 128 bytes (16x8 bytes)
  623. unused (spare?) - 152 bytes (19x8 bytes)
  624. ---
  625. total 356 bytes
  626. -----------------------------------------------------------
  627. header
  628. 00 00 - ?? start marker
  629. 64 01 - byte count (lsb/msb excludes header/trailer)
  630. 8e 0b - checksum (lsb/msb excludes header/trailer)
  631. -----------------------------------------------------------
  632. controller set up
  633. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
  634. | | | |
  635. | | | -- host ID
  636. | | |
  637. | | --Removable Media Support
  638. | | 0x00 = none
  639. | | 0x01 = Bootable Device
  640. | | 0x02 = All with Media
  641. | |
  642. | --flag bits 2
  643. | 0x00000001= scan order hi->low
  644. | (default 0x00 - scan low->hi)
  645. --flag bits 1
  646. 0x00000001 scam enable
  647. 0x00000010 parity enable
  648. 0x00000100 verbose boot msgs
  649. remaining bytes unknown - they do not appear to change in my
  650. current set up for any of the controllers.
  651. default set up is identical for 53c810a and 53c875 NVRAM
  652. (Removable Media added Symbios BIOS version 4.09)
  653. -----------------------------------------------------------
  654. boot configuration
  655. boot order set by order of the devices in this table
  656. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
  657. 04 00 03 00 00 10 00 58 00 00 01 00 00 63 2nd controller
  658. 04 00 01 00 00 10 00 48 00 00 01 00 00 61 3rd controller
  659. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4th controller
  660. | | | | | | | |
  661. | | | | | | ---- PCI io port adr
  662. | | | | | --0x01 init/scan at boot time
  663. | | | | --PCI device/function number (0xdddddfff)
  664. | | ----- ?? PCI vendor ID (lsb/msb)
  665. ----PCI device ID (lsb/msb)
  666. ?? use of this data is a guess but seems reasonable
  667. remaining bytes unknown - they do not appear to change in my
  668. current set up
  669. default set up is identical for 53c810a and 53c875 NVRAM
  670. -----------------------------------------------------------
  671. device set up (up to 16 devices - includes controller)
  672. 0f 00 08 08 64 00 0a 00 - id 0
  673. 0f 00 08 08 64 00 0a 00
  674. 0f 00 08 08 64 00 0a 00
  675. 0f 00 08 08 64 00 0a 00
  676. 0f 00 08 08 64 00 0a 00
  677. 0f 00 08 08 64 00 0a 00
  678. 0f 00 08 08 64 00 0a 00
  679. 0f 00 08 08 64 00 0a 00
  680. 0f 00 08 08 64 00 0a 00
  681. 0f 00 08 08 64 00 0a 00
  682. 0f 00 08 08 64 00 0a 00
  683. 0f 00 08 08 64 00 0a 00
  684. 0f 00 08 08 64 00 0a 00
  685. 0f 00 08 08 64 00 0a 00
  686. 0f 00 08 08 64 00 0a 00
  687. 0f 00 08 08 64 00 0a 00 - id 15
  688. | | | | | |
  689. | | | | ----timeout (lsb/msb)
  690. | | | --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
  691. | | | (0x30 20 Mtrans/sec- fast 20)
  692. | | | (0x64 10 Mtrans/sec- fast )
  693. | | | (0xc8 5 Mtrans/sec)
  694. | | | (0x00 asynchronous)
  695. | | -- ?? max sync offset (0x08 in NVRAM on 53c810a)
  696. | | (0x10 in NVRAM on 53c875)
  697. | --device bus width (0x08 narrow)
  698. | (0x10 16 bit wide)
  699. --flag bits
  700. 0x00000001 - disconnect enabled
  701. 0x00000010 - scan at boot time
  702. 0x00000100 - scan luns
  703. 0x00001000 - queue tags enabled
  704. remaining bytes unknown - they do not appear to change in my
  705. current set up
  706. ?? use of this data is a guess but seems reasonable
  707. (but it could be max bus width)
  708. default set up for 53c810a NVRAM
  709. default set up for 53c875 NVRAM - bus width - 0x10
  710. - sync offset ? - 0x10
  711. - sync period - 0x30
  712. -----------------------------------------------------------
  713. ?? spare device space (32 bit bus ??)
  714. 00 00 00 00 00 00 00 00 (19x8bytes)
  715. .
  716. .
  717. 00 00 00 00 00 00 00 00
  718. default set up is identical for 53c810a and 53c875 NVRAM
  719. -----------------------------------------------------------
  720. trailer
  721. fe fe - ? end marker ?
  722. 00 00
  723. 00 00
  724. default set up is identical for 53c810a and 53c875 NVRAM
  725. -----------------------------------------------------------
  726. 17.3 Tekram NVRAM layout
  727. nvram 64x16 (1024 bit)
  728. Drive settings
  729. Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
  730. (addr 0x0yyyy1 = 0x0000)
  731. x x x x x x x x x x x x x x x x
  732. | | | | | | | | |
  733. | | | | | | | | ----- parity check 0 - off
  734. | | | | | | | | 1 - on
  735. | | | | | | | |
  736. | | | | | | | ------- sync neg 0 - off
  737. | | | | | | | 1 - on
  738. | | | | | | |
  739. | | | | | | --------- disconnect 0 - off
  740. | | | | | | 1 - on
  741. | | | | | |
  742. | | | | | ----------- start cmd 0 - off
  743. | | | | | 1 - on
  744. | | | | |
  745. | | | | -------------- tagged cmds 0 - off
  746. | | | | 1 - on
  747. | | | |
  748. | | | ---------------- wide neg 0 - off
  749. | | | 1 - on
  750. | | |
  751. --------------------------- sync rate 0 - 10.0 Mtrans/sec
  752. 1 - 8.0
  753. 2 - 6.6
  754. 3 - 5.7
  755. 4 - 5.0
  756. 5 - 4.0
  757. 6 - 3.0
  758. 7 - 2.0
  759. 7 - 2.0
  760. 8 - 20.0
  761. 9 - 16.7
  762. a - 13.9
  763. b - 11.9
  764. Global settings
  765. Host flags 0 (addr 0x100000, 32)
  766. x x x x x x x x x x x x x x x x
  767. | | | | | | | | | | | |
  768. | | | | | | | | ----------- host ID 0x00 - 0x0f
  769. | | | | | | | |
  770. | | | | | | | ----------------------- support for 0 - off
  771. | | | | | | | > 2 drives 1 - on
  772. | | | | | | |
  773. | | | | | | ------------------------- support drives 0 - off
  774. | | | | | | > 1Gbytes 1 - on
  775. | | | | | |
  776. | | | | | --------------------------- bus reset on 0 - off
  777. | | | | | power on 1 - on
  778. | | | | |
  779. | | | | ----------------------------- active neg 0 - off
  780. | | | | 1 - on
  781. | | | |
  782. | | | -------------------------------- imm seek 0 - off
  783. | | | 1 - on
  784. | | |
  785. | | ---------------------------------- scan luns 0 - off
  786. | | 1 - on
  787. | |
  788. -------------------------------------- removable 0 - disable
  789. as BIOS dev 1 - boot device
  790. 2 - all
  791. Host flags 1 (addr 0x100001, 33)
  792. x x x x x x x x x x x x x x x x
  793. | | | | | |
  794. | | | --------- boot delay 0 - 3 sec
  795. | | | 1 - 5
  796. | | | 2 - 10
  797. | | | 3 - 20
  798. | | | 4 - 30
  799. | | | 5 - 60
  800. | | | 6 - 120
  801. | | |
  802. --------------------------- max tag cmds 0 - 2
  803. 1 - 4
  804. 2 - 8
  805. 3 - 16
  806. 4 - 32
  807. Host flags 2 (addr 0x100010, 34)
  808. x x x x x x x x x x x x x x x x
  809. |
  810. ----- F2/F6 enable 0 - off ???
  811. 1 - on ???
  812. checksum (addr 0x111111)
  813. checksum = 0x1234 - (sum addr 0-63)
  814. ----------------------------------------------------------------------------
  815. default nvram data:
  816. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  817. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  818. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  819. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  820. 0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
  821. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  822. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  823. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
  824. ===============================================================================
  825. End of Linux SYM-2 driver documentation file