ncr53c8xx.rst 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =================================================
  3. The Linux NCR53C8XX/SYM53C8XX drivers README file
  4. =================================================
  5. Written by Gerard Roudier <[email protected]>
  6. 21 Rue Carnot
  7. 95170 DEUIL LA BARRE - FRANCE
  8. 29 May 1999
  9. .. Contents:
  10. 1. Introduction
  11. 2. Supported chips and SCSI features
  12. 3. Advantages of the enhanced 896 driver
  13. 3.1 Optimized SCSI SCRIPTS
  14. 3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
  15. 4. Memory mapped I/O versus normal I/O
  16. 5. Tagged command queueing
  17. 6. Parity checking
  18. 7. Profiling information
  19. 8. Control commands
  20. 8.1 Set minimum synchronous period
  21. 8.2 Set wide size
  22. 8.3 Set maximum number of concurrent tagged commands
  23. 8.4 Set order type for tagged command
  24. 8.5 Set debug mode
  25. 8.6 Clear profile counters
  26. 8.7 Set flag (no_disc)
  27. 8.8 Set verbose level
  28. 8.9 Reset all logical units of a target
  29. 8.10 Abort all tasks of all logical units of a target
  30. 9. Configuration parameters
  31. 10. Boot setup commands
  32. 10.1 Syntax
  33. 10.2 Available arguments
  34. 10.2.1 Master parity checking
  35. 10.2.2 Scsi parity checking
  36. 10.2.3 Scsi disconnections
  37. 10.2.4 Special features
  38. 10.2.5 Ultra SCSI support
  39. 10.2.6 Default number of tagged commands
  40. 10.2.7 Default synchronous period factor
  41. 10.2.8 Negotiate synchronous with all devices
  42. 10.2.9 Verbosity level
  43. 10.2.10 Debug mode
  44. 10.2.11 Burst max
  45. 10.2.12 LED support
  46. 10.2.13 Max wide
  47. 10.2.14 Differential mode
  48. 10.2.15 IRQ mode
  49. 10.2.16 Reverse probe
  50. 10.2.17 Fix up PCI configuration space
  51. 10.2.18 Serial NVRAM
  52. 10.2.19 Check SCSI BUS
  53. 10.2.20 Exclude a host from being attached
  54. 10.2.21 Suggest a default SCSI id for hosts
  55. 10.2.22 Enable use of IMMEDIATE ARBITRATION
  56. 10.3 Advised boot setup commands
  57. 10.4 PCI configuration fix-up boot option
  58. 10.5 Serial NVRAM support boot option
  59. 10.6 SCSI BUS checking boot option
  60. 10.7 IMMEDIATE ARBITRATION boot option
  61. 11. Some constants and flags of the ncr53c8xx.h header file
  62. 12. Installation
  63. 13. Architecture dependent features
  64. 14. Known problems
  65. 14.1 Tagged commands with Iomega Jaz device
  66. 14.2 Device names change when another controller is added
  67. 14.3 Using only 8 bit devices with a WIDE SCSI controller.
  68. 14.4 Possible data corruption during a Memory Write and Invalidate
  69. 14.5 IRQ sharing problems
  70. 15. SCSI problem troubleshooting
  71. 15.1 Problem tracking
  72. 15.2 Understanding hardware error reports
  73. 16. Synchronous transfer negotiation tables
  74. 16.1 Synchronous timings for 53C875 and 53C860 Ultra-SCSI controllers
  75. 16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
  76. 17. Serial NVRAM support (by Richard Waltham)
  77. 17.1 Features
  78. 17.2 Symbios NVRAM layout
  79. 17.3 Tekram NVRAM layout
  80. 18. Support for Big Endian
  81. 18.1 Big Endian CPU
  82. 18.2 NCR chip in Big Endian mode of operations
  83. 1. Introduction
  84. ===============
  85. The initial Linux ncr53c8xx driver has been a port of the ncr driver from
  86. FreeBSD that has been achieved in November 1995 by:
  87. - Gerard Roudier <[email protected]>
  88. The original driver has been written for 386bsd and FreeBSD by:
  89. - Wolfgang Stanglmeier <[email protected]>
  90. - Stefan Esser <[email protected]>
  91. It is now available as a bundle of 2 drivers:
  92. - ncr53c8xx generic driver that supports all the SYM53C8XX family including
  93. the earliest 810 rev. 1, the latest 896 (2 channel LVD SCSI controller) and
  94. the new 895A (1 channel LVD SCSI controller).
  95. - sym53c8xx enhanced driver (a.k.a. 896 drivers) that drops support of oldest
  96. chips in order to gain advantage of new features, as LOAD/STORE instructions
  97. available since the 810A and hardware phase mismatch available with the
  98. 896 and the 895A.
  99. You can find technical information about the NCR 8xx family in the
  100. PCI-HOWTO written by Michael Will and in the SCSI-HOWTO written by
  101. Drew Eckhardt.
  102. Information about new chips is available at LSILOGIC web server:
  103. - http://www.lsilogic.com/
  104. SCSI standard documentations are available at SYMBIOS ftp server:
  105. - ftp://ftp.symbios.com/
  106. Useful SCSI tools written by Eric Youngdale are available at tsx-11:
  107. - ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsiinfo-X.Y.tar.gz
  108. - ftp://tsx-11.mit.edu/pub/linux/ALPHA/scsi/scsidev-X.Y.tar.gz
  109. These tools are not ALPHA but quite clean and work quite well.
  110. It is essential you have the 'scsiinfo' package.
  111. This short documentation describes the features of the generic and enhanced
  112. drivers, configuration parameters and control commands available through
  113. the proc SCSI file system read / write operations.
  114. This driver has been tested OK with linux/i386, Linux/Alpha and Linux/PPC.
  115. Latest driver version and patches are available at:
  116. - ftp://ftp.tux.org/pub/people/gerard-roudier
  117. or
  118. - ftp://ftp.symbios.com/mirror/ftp.tux.org/pub/tux/roudier/drivers
  119. I am not a native speaker of English and there are probably lots of
  120. mistakes in this README file. Any help will be welcome.
  121. 2. Supported chips and SCSI features
  122. ====================================
  123. The following features are supported for all chips:
  124. - Synchronous negotiation
  125. - Disconnection
  126. - Tagged command queuing
  127. - SCSI parity checking
  128. - Master parity checking
  129. "Wide negotiation" is supported for chips that allow it. The
  130. following table shows some characteristics of NCR 8xx family chips
  131. and what drivers support them.
  132. +--------+-----------+-----+-----------+------------+------------+------------+
  133. | | | | | |Supported by|Supported by|
  134. | |On board | | | |the generic |the enhanced|
  135. |Chip |SDMS BIOS |Wide |SCSI std. | Max. sync |driver |driver |
  136. +--------+-----------+-----+-----------+------------+------------+------------+
  137. |810 | N | N | FAST10 | 10 MB/s | Y | N |
  138. +--------+-----------+-----+-----------+------------+------------+------------+
  139. |810A | N | N | FAST10 | 10 MB/s | Y | Y |
  140. +--------+-----------+-----+-----------+------------+------------+------------+
  141. |815 | Y | N | FAST10 | 10 MB/s | Y | N |
  142. +--------+-----------+-----+-----------+------------+------------+------------+
  143. |825 | Y | Y | FAST10 | 20 MB/s | Y | N |
  144. +--------+-----------+-----+-----------+------------+------------+------------+
  145. |825A | Y | Y | FAST10 | 20 MB/s | Y | Y |
  146. +--------+-----------+-----+-----------+------------+------------+------------+
  147. |860 | N | N | FAST20 | 20 MB/s | Y | Y |
  148. +--------+-----------+-----+-----------+------------+------------+------------+
  149. |875 | Y | Y | FAST20 | 40 MB/s | Y | Y |
  150. +--------+-----------+-----+-----------+------------+------------+------------+
  151. |876 | Y | Y | FAST20 | 40 MB/s | Y | Y |
  152. +--------+-----------+-----+-----------+------------+------------+------------+
  153. |895 | Y | Y | FAST40 | 80 MB/s | Y | Y |
  154. +--------+-----------+-----+-----------+------------+------------+------------+
  155. |895A | Y | Y | FAST40 | 80 MB/s | Y | Y |
  156. +--------+-----------+-----+-----------+------------+------------+------------+
  157. |896 | Y | Y | FAST40 | 80 MB/s | Y | Y |
  158. +--------+-----------+-----+-----------+------------+------------+------------+
  159. |897 | Y | Y | FAST40 | 80 MB/s | Y | Y |
  160. +--------+-----------+-----+-----------+------------+------------+------------+
  161. |1510D | Y | Y | FAST40 | 80 MB/s | Y | Y |
  162. +--------+-----------+-----+-----------+------------+------------+------------+
  163. |1010 | Y | Y | FAST80 |160 MB/s | N | Y |
  164. +--------+-----------+-----+-----------+------------+------------+------------+
  165. |1010_66 | Y | Y | FAST80 |160 MB/s | N | Y |
  166. |[1]_ | | | | | | |
  167. +--------+-----------+-----+-----------+------------+------------+------------+
  168. .. [1] Chip supports 33MHz and 66MHz PCI buses.
  169. Summary of other supported features:
  170. :Module: allow to load the driver
  171. :Memory mapped I/O: increases performance
  172. :Profiling information: read operations from the proc SCSI file system
  173. :Control commands: write operations to the proc SCSI file system
  174. :Debugging information: written to syslog (expert only)
  175. :Serial NVRAM: Symbios and Tekram formats
  176. - Scatter / gather
  177. - Shared interrupt
  178. - Boot setup commands
  179. 3. Advantages of the enhanced 896 driver
  180. ========================================
  181. 3.1 Optimized SCSI SCRIPTS
  182. --------------------------
  183. The 810A, 825A, 875, 895, 896 and 895A support new SCSI SCRIPTS instructions
  184. named LOAD and STORE that allow to move up to 1 DWORD from/to an IO register
  185. to/from memory much faster that the MOVE MEMORY instruction that is supported
  186. by the 53c7xx and 53c8xx family.
  187. The LOAD/STORE instructions support absolute and DSA relative addressing
  188. modes. The SCSI SCRIPTS had been entirely rewritten using LOAD/STORE instead
  189. of MOVE MEMORY instructions.
  190. 3.2 New features of the SYM53C896 (64 bit PCI dual LVD SCSI controller)
  191. -----------------------------------------------------------------------
  192. The 896 and the 895A allows handling of the phase mismatch context from
  193. SCRIPTS (avoids the phase mismatch interrupt that stops the SCSI processor
  194. until the C code has saved the context of the transfer).
  195. Implementing this without using LOAD/STORE instructions would be painful
  196. and I didn't even want to try it.
  197. The 896 chip supports 64 bit PCI transactions and addressing, while the
  198. 895A supports 32 bit PCI transactions and 64 bit addressing.
  199. The SCRIPTS processor of these chips is not true 64 bit, but uses segment
  200. registers for bit 32-63. Another interesting feature is that LOAD/STORE
  201. instructions that address the on-chip RAM (8k) remain internal to the chip.
  202. Due to the use of LOAD/STORE SCRIPTS instructions, this driver does not
  203. support the following chips:
  204. - SYM53C810 revision < 0x10 (16)
  205. - SYM53C815 all revisions
  206. - SYM53C825 revision < 0x10 (16)
  207. 4. Memory mapped I/O versus normal I/O
  208. ======================================
  209. Memory mapped I/O has less latency than normal I/O. Since
  210. linux-1.3.x, memory mapped I/O is used rather than normal I/O. Memory
  211. mapped I/O seems to work fine on most hardware configurations, but
  212. some poorly designed motherboards may break this feature.
  213. The configuration option CONFIG_SCSI_NCR53C8XX_IOMAPPED forces the
  214. driver to use normal I/O in all cases.
  215. 5. Tagged command queueing
  216. ==========================
  217. Queuing more than 1 command at a time to a device allows it to perform
  218. optimizations based on actual head positions and its mechanical
  219. characteristics. This feature may also reduce average command latency.
  220. In order to really gain advantage of this feature, devices must have
  221. a reasonable cache size (No miracle is to be expected for a low-end
  222. hard disk with 128 KB or less).
  223. Some known SCSI devices do not properly support tagged command queuing.
  224. Generally, firmware revisions that fix this kind of problems are available
  225. at respective vendor web/ftp sites.
  226. All I can say is that the hard disks I use on my machines behave well with
  227. this driver with tagged command queuing enabled:
  228. - IBM S12 0662
  229. - Conner 1080S
  230. - Quantum Atlas I
  231. - Quantum Atlas II
  232. If your controller has NVRAM, you can configure this feature per target
  233. from the user setup tool. The Tekram Setup program allows to tune the
  234. maximum number of queued commands up to 32. The Symbios Setup only allows
  235. to enable or disable this feature.
  236. The maximum number of simultaneous tagged commands queued to a device
  237. is currently set to 8 by default. This value is suitable for most SCSI
  238. disks. With large SCSI disks (>= 2GB, cache >= 512KB, average seek time
  239. <= 10 ms), using a larger value may give better performances.
  240. The sym53c8xx driver supports up to 255 commands per device, and the
  241. generic ncr53c8xx driver supports up to 64, but using more than 32 is
  242. generally not worth-while, unless you are using a very large disk or disk
  243. array. It is noticeable that most of recent hard disks seem not to accept
  244. more than 64 simultaneous commands. So, using more than 64 queued commands
  245. is probably just resource wasting.
  246. If your controller does not have NVRAM or if it is managed by the SDMS
  247. BIOS/SETUP, you can configure tagged queueing feature and device queue
  248. depths from the boot command-line. For example::
  249. ncr53c8xx=tags:4/t2t3q15-t4q7/t1u0q32
  250. will set tagged commands queue depths as follow:
  251. - target 2 all luns on controller 0 --> 15
  252. - target 3 all luns on controller 0 --> 15
  253. - target 4 all luns on controller 0 --> 7
  254. - target 1 lun 0 on controller 1 --> 32
  255. - all other target/lun --> 4
  256. In some special conditions, some SCSI disk firmwares may return a
  257. QUEUE FULL status for a SCSI command. This behaviour is managed by the
  258. driver using the following heuristic:
  259. - Each time a QUEUE FULL status is returned, tagged queue depth is reduced
  260. to the actual number of disconnected commands.
  261. - Every 1000 successfully completed SCSI commands, if allowed by the
  262. current limit, the maximum number of queueable commands is incremented.
  263. Since QUEUE FULL status reception and handling is resource wasting, the
  264. driver notifies by default this problem to user by indicating the actual
  265. number of commands used and their status, as well as its decision on the
  266. device queue depth change.
  267. The heuristic used by the driver in handling QUEUE FULL ensures that the
  268. impact on performances is not too bad. You can get rid of the messages by
  269. setting verbose level to zero, as follow:
  270. 1st method:
  271. boot your system using 'ncr53c8xx=verb:0' option.
  272. 2nd method:
  273. apply "setverbose 0" control command to the proc fs entry
  274. corresponding to your controller after boot-up.
  275. 6. Parity checking
  276. ==================
  277. The driver supports SCSI parity checking and PCI bus master parity
  278. checking. These features must be enabled in order to ensure safe data
  279. transfers. However, some flawed devices or mother boards will have
  280. problems with parity. You can disable either PCI parity or SCSI parity
  281. checking by entering appropriate options from the boot command line.
  282. (See 10: Boot setup commands).
  283. 7. Profiling information
  284. ========================
  285. Profiling information is available through the proc SCSI file system.
  286. Since gathering profiling information may impact performances, this
  287. feature is disabled by default and requires a compilation configuration
  288. option to be set to Y.
  289. The device associated with a host has the following pathname::
  290. /proc/scsi/ncr53c8xx/N (N=0,1,2 ....)
  291. Generally, only 1 board is used on hardware configuration, and that device is::
  292. /proc/scsi/ncr53c8xx/0
  293. However, if the driver has been made as module, the number of the
  294. hosts is incremented each time the driver is loaded.
  295. In order to display profiling information, just enter::
  296. cat /proc/scsi/ncr53c8xx/0
  297. and you will get something like the following text::
  298. General information:
  299. Chip NCR53C810, device id 0x1, revision id 0x2
  300. IO port address 0x6000, IRQ number 10
  301. Using memory mapped IO at virtual address 0x282c000
  302. Synchronous transfer period 25, max commands per lun 4
  303. Profiling information:
  304. num_trans = 18014
  305. num_kbytes = 671314
  306. num_disc = 25763
  307. num_break = 1673
  308. num_int = 1685
  309. num_fly = 18038
  310. ms_setup = 4940
  311. ms_data = 369940
  312. ms_disc = 183090
  313. ms_post = 1320
  314. General information is easy to understand. The device ID and the
  315. revision ID identify the SCSI chip as follows:
  316. ======= ============= ===========
  317. Chip Device id Revision Id
  318. ======= ============= ===========
  319. 810 0x1 < 0x10
  320. 810A 0x1 >= 0x10
  321. 815 0x4
  322. 825 0x3 < 0x10
  323. 860 0x6
  324. 825A 0x3 >= 0x10
  325. 875 0xf
  326. 895 0xc
  327. ======= ============= ===========
  328. The profiling information is updated upon completion of SCSI commands.
  329. A data structure is allocated and zeroed when the host adapter is
  330. attached. So, if the driver is a module, the profile counters are
  331. cleared each time the driver is loaded. The "clearprof" command
  332. allows you to clear these counters at any time.
  333. The following counters are available:
  334. ("num" prefix means "number of",
  335. "ms" means milli-seconds)
  336. num_trans
  337. Number of completed commands
  338. Example above: 18014 completed commands
  339. num_kbytes
  340. Number of kbytes transferred
  341. Example above: 671 MB transferred
  342. num_disc
  343. Number of SCSI disconnections
  344. Example above: 25763 SCSI disconnections
  345. num_break
  346. number of script interruptions (phase mismatch)
  347. Example above: 1673 script interruptions
  348. num_int
  349. Number of interrupts other than "on the fly"
  350. Example above: 1685 interruptions not "on the fly"
  351. num_fly
  352. Number of interrupts "on the fly"
  353. Example above: 18038 interruptions "on the fly"
  354. ms_setup
  355. Elapsed time for SCSI commands setups
  356. Example above: 4.94 seconds
  357. ms_data
  358. Elapsed time for data transfers
  359. Example above: 369.94 seconds spent for data transfer
  360. ms_disc
  361. Elapsed time for SCSI disconnections
  362. Example above: 183.09 seconds spent disconnected
  363. ms_post
  364. Elapsed time for command post processing
  365. (time from SCSI status get to command completion call)
  366. Example above: 1.32 seconds spent for post processing
  367. Due to the 1/100 second tick of the system clock, "ms_post" time may
  368. be wrong.
  369. In the example above, we got 18038 interrupts "on the fly" and only
  370. 1673 script breaks generally due to disconnections inside a segment
  371. of the scatter list.
  372. 8. Control commands
  373. ===================
  374. Control commands can be sent to the driver with write operations to
  375. the proc SCSI file system. The generic command syntax is the
  376. following::
  377. echo "<verb> <parameters>" >/proc/scsi/ncr53c8xx/0
  378. (assumes controller number is 0)
  379. Using "all" for "<target>" parameter with the commands below will
  380. apply to all targets of the SCSI chain (except the controller).
  381. Available commands:
  382. 8.1 Set minimum synchronous period factor
  383. -----------------------------------------
  384. setsync <target> <period factor>
  385. :target: target number
  386. :period: minimum synchronous period.
  387. Maximum speed = 1000/(4*period factor) except for special
  388. cases below.
  389. Specify a period of 255, to force asynchronous transfer mode.
  390. - 10 means 25 nano-seconds synchronous period
  391. - 11 means 30 nano-seconds synchronous period
  392. - 12 means 50 nano-seconds synchronous period
  393. 8.2 Set wide size
  394. -----------------
  395. setwide <target> <size>
  396. :target: target number
  397. :size: 0=8 bits, 1=16bits
  398. 8.3 Set maximum number of concurrent tagged commands
  399. ----------------------------------------------------
  400. settags <target> <tags>
  401. :target: target number
  402. :tags: number of concurrent tagged commands
  403. must not be greater than SCSI_NCR_MAX_TAGS (default: 8)
  404. 8.4 Set order type for tagged command
  405. -------------------------------------
  406. setorder <order>
  407. :order: 3 possible values:
  408. simple:
  409. use SIMPLE TAG for all operations (read and write)
  410. ordered:
  411. use ORDERED TAG for all operations
  412. default:
  413. use default tag type,
  414. SIMPLE TAG for read operations
  415. ORDERED TAG for write operations
  416. 8.5 Set debug mode
  417. ------------------
  418. setdebug <list of debug flags>
  419. Available debug flags:
  420. ======== ========================================================
  421. alloc print info about memory allocations (ccb, lcb)
  422. queue print info about insertions into the command start queue
  423. result print sense data on CHECK CONDITION status
  424. scatter print info about the scatter process
  425. scripts print info about the script binding process
  426. tiny print minimal debugging information
  427. timing print timing information of the NCR chip
  428. nego print information about SCSI negotiations
  429. phase print information on script interruptions
  430. ======== ========================================================
  431. Use "setdebug" with no argument to reset debug flags.
  432. 8.6 Clear profile counters
  433. --------------------------
  434. clearprof
  435. The profile counters are automatically cleared when the amount of
  436. data transferred reaches 1000 GB in order to avoid overflow.
  437. The "clearprof" command allows you to clear these counters at any time.
  438. 8.7 Set flag (no_disc)
  439. ----------------------
  440. setflag <target> <flag>
  441. target: target number
  442. For the moment, only one flag is available:
  443. no_disc: not allow target to disconnect.
  444. Do not specify any flag in order to reset the flag. For example:
  445. setflag 4
  446. will reset no_disc flag for target 4, so will allow it disconnections.
  447. setflag all
  448. will allow disconnection for all devices on the SCSI bus.
  449. 8.8 Set verbose level
  450. ---------------------
  451. setverbose #level
  452. The driver default verbose level is 1. This command allows to change
  453. th driver verbose level after boot-up.
  454. 8.9 Reset all logical units of a target
  455. ---------------------------------------
  456. resetdev <target>
  457. :target: target number
  458. The driver will try to send a BUS DEVICE RESET message to the target.
  459. (Only supported by the SYM53C8XX driver and provided for test purpose)
  460. 8.10 Abort all tasks of all logical units of a target
  461. -----------------------------------------------------
  462. cleardev <target>
  463. :target: target number
  464. The driver will try to send a ABORT message to all the logical units
  465. of the target.
  466. (Only supported by the SYM53C8XX driver and provided for test purpose)
  467. 9. Configuration parameters
  468. ===========================
  469. If the firmware of all your devices is perfect enough, all the
  470. features supported by the driver can be enabled at start-up. However,
  471. if only one has a flaw for some SCSI feature, you can disable the
  472. support by the driver of this feature at linux start-up and enable
  473. this feature after boot-up only for devices that support it safely.
  474. CONFIG_SCSI_NCR53C8XX_IOMAPPED (default answer: n)
  475. Answer "y" if you suspect your mother board to not allow memory mapped I/O.
  476. May slow down performance a little. This option is required by
  477. Linux/PPC and is used no matter what you select here. Linux/PPC
  478. suffers no performance loss with this option since all IO is memory
  479. mapped anyway.
  480. CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS (default answer: 8)
  481. Default tagged command queue depth.
  482. CONFIG_SCSI_NCR53C8XX_MAX_TAGS (default answer: 8)
  483. This option allows you to specify the maximum number of tagged commands
  484. that can be queued to a device. The maximum supported value is 32.
  485. CONFIG_SCSI_NCR53C8XX_SYNC (default answer: 5)
  486. This option allows you to specify the frequency in MHz the driver
  487. will use at boot time for synchronous data transfer negotiations.
  488. This frequency can be changed later with the "setsync" control command.
  489. 0 means "asynchronous data transfers".
  490. CONFIG_SCSI_NCR53C8XX_FORCE_SYNC_NEGO (default answer: n)
  491. Force synchronous negotiation for all SCSI-2 devices.
  492. Some SCSI-2 devices do not report this feature in byte 7 of inquiry
  493. response but do support it properly (TAMARACK scanners for example).
  494. CONFIG_SCSI_NCR53C8XX_NO_DISCONNECT (default and only reasonable answer: n)
  495. If you suspect a device of yours does not properly support disconnections,
  496. you can answer "y". Then, all SCSI devices will never disconnect the bus
  497. even while performing long SCSI operations.
  498. CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT
  499. Genuine SYMBIOS boards use GPIO0 in output for controller LED and GPIO3
  500. bit as a flag indicating singled-ended/differential interface.
  501. If all the boards of your system are genuine SYMBIOS boards or use
  502. BIOS and drivers from SYMBIOS, you would want to enable this option.
  503. This option must NOT be enabled if your system has at least one 53C8XX
  504. based scsi board with a vendor-specific BIOS.
  505. For example, Tekram DC-390/U, DC-390/W and DC-390/F scsi controllers
  506. use a vendor-specific BIOS and are known to not use SYMBIOS compatible
  507. GPIO wiring. So, this option must not be enabled if your system has
  508. such a board installed.
  509. CONFIG_SCSI_NCR53C8XX_NVRAM_DETECT
  510. Enable support for reading the serial NVRAM data on Symbios and
  511. some Symbios compatible cards, and Tekram DC390W/U/F cards. Useful for
  512. systems with more than one Symbios compatible controller where at least
  513. one has a serial NVRAM, or for a system with a mixture of Symbios and
  514. Tekram cards. Enables setting the boot order of host adaptors
  515. to something other than the default order or "reverse probe" order.
  516. Also enables Symbios and Tekram cards to be distinguished so
  517. CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT may be set in a system with a
  518. mixture of Symbios and Tekram cards so the Symbios cards can make use of
  519. the full range of Symbios features, differential, led pin, without
  520. causing problems for the Tekram card(s).
  521. 10. Boot setup commands
  522. =======================
  523. 10.1 Syntax
  524. -----------
  525. Setup commands can be passed to the driver either at boot time or as a
  526. string variable using 'insmod'.
  527. A boot setup command for the ncr53c8xx (sym53c8xx) driver begins with the
  528. driver name "ncr53c8xx="(sym53c8xx). The kernel syntax parser then expects
  529. an optional list of integers separated with comma followed by an optional
  530. list of comma-separated strings. Example of boot setup command under lilo
  531. prompt::
  532. lilo: linux root=/dev/hda2 ncr53c8xx=tags:4,sync:10,debug:0x200
  533. - enable tagged commands, up to 4 tagged commands queued.
  534. - set synchronous negotiation speed to 10 Mega-transfers / second.
  535. - set DEBUG_NEGO flag.
  536. Since comma seems not to be allowed when defining a string variable using
  537. 'insmod', the driver also accepts <space> as option separator.
  538. The following command will install driver module with the same options as
  539. above::
  540. insmod ncr53c8xx.o ncr53c8xx="tags:4 sync:10 debug:0x200"
  541. For the moment, the integer list of arguments is discarded by the driver.
  542. It will be used in the future in order to allow a per controller setup.
  543. Each string argument must be specified as "keyword:value". Only lower-case
  544. characters and digits are allowed.
  545. In a system that contains multiple 53C8xx adapters insmod will install the
  546. specified driver on each adapter. To exclude a chip use the 'excl' keyword.
  547. The sequence of commands::
  548. insmod sym53c8xx sym53c8xx=excl:0x1400
  549. insmod ncr53c8xx
  550. installs the sym53c8xx driver on all adapters except the one at IO port
  551. address 0x1400 and then installs the ncr53c8xx driver to the adapter at IO
  552. port address 0x1400.
  553. 10.2 Available arguments
  554. ------------------------
  555. 10.2.1 Master parity checking
  556. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  557. ====== ========
  558. mpar:y enabled
  559. mpar:n disabled
  560. ====== ========
  561. 10.2.2 Scsi parity checking
  562. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  563. ====== ========
  564. spar:y enabled
  565. spar:n disabled
  566. ====== ========
  567. 10.2.3 Scsi disconnections
  568. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  569. ====== ========
  570. disc:y enabled
  571. disc:n disabled
  572. ====== ========
  573. 10.2.4 Special features
  574. ^^^^^^^^^^^^^^^^^^^^^^^^
  575. Only apply to 810A, 825A, 860, 875 and 895 controllers.
  576. Have no effect with other ones.
  577. ======= =================================================
  578. specf:y (or 1) enabled
  579. specf:n (or 0) disabled
  580. specf:3 enabled except Memory Write And Invalidate
  581. ======= =================================================
  582. The default driver setup is 'specf:3'. As a consequence, option 'specf:y'
  583. must be specified in the boot setup command to enable Memory Write And
  584. Invalidate.
  585. 10.2.5 Ultra SCSI support
  586. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  587. Only apply to 860, 875, 895, 895a, 896, 1010 and 1010_66 controllers.
  588. Have no effect with other ones.
  589. ======= ========================
  590. ultra:n All ultra speeds enabled
  591. ultra:2 Ultra2 enabled
  592. ultra:1 Ultra enabled
  593. ultra:0 Ultra speeds disabled
  594. ======= ========================
  595. 10.2.6 Default number of tagged commands
  596. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  597. ======================= ===============================
  598. tags:0 (or tags:1 ) tagged command queuing disabled
  599. tags:#tags (#tags > 1) tagged command queuing enabled
  600. ======================= ===============================
  601. #tags will be truncated to the max queued commands configuration parameter.
  602. This option also allows to specify a command queue depth for each device
  603. that support tagged command queueing.
  604. Example::
  605. ncr53c8xx=tags:10/t2t3q16-t5q24/t1u2q32
  606. will set devices queue depth as follow:
  607. - controller #0 target #2 and target #3 -> 16 commands,
  608. - controller #0 target #5 -> 24 commands,
  609. - controller #1 target #1 logical unit #2 -> 32 commands,
  610. - all other logical units (all targets, all controllers) -> 10 commands.
  611. 10.2.7 Default synchronous period factor
  612. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  613. ============ ========================================================
  614. sync:255 disabled (asynchronous transfer mode)
  615. sync:#factor
  616. ============ =======================================
  617. #factor = 10 Ultra-2 SCSI 40 Mega-transfers / second
  618. #factor = 11 Ultra-2 SCSI 33 Mega-transfers / second
  619. #factor < 25 Ultra SCSI 20 Mega-transfers / second
  620. #factor < 50 Fast SCSI-2
  621. ============ =======================================
  622. ============ ========================================================
  623. In all cases, the driver will use the minimum transfer period supported by
  624. controllers according to NCR53C8XX chip type.
  625. 10.2.8 Negotiate synchronous with all devices
  626. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  627. (force sync nego)
  628. ===== =========
  629. fsn:y enabled
  630. fsn:n disabled
  631. ===== =========
  632. 10.2.9 Verbosity level
  633. ^^^^^^^^^^^^^^^^^^^^^^^
  634. ====== =========
  635. verb:0 minimal
  636. verb:1 normal
  637. verb:2 too much
  638. ====== =========
  639. 10.2.10 Debug mode
  640. ^^^^^^^^^^^^^^^^^^
  641. ======== ==================================================================
  642. debug:0 clear debug flags
  643. debug:#x set debug flags
  644. #x is an integer value combining the following power-of-2 values:
  645. ============= ======
  646. DEBUG_ALLOC 0x1
  647. DEBUG_PHASE 0x2
  648. DEBUG_POLL 0x4
  649. DEBUG_QUEUE 0x8
  650. DEBUG_RESULT 0x10
  651. DEBUG_SCATTER 0x20
  652. DEBUG_SCRIPT 0x40
  653. DEBUG_TINY 0x80
  654. DEBUG_TIMING 0x100
  655. DEBUG_NEGO 0x200
  656. DEBUG_TAGS 0x400
  657. DEBUG_FREEZE 0x800
  658. DEBUG_RESTART 0x1000
  659. ============= ======
  660. ======== ==================================================================
  661. You can play safely with DEBUG_NEGO. However, some of these flags may
  662. generate bunches of syslog messages.
  663. 10.2.11 Burst max
  664. ^^^^^^^^^^^^^^^^^
  665. ========= ==================================================================
  666. burst:0 burst disabled
  667. burst:255 get burst length from initial IO register settings.
  668. burst:#x burst enabled (1<<#x burst transfers max)
  669. #x is an integer value which is log base 2 of the burst transfers
  670. max.
  671. The NCR53C875 and NCR53C825A support up to 128 burst transfers
  672. (#x = 7).
  673. Other chips only support up to 16 (#x = 4).
  674. This is a maximum value. The driver set the burst length according
  675. to chip and revision ids. By default the driver uses the maximum
  676. value supported by the chip.
  677. ========= ==================================================================
  678. 10.2.12 LED support
  679. ^^^^^^^^^^^^^^^^^^^
  680. ===== ===================
  681. led:1 enable LED support
  682. led:0 disable LED support
  683. ===== ===================
  684. Donnot enable LED support if your scsi board does not use SDMS BIOS.
  685. (See 'Configuration parameters')
  686. 10.2.13 Max wide
  687. ^^^^^^^^^^^^^^^^
  688. ====== ===================
  689. wide:1 wide scsi enabled
  690. wide:0 wide scsi disabled
  691. ====== ===================
  692. Some scsi boards use a 875 (ultra wide) and only supply narrow connectors.
  693. If you have connected a wide device with a 50 pins to 68 pins cable
  694. converter, any accepted wide negotiation will break further data transfers.
  695. In such a case, using "wide:0" in the bootup command will be helpful.
  696. 10.2.14 Differential mode
  697. ^^^^^^^^^^^^^^^^^^^^^^^^^
  698. ====== =================================
  699. diff:0 never set up diff mode
  700. diff:1 set up diff mode if BIOS set it
  701. diff:2 always set up diff mode
  702. diff:3 set diff mode if GPIO3 is not set
  703. ====== =================================
  704. 10.2.15 IRQ mode
  705. ^^^^^^^^^^^^^^^^
  706. ========= ========================================================
  707. irqm:0 always open drain
  708. irqm:1 same as initial settings (assumed BIOS settings)
  709. irqm:2 always totem pole
  710. irqm:0x10 driver will not use IRQF_SHARED flag when requesting irq
  711. ========= ========================================================
  712. (Bits 0x10 and 0x20 can be combined with hardware irq mode option)
  713. 10.2.16 Reverse probe
  714. ^^^^^^^^^^^^^^^^^^^^^
  715. ========= ========================================================
  716. revprob:n probe chip ids from the PCI configuration in this order:
  717. 810, 815, 820, 860, 875, 885, 895, 896
  718. revprob:y probe chip ids in the reverse order.
  719. ========= ========================================================
  720. 10.2.17 Fix up PCI configuration space
  721. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  722. pcifix:<option bits>
  723. Available option bits:
  724. === ===============================================================
  725. 0x0 No attempt to fix PCI configuration space registers values.
  726. 0x1 Set PCI cache-line size register if not set.
  727. 0x2 Set write and invalidate bit in PCI command register.
  728. 0x4 Increase if necessary PCI latency timer according to burst max.
  729. === ===============================================================
  730. Use 'pcifix:7' in order to allow the driver to fix up all PCI features.
  731. 10.2.18 Serial NVRAM
  732. ^^^^^^^^^^^^^^^^^^^^
  733. ======= =========================================
  734. nvram:n do not look for serial NVRAM
  735. nvram:y test controllers for onboard serial NVRAM
  736. ======= =========================================
  737. (alternate binary form)
  738. mvram=<bits options>
  739. ==== =================================================================
  740. 0x01 look for NVRAM (equivalent to nvram=y)
  741. 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
  742. 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
  743. 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
  744. 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
  745. ==== =================================================================
  746. 10.2.19 Check SCSI BUS
  747. ^^^^^^^^^^^^^^^^^^^^^^
  748. buschk:<option bits>
  749. Available option bits:
  750. ==== ================================================
  751. 0x0: No check.
  752. 0x1: Check and do not attach the controller on error.
  753. 0x2: Check and just warn on error.
  754. 0x4: Disable SCSI bus integrity checking.
  755. ==== ================================================
  756. 10.2.20 Exclude a host from being attached
  757. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  758. excl=<io_address>
  759. Prevent host at a given io address from being attached.
  760. For example 'ncr53c8xx=excl:0xb400,excl:0xc000' indicate to the
  761. ncr53c8xx driver not to attach hosts at address 0xb400 and 0xc000.
  762. 10.2.21 Suggest a default SCSI id for hosts
  763. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  764. ========== ==========================================
  765. hostid:255 no id suggested.
  766. hostid:#x (0 < x < 7) x suggested for hosts SCSI id.
  767. ========== ==========================================
  768. If a host SCSI id is available from the NVRAM, the driver will ignore
  769. any value suggested as boot option. Otherwise, if a suggested value
  770. different from 255 has been supplied, it will use it. Otherwise, it will
  771. try to deduce the value previously set in the hardware and use value
  772. 7 if the hardware value is zero.
  773. 10.2.22 Enable use of IMMEDIATE ARBITRATION
  774. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  775. (only supported by the sym53c8xx driver. See 10.7 for more details)
  776. ======= =================================================================
  777. iarb:0 do not use this feature.
  778. iarb:#x use this feature according to bit fields as follow:
  779. ========= =======================================================
  780. bit 0 (1) enable IARB each time the initiator has been reselected
  781. when it arbitrated for the SCSI BUS.
  782. (#x >> 4) maximum number of successive settings of IARB if the
  783. initiator win arbitration and it has other commands
  784. to send to a device.
  785. ========= =======================================================
  786. ======= =================================================================
  787. Boot fail safe
  788. safe:y load the following assumed fail safe initial setup
  789. ======================== ====================== ==========
  790. master parity disabled mpar:n
  791. scsi parity enabled spar:y
  792. disconnections not allowed disc:n
  793. special features disabled specf:n
  794. ultra scsi disabled ultra:n
  795. force sync negotiation disabled fsn:n
  796. reverse probe disabled revprob:n
  797. PCI fix up disabled pcifix:0
  798. serial NVRAM enabled nvram:y
  799. verbosity level 2 verb:2
  800. tagged command queuing disabled tags:0
  801. synchronous negotiation disabled sync:255
  802. debug flags none debug:0
  803. burst length from BIOS settings burst:255
  804. LED support disabled led:0
  805. wide support disabled wide:0
  806. settle time 10 seconds settle:10
  807. differential support from BIOS settings diff:1
  808. irq mode from BIOS settings irqm:1
  809. SCSI BUS check do not attach on error buschk:1
  810. immediate arbitration disabled iarb:0
  811. ======================== ====================== ==========
  812. 10.3 Advised boot setup commands
  813. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  814. If the driver has been configured with default options, the equivalent
  815. boot setup is::
  816. ncr53c8xx=mpar:y,spar:y,disc:y,specf:3,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
  817. tags:0,sync:50,debug:0,burst:7,led:0,wide:1,settle:2,diff:0,irqm:0
  818. For an installation diskette or a safe but not fast system,
  819. boot setup can be::
  820. ncr53c8xx=safe:y,mpar:y,disc:y
  821. ncr53c8xx=safe:y,disc:y
  822. ncr53c8xx=safe:y,mpar:y
  823. ncr53c8xx=safe:y
  824. My personal system works flawlessly with the following equivalent setup::
  825. ncr53c8xx=mpar:y,spar:y,disc:y,specf:1,fsn:n,ultra:2,fsn:n,revprob:n,verb:1\
  826. tags:32,sync:12,debug:0,burst:7,led:1,wide:1,settle:2,diff:0,irqm:0
  827. The driver prints its actual setup when verbosity level is 2. You can try
  828. "ncr53c8xx=verb:2" to get the "static" setup of the driver, or add "verb:2"
  829. to your boot setup command in order to check the actual setup the driver is
  830. using.
  831. 10.4 PCI configuration fix-up boot option
  832. -----------------------------------------
  833. pcifix:<option bits>
  834. Available option bits:
  835. === =====================================================
  836. 0x1 Set PCI cache-line size register if not set.
  837. 0x2 Set write and invalidate bit in PCI command register.
  838. === =====================================================
  839. Use 'pcifix:3' in order to allow the driver to fix both PCI features.
  840. These options only apply to new SYMBIOS chips 810A, 825A, 860, 875
  841. and 895 and are only supported for Pentium and 486 class processors.
  842. Recent SYMBIOS 53C8XX scsi processors are able to use PCI read multiple
  843. and PCI write and invalidate commands. These features require the
  844. cache line size register to be properly set in the PCI configuration
  845. space of the chips. On the other hand, chips will use PCI write and
  846. invalidate commands only if the corresponding bit is set to 1 in the
  847. PCI command register.
  848. Not all PCI bioses set the PCI cache line register and the PCI write and
  849. invalidate bit in the PCI configuration space of 53C8XX chips.
  850. Optimized PCI accesses may be broken for some PCI/memory controllers or
  851. make problems with some PCI boards.
  852. This fix-up worked flawlessly on my previous system.
  853. (MB Triton HX / 53C875 / 53C810A)
  854. I use these options at my own risks as you will do if you decide to
  855. use them too.
  856. 10.5 Serial NVRAM support boot option
  857. -------------------------------------
  858. ======= =========================================
  859. nvram:n do not look for serial NVRAM
  860. nvram:y test controllers for onboard serial NVRAM
  861. ======= =========================================
  862. This option can also been entered as an hexadecimal value that allows
  863. to control what information the driver will get from the NVRAM and what
  864. information it will ignore.
  865. For details see '17. Serial NVRAM support'.
  866. When this option is enabled, the driver tries to detect all boards using
  867. a Serial NVRAM. This memory is used to hold user set up parameters.
  868. The parameters the driver is able to get from the NVRAM depend on the
  869. data format used, as follow:
  870. +-------------------------------+------------------+--------------+
  871. | |Tekram format |Symbios format|
  872. +-------------------------------+------------------+--------------+
  873. |General and host parameters | | |
  874. +-------------------------------+------------------+--------------+
  875. | * Boot order | N | Y |
  876. +-------------------------------+------------------+--------------+
  877. | * Host SCSI ID | Y | Y |
  878. +-------------------------------+------------------+--------------+
  879. | * SCSI parity checking | Y | Y |
  880. +-------------------------------+------------------+--------------+
  881. | * Verbose boot messages | N | Y |
  882. +-------------------------------+------------------+--------------+
  883. |SCSI devices parameters |
  884. +-------------------------------+------------------+--------------+
  885. | * Synchronous transfer speed | Y | Y |
  886. +-------------------------------+------------------+--------------+
  887. | * Wide 16 / Narrow | Y | Y |
  888. +-------------------------------+------------------+--------------+
  889. | * Tagged Command Queuing | Y | Y |
  890. | enabled | | |
  891. +-------------------------------+------------------+--------------+
  892. | * Disconnections enabled | Y | Y |
  893. +-------------------------------+------------------+--------------+
  894. | * Scan at boot time | N | Y |
  895. +-------------------------------+------------------+--------------+
  896. In order to speed up the system boot, for each device configured without
  897. the "scan at boot time" option, the driver forces an error on the
  898. first TEST UNIT READY command received for this device.
  899. Some SDMS BIOS revisions seem to be unable to boot cleanly with very fast
  900. hard disks. In such a situation you cannot configure the NVRAM with
  901. optimized parameters value.
  902. The 'nvram' boot option can be entered in hexadecimal form in order
  903. to ignore some options configured in the NVRAM, as follow:
  904. mvram=<bits options>
  905. ==== =================================================================
  906. 0x01 look for NVRAM (equivalent to nvram=y)
  907. 0x02 ignore NVRAM "Synchronous negotiation" parameters for all devices
  908. 0x04 ignore NVRAM "Wide negotiation" parameter for all devices
  909. 0x08 ignore NVRAM "Scan at boot time" parameter for all devices
  910. 0x80 also attach controllers set to OFF in the NVRAM (sym53c8xx only)
  911. ==== =================================================================
  912. Option 0x80 is only supported by the sym53c8xx driver and is disabled by
  913. default. Result is that, by default (option not set), the sym53c8xx driver
  914. will not attach controllers set to OFF in the NVRAM.
  915. The ncr53c8xx always tries to attach all the controllers. Option 0x80 has
  916. not been added to the ncr53c8xx driver, since it has been reported to
  917. confuse users who use this driver since a long time. If you desire a
  918. controller not to be attached by the ncr53c8xx driver at Linux boot, you
  919. must use the 'excl' driver boot option.
  920. 10.6 SCSI BUS checking boot option.
  921. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  922. When this option is set to a non-zero value, the driver checks SCSI lines
  923. logic state, 100 micro-seconds after having asserted the SCSI RESET line.
  924. The driver just reads SCSI lines and checks all lines read FALSE except RESET.
  925. Since SCSI devices shall release the BUS at most 800 nano-seconds after SCSI
  926. RESET has been asserted, any signal to TRUE may indicate a SCSI BUS problem.
  927. Unfortunately, the following common SCSI BUS problems are not detected:
  928. - Only 1 terminator installed.
  929. - Misplaced terminators.
  930. - Bad quality terminators.
  931. On the other hand, either bad cabling, broken devices, not conformant
  932. devices, ... may cause a SCSI signal to be wrong when te driver reads it.
  933. 10.7 IMMEDIATE ARBITRATION boot option
  934. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  935. This option is only supported by the SYM53C8XX driver (not by the NCR53C8XX).
  936. SYMBIOS 53C8XX chips are able to arbitrate for the SCSI BUS as soon as they
  937. have detected an expected disconnection (BUS FREE PHASE). For this process
  938. to be started, bit 1 of SCNTL1 IO register must be set when the chip is
  939. connected to the SCSI BUS.
  940. When this feature has been enabled for the current connection, the chip has
  941. every chance to win arbitration if only devices with lower priority are
  942. competing for the SCSI BUS. By the way, when the chip is using SCSI id 7,
  943. then it will for sure win the next SCSI BUS arbitration.
  944. Since, there is no way to know what devices are trying to arbitrate for the
  945. BUS, using this feature can be extremely unfair. So, you are not advised
  946. to enable it, or at most enable this feature for the case the chip lost
  947. the previous arbitration (boot option 'iarb:1').
  948. This feature has the following advantages:
  949. a) Allow the initiator with ID 7 to win arbitration when it wants so.
  950. b) Overlap at least 4 micro-seconds of arbitration time with the execution
  951. of SCRIPTS that deal with the end of the current connection and that
  952. starts the next job.
  953. Hmmm... But (a) may just prevent other devices from reselecting the initiator,
  954. and delay data transfers or status/completions, and (b) may just waste
  955. SCSI BUS bandwidth if the SCRIPTS execution lasts more than 4 micro-seconds.
  956. The use of IARB needs the SCSI_NCR_IARB_SUPPORT option to have been defined
  957. at compile time and the 'iarb' boot option to have been set to a non zero
  958. value at boot time. It is not that useful for real work, but can be used
  959. to stress SCSI devices or for some applications that can gain advantage of
  960. it. By the way, if you experience badnesses like 'unexpected disconnections',
  961. 'bad reselections', etc... when using IARB on heavy IO load, you should not
  962. be surprised, because force-feeding anything and blocking its arse at the
  963. same time cannot work for a long time. :-))
  964. 11. Some constants and flags of the ncr53c8xx.h header file
  965. ===========================================================
  966. Some of these are defined from the configuration parameters. To
  967. change other "defines", you must edit the header file. Do that only
  968. if you know what you are doing.
  969. SCSI_NCR_SETUP_SPECIAL_FEATURES (default: defined)
  970. If defined, the driver will enable some special features according
  971. to chip and revision id.
  972. For 810A, 860, 825A, 875 and 895 scsi chips, this option enables
  973. support of features that reduce load of PCI bus and memory accesses
  974. during scsi transfer processing: burst op-code fetch, read multiple,
  975. read line, prefetch, cache line, write and invalidate,
  976. burst 128 (875 only), large dma fifo (875 only), offset 16 (875 only).
  977. Can be changed by the following boot setup command::
  978. ncr53c8xx=specf:n
  979. SCSI_NCR_IOMAPPED (default: not defined)
  980. If defined, normal I/O is forced.
  981. SCSI_NCR_SHARE_IRQ (default: defined)
  982. If defined, request shared IRQ.
  983. SCSI_NCR_MAX_TAGS (default: 8)
  984. Maximum number of simultaneous tagged commands to a device.
  985. Can be changed by "settags <target> <maxtags>"
  986. SCSI_NCR_SETUP_DEFAULT_SYNC (default: 50)
  987. Transfer period factor the driver will use at boot time for synchronous
  988. negotiation. 0 means asynchronous.
  989. Can be changed by "setsync <target> <period factor>"
  990. SCSI_NCR_SETUP_DEFAULT_TAGS (default: 8)
  991. Default number of simultaneous tagged commands to a device.
  992. < 1 means tagged command queuing disabled at start-up.
  993. SCSI_NCR_ALWAYS_SIMPLE_TAG (default: defined)
  994. Use SIMPLE TAG for read and write commands.
  995. Can be changed by "setorder <ordered|simple|default>"
  996. SCSI_NCR_SETUP_DISCONNECTION (default: defined)
  997. If defined, targets are allowed to disconnect.
  998. SCSI_NCR_SETUP_FORCE_SYNC_NEGO (default: not defined)
  999. If defined, synchronous negotiation is tried for all SCSI-2 devices.
  1000. Can be changed by "setsync <target> <period>"
  1001. SCSI_NCR_SETUP_MASTER_PARITY (default: defined)
  1002. If defined, master parity checking is enabled.
  1003. SCSI_NCR_SETUP_SCSI_PARITY (default: defined)
  1004. If defined, SCSI parity checking is enabled.
  1005. SCSI_NCR_PROFILE_SUPPORT (default: not defined)
  1006. If defined, profiling information is gathered.
  1007. SCSI_NCR_MAX_SCATTER (default: 128)
  1008. Scatter list size of the driver ccb.
  1009. SCSI_NCR_MAX_TARGET (default: 16)
  1010. Max number of targets per host.
  1011. SCSI_NCR_MAX_HOST (default: 2)
  1012. Max number of host controllers.
  1013. SCSI_NCR_SETTLE_TIME (default: 2)
  1014. Number of seconds the driver will wait after reset.
  1015. SCSI_NCR_TIMEOUT_ALERT (default: 3)
  1016. If a pending command will time out after this amount of seconds,
  1017. an ordered tag is used for the next command.
  1018. Avoids timeouts for unordered tagged commands.
  1019. SCSI_NCR_CAN_QUEUE (default: 7*SCSI_NCR_MAX_TAGS)
  1020. Max number of commands that can be queued to a host.
  1021. SCSI_NCR_CMD_PER_LUN (default: SCSI_NCR_MAX_TAGS)
  1022. Max number of commands queued to a host for a device.
  1023. SCSI_NCR_SG_TABLESIZE (default: SCSI_NCR_MAX_SCATTER-1)
  1024. Max size of the Linux scatter/gather list.
  1025. SCSI_NCR_MAX_LUN (default: 8)
  1026. Max number of LUNs per target.
  1027. 12. Installation
  1028. ================
  1029. This driver is part of the linux kernel distribution.
  1030. Driver files are located in the sub-directory "drivers/scsi" of the
  1031. kernel source tree.
  1032. Driver files::
  1033. README.ncr53c8xx : this file
  1034. ChangeLog.ncr53c8xx : change log
  1035. ncr53c8xx.h : definitions
  1036. ncr53c8xx.c : the driver code
  1037. New driver versions are made available separately in order to allow testing
  1038. changes and new features prior to including them into the linux kernel
  1039. distribution. The following URL provides information on latest available
  1040. patches:
  1041. ftp://ftp.tux.org/pub/people/gerard-roudier/README
  1042. 13. Architecture dependent features
  1043. ===================================
  1044. <Not yet written>
  1045. 14. Known problems
  1046. ==================
  1047. 14.1 Tagged commands with Iomega Jaz device
  1048. -------------------------------------------
  1049. I have not tried this device, however it has been reported to me the
  1050. following: This device is capable of Tagged command queuing. However
  1051. while spinning up, it rejects Tagged commands. This behaviour is
  1052. conforms to 6.8.2 of SCSI-2 specifications. The current behaviour of
  1053. the driver in that situation is not satisfying. So do not enable
  1054. Tagged command queuing for devices that are able to spin down. The
  1055. other problem that may appear is timeouts. The only way to avoid
  1056. timeouts seems to edit linux/drivers/scsi/sd.c and to increase the
  1057. current timeout values.
  1058. 14.2 Device names change when another controller is added
  1059. ---------------------------------------------------------
  1060. When you add a new NCR53C8XX chip based controller to a system that already
  1061. has one or more controllers of this family, it may happen that the order
  1062. the driver registers them to the kernel causes problems due to device
  1063. name changes.
  1064. When at least one controller uses NvRAM, SDMS BIOS version 4 allows you to
  1065. define the order the BIOS will scan the scsi boards. The driver attaches
  1066. controllers according to BIOS information if NvRAM detect option is set.
  1067. If your controllers do not have NvRAM, you can:
  1068. - Ask the driver to probe chip ids in reverse order from the boot command
  1069. line: ncr53c8xx=revprob:y
  1070. - Make appropriate changes in the fstab.
  1071. - Use the 'scsidev' tool from Eric Youngdale.
  1072. 14.3 Using only 8 bit devices with a WIDE SCSI controller
  1073. ---------------------------------------------------------
  1074. When only 8 bit NARROW devices are connected to a 16 bit WIDE SCSI controller,
  1075. you must ensure that lines of the wide part of the SCSI BUS are pulled-up.
  1076. This can be achieved by ENABLING the WIDE TERMINATOR portion of the SCSI
  1077. controller card.
  1078. The TYAN 1365 documentation revision 1.2 is not correct about such settings.
  1079. (page 10, figure 3.3).
  1080. 14.4 Possible data corruption during a Memory Write and Invalidate
  1081. ------------------------------------------------------------------
  1082. This problem is described in SYMBIOS DEL 397, Part Number 69-039241, ITEM 4.
  1083. In some complex situations, 53C875 chips revision <= 3 may start a PCI
  1084. Write and Invalidate Command at a not cache-line-aligned 4 DWORDS boundary.
  1085. This is only possible when Cache Line Size is 8 DWORDS or greater.
  1086. Pentium systems use a 8 DWORDS cache line size and so are concerned by
  1087. this chip bug, unlike i486 systems that use a 4 DWORDS cache line size.
  1088. When this situation occurs, the chip may complete the Write and Invalidate
  1089. command after having only filled part of the last cache line involved in
  1090. the transfer, leaving to data corruption the remainder of this cache line.
  1091. Not using Write And Invalidate obviously gets rid of this chip bug, and so
  1092. it is now the default setting of the driver.
  1093. However, for people like me who want to enable this feature, I have added
  1094. part of a work-around suggested by SYMBIOS. This work-around resets the
  1095. addressing logic when the DATA IN phase is entered and so prevents the bug
  1096. from being triggered for the first SCSI MOVE of the phase. This work-around
  1097. should be enough according to the following:
  1098. The only driver internal data structure that is greater than 8 DWORDS and
  1099. that is moved by the SCRIPTS processor is the 'CCB header' that contains
  1100. the context of the SCSI transfer. This data structure is aligned on 8 DWORDS
  1101. boundary (Pentium Cache Line Size), and so is immune to this chip bug, at
  1102. least on Pentium systems.
  1103. But the conditions of this bug can be met when a SCSI read command is
  1104. performed using a buffer that is 4 DWORDS but not cache-line aligned.
  1105. This cannot happen under Linux when scatter/gather lists are used since
  1106. they only refer to system buffers that are well aligned. So, a work around
  1107. may only be needed under Linux when a scatter/gather list is not used and
  1108. when the SCSI DATA IN phase is reentered after a phase mismatch.
  1109. 15. SCSI problem troubleshooting
  1110. ================================
  1111. 15.1 Problem tracking
  1112. ---------------------
  1113. Most SCSI problems are due to a non conformant SCSI bus or to buggy
  1114. devices. If unfortunately you have SCSI problems, you can check the
  1115. following things:
  1116. - SCSI bus cables
  1117. - terminations at both end of the SCSI chain
  1118. - linux syslog messages (some of them may help you)
  1119. If you do not find the source of problems, you can configure the
  1120. driver with no features enabled.
  1121. - only asynchronous data transfers
  1122. - tagged commands disabled
  1123. - disconnections not allowed
  1124. Now, if your SCSI bus is ok, your system have every chance to work
  1125. with this safe configuration but performances will not be optimal.
  1126. If it still fails, then you can send your problem description to
  1127. appropriate mailing lists or news-groups. Send me a copy in order to
  1128. be sure I will receive it. Obviously, a bug in the driver code is
  1129. possible.
  1130. My email address: Gerard Roudier <[email protected]>
  1131. Allowing disconnections is important if you use several devices on
  1132. your SCSI bus but often causes problems with buggy devices.
  1133. Synchronous data transfers increases throughput of fast devices like
  1134. hard disks. Good SCSI hard disks with a large cache gain advantage of
  1135. tagged commands queuing.
  1136. Try to enable one feature at a time with control commands. For example:
  1137. ::
  1138. echo "setsync all 25" >/proc/scsi/ncr53c8xx/0
  1139. Will enable fast synchronous data transfer negotiation for all targets.
  1140. ::
  1141. echo "setflag 3" >/proc/scsi/ncr53c8xx/0
  1142. Will reset flags (no_disc) for target 3, and so will allow it to disconnect
  1143. the SCSI Bus.
  1144. ::
  1145. echo "settags 3 8" >/proc/scsi/ncr53c8xx/0
  1146. Will enable tagged command queuing for target 3 if that device supports it.
  1147. Once you have found the device and the feature that cause problems, just
  1148. disable that feature for that device.
  1149. 15.2 Understanding hardware error reports
  1150. -----------------------------------------
  1151. When the driver detects an unexpected error condition, it may display a
  1152. message of the following pattern::
  1153. sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
  1154. sym53c876-0: script cmd = 19000000
  1155. sym53c876-0: regdump: da 10 80 95 47 0f 01 07 75 01 81 21 80 01 09 00.
  1156. Some fields in such a message may help you understand the cause of the
  1157. problem, as follows::
  1158. sym53c876-0:1: ERROR (0:48) (1-21-65) (f/95) @ (script 7c0:19000000).
  1159. ............A.........B.C....D.E..F....G.H.......I.....J...K.......
  1160. Field A : target number.
  1161. SCSI ID of the device the controller was talking with at the moment the
  1162. error occurs.
  1163. Field B : DSTAT io register (DMA STATUS)
  1164. ======== =============================================================
  1165. Bit 0x40 MDPE Master Data Parity Error
  1166. Data parity error detected on the PCI BUS.
  1167. Bit 0x20 BF Bus Fault
  1168. PCI bus fault condition detected
  1169. Bit 0x01 IID Illegal Instruction Detected
  1170. Set by the chip when it detects an Illegal Instruction format
  1171. on some condition that makes an instruction illegal.
  1172. Bit 0x80 DFE Dma Fifo Empty
  1173. Pure status bit that does not indicate an error.
  1174. ======== =============================================================
  1175. If the reported DSTAT value contains a combination of MDPE (0x40),
  1176. BF (0x20), then the cause may be likely due to a PCI BUS problem.
  1177. Field C : SIST io register (SCSI Interrupt Status)
  1178. ======== ==================================================================
  1179. Bit 0x08 SGE SCSI GROSS ERROR
  1180. Indicates that the chip detected a severe error condition
  1181. on the SCSI BUS that prevents the SCSI protocol from functioning
  1182. properly.
  1183. Bit 0x04 UDC Unexpected Disconnection
  1184. Indicates that the device released the SCSI BUS when the chip
  1185. was not expecting this to happen. A device may behave so to
  1186. indicate the SCSI initiator that an error condition not reportable
  1187. using the SCSI protocol has occurred.
  1188. Bit 0x02 RST SCSI BUS Reset
  1189. Generally SCSI targets do not reset the SCSI BUS, although any
  1190. device on the BUS can reset it at any time.
  1191. Bit 0x01 PAR Parity
  1192. SCSI parity error detected.
  1193. ======== ==================================================================
  1194. On a faulty SCSI BUS, any error condition among SGE (0x08), UDC (0x04) and
  1195. PAR (0x01) may be detected by the chip. If your SCSI system sometimes
  1196. encounters such error conditions, especially SCSI GROSS ERROR, then a SCSI
  1197. BUS problem is likely the cause of these errors.
  1198. For fields D,E,F,G and H, you may look into the sym53c8xx_defs.h file
  1199. that contains some minimal comments on IO register bits.
  1200. Field D : SOCL Scsi Output Control Latch
  1201. This register reflects the state of the SCSI control lines the
  1202. chip want to drive or compare against.
  1203. Field E : SBCL Scsi Bus Control Lines
  1204. Actual value of control lines on the SCSI BUS.
  1205. Field F : SBDL Scsi Bus Data Lines
  1206. Actual value of data lines on the SCSI BUS.
  1207. Field G : SXFER SCSI Transfer
  1208. Contains the setting of the Synchronous Period for output and
  1209. the current Synchronous offset (offset 0 means asynchronous).
  1210. Field H : SCNTL3 Scsi Control Register 3
  1211. Contains the setting of timing values for both asynchronous and
  1212. synchronous data transfers.
  1213. Understanding Fields I, J, K and dumps requires to have good knowledge of
  1214. SCSI standards, chip cores functionnals and internal driver data structures.
  1215. You are not required to decode and understand them, unless you want to help
  1216. maintain the driver code.
  1217. 16. Synchronous transfer negotiation tables
  1218. ===========================================
  1219. Tables below have been created by calling the routine the driver uses
  1220. for synchronisation negotiation timing calculation and chip setting.
  1221. The first table corresponds to Ultra chips 53875 and 53C860 with 80 MHz
  1222. clock and 5 clock divisors.
  1223. The second one has been calculated by setting the scsi clock to 40 Mhz
  1224. and using 4 clock divisors and so applies to all NCR53C8XX chips in fast
  1225. SCSI-2 mode.
  1226. Periods are in nano-seconds and speeds are in Mega-transfers per second.
  1227. 1 Mega-transfers/second means 1 MB/s with 8 bits SCSI and 2 MB/s with
  1228. Wide16 SCSI.
  1229. 16.1 Synchronous timings for 53C895, 53C875 and 53C860 SCSI controllers
  1230. +-----------------------------+--------+-------+--------------+
  1231. |Negotiated |NCR settings | |
  1232. +-------+--------+------------+--------+-------+ |
  1233. |Factor |Period |Speed |Period |Speed | |
  1234. +-------+--------+------------+--------+-------+--------------+
  1235. |10 | 25 |40.000 | 25 |40.000 | (53C895 only)|
  1236. +-------+--------+------------+--------+-------+--------------+
  1237. |11 | 30.2 |33.112 | 31.25 |32.000 | (53C895 only)|
  1238. +-------+--------+------------+--------+-------+--------------+
  1239. |12 | 50 |20.000 | 50 |20.000 | |
  1240. +-------+--------+------------+--------+-------+--------------+
  1241. |13 | 52 |19.230 | 62 |16.000 | |
  1242. +-------+--------+------------+--------+-------+--------------+
  1243. |14 | 56 |17.857 | 62 |16.000 | |
  1244. +-------+--------+------------+--------+-------+--------------+
  1245. |15 | 60 |16.666 | 62 |16.000 | |
  1246. +-------+--------+------------+--------+-------+--------------+
  1247. |16 | 64 |15.625 | 75 |13.333 | |
  1248. +-------+--------+------------+--------+-------+--------------+
  1249. |17 | 68 |14.705 | 75 |13.333 | |
  1250. +-------+--------+------------+--------+-------+--------------+
  1251. |18 | 72 |13.888 | 75 |13.333 | |
  1252. +-------+--------+------------+--------+-------+--------------+
  1253. |19 | 76 |13.157 | 87 |11.428 | |
  1254. +-------+--------+------------+--------+-------+--------------+
  1255. |20 | 80 |12.500 | 87 |11.428 | |
  1256. +-------+--------+------------+--------+-------+--------------+
  1257. |21 | 84 |11.904 | 87 |11.428 | |
  1258. +-------+--------+------------+--------+-------+--------------+
  1259. |22 | 88 |11.363 | 93 |10.666 | |
  1260. +-------+--------+------------+--------+-------+--------------+
  1261. |23 | 92 |10.869 | 93 |10.666 | |
  1262. +-------+--------+------------+--------+-------+--------------+
  1263. |24 | 96 |10.416 |100 |10.000 | |
  1264. +-------+--------+------------+--------+-------+--------------+
  1265. |25 |100 |10.000 |100 |10.000 | |
  1266. +-------+--------+------------+--------+-------+--------------+
  1267. |26 |104 | 9.615 |112 | 8.888 | |
  1268. +-------+--------+------------+--------+-------+--------------+
  1269. |27 |108 | 9.259 |112 | 8.888 | |
  1270. +-------+--------+------------+--------+-------+--------------+
  1271. |28 |112 | 8.928 |112 | 8.888 | |
  1272. +-------+--------+------------+--------+-------+--------------+
  1273. |29 |116 | 8.620 |125 | 8.000 | |
  1274. +-------+--------+------------+--------+-------+--------------+
  1275. |30 |120 | 8.333 |125 | 8.000 | |
  1276. +-------+--------+------------+--------+-------+--------------+
  1277. |31 |124 | 8.064 |125 | 8.000 | |
  1278. +-------+--------+------------+--------+-------+--------------+
  1279. |32 |128 | 7.812 |131 | 7.619 | |
  1280. +-------+--------+------------+--------+-------+--------------+
  1281. |33 |132 | 7.575 |150 | 6.666 | |
  1282. +-------+--------+------------+--------+-------+--------------+
  1283. |34 |136 | 7.352 |150 | 6.666 | |
  1284. +-------+--------+------------+--------+-------+--------------+
  1285. |35 |140 | 7.142 |150 | 6.666 | |
  1286. +-------+--------+------------+--------+-------+--------------+
  1287. |36 |144 | 6.944 |150 | 6.666 | |
  1288. +-------+--------+------------+--------+-------+--------------+
  1289. |37 |148 | 6.756 |150 | 6.666 | |
  1290. +-------+--------+------------+--------+-------+--------------+
  1291. |38 |152 | 6.578 |175 | 5.714 | |
  1292. +-------+--------+------------+--------+-------+--------------+
  1293. |39 |156 | 6.410 |175 | 5.714 | |
  1294. +-------+--------+------------+--------+-------+--------------+
  1295. |40 |160 | 6.250 |175 | 5.714 | |
  1296. +-------+--------+------------+--------+-------+--------------+
  1297. |41 |164 | 6.097 |175 | 5.714 | |
  1298. +-------+--------+------------+--------+-------+--------------+
  1299. |42 |168 | 5.952 |175 | 5.714 | |
  1300. +-------+--------+------------+--------+-------+--------------+
  1301. |43 |172 | 5.813 |175 | 5.714 | |
  1302. +-------+--------+------------+--------+-------+--------------+
  1303. |44 |176 | 5.681 |187 | 5.333 | |
  1304. +-------+--------+------------+--------+-------+--------------+
  1305. |45 |180 | 5.555 |187 | 5.333 | |
  1306. +-------+--------+------------+--------+-------+--------------+
  1307. |46 |184 | 5.434 |187 | 5.333 | |
  1308. +-------+--------+------------+--------+-------+--------------+
  1309. |47 |188 | 5.319 |200 | 5.000 | |
  1310. +-------+--------+------------+--------+-------+--------------+
  1311. |48 |192 | 5.208 |200 | 5.000 | |
  1312. +-------+--------+------------+--------+-------+--------------+
  1313. |49 |196 | 5.102 |200 | 5.000 | |
  1314. +-------+--------+------------+--------+-------+--------------+
  1315. 16.2 Synchronous timings for fast SCSI-2 53C8XX controllers
  1316. +-----------------------------+----------------+
  1317. |Negotiated |NCR settings |
  1318. +-------+--------+------------+--------+-------+
  1319. |Factor |Period |Speed |Period |Speed |
  1320. +-------+--------+------------+--------+-------+
  1321. |25 |100 |10.000 |100 |10.000 |
  1322. +-------+--------+------------+--------+-------+
  1323. |26 |104 |9.615 |125 | 8.000 |
  1324. +-------+--------+------------+--------+-------+
  1325. |27 |108 |9.259 |125 | 8.000 |
  1326. +-------+--------+------------+--------+-------+
  1327. |28 |112 |8.928 |125 | 8.000 |
  1328. +-------+--------+------------+--------+-------+
  1329. |29 |116 |8.620 |125 | 8.000 |
  1330. +-------+--------+------------+--------+-------+
  1331. |30 |120 |8.333 |125 | 8.000 |
  1332. +-------+--------+------------+--------+-------+
  1333. |31 |124 |8.064 |125 | 8.000 |
  1334. +-------+--------+------------+--------+-------+
  1335. |32 |128 |7.812 |131 | 7.619 |
  1336. +-------+--------+------------+--------+-------+
  1337. |33 |132 |7.575 |150 | 6.666 |
  1338. +-------+--------+------------+--------+-------+
  1339. |34 |136 |7.352 |150 | 6.666 |
  1340. +-------+--------+------------+--------+-------+
  1341. |35 |140 |7.142 |150 | 6.666 |
  1342. +-------+--------+------------+--------+-------+
  1343. |36 |144 |6.944 |150 | 6.666 |
  1344. +-------+--------+------------+--------+-------+
  1345. |37 |148 |6.756 |150 | 6.666 |
  1346. +-------+--------+------------+--------+-------+
  1347. |38 |152 |6.578 |175 | 5.714 |
  1348. +-------+--------+------------+--------+-------+
  1349. |39 |156 |6.410 |175 | 5.714 |
  1350. +-------+--------+------------+--------+-------+
  1351. |40 |160 |6.250 |175 | 5.714 |
  1352. +-------+--------+------------+--------+-------+
  1353. |41 |164 |6.097 |175 | 5.714 |
  1354. +-------+--------+------------+--------+-------+
  1355. |42 |168 |5.952 |175 | 5.714 |
  1356. +-------+--------+------------+--------+-------+
  1357. |43 |172 |5.813 |175 | 5.714 |
  1358. +-------+--------+------------+--------+-------+
  1359. |44 |176 |5.681 |187 | 5.333 |
  1360. +-------+--------+------------+--------+-------+
  1361. |45 |180 |5.555 |187 | 5.333 |
  1362. +-------+--------+------------+--------+-------+
  1363. |46 |184 |5.434 |187 | 5.333 |
  1364. +-------+--------+------------+--------+-------+
  1365. |47 |188 |5.319 |200 | 5.000 |
  1366. +-------+--------+------------+--------+-------+
  1367. |48 |192 |5.208 |200 | 5.000 |
  1368. +-------+--------+------------+--------+-------+
  1369. |49 |196 |5.102 |200 | 5.000 |
  1370. +-------+--------+------------+--------+-------+
  1371. 17. Serial NVRAM
  1372. ================
  1373. (added by Richard Waltham: [email protected])
  1374. 17.1 Features
  1375. -------------
  1376. Enabling serial NVRAM support enables detection of the serial NVRAM included
  1377. on Symbios and some Symbios compatible host adaptors, and Tekram boards. The
  1378. serial NVRAM is used by Symbios and Tekram to hold set up parameters for the
  1379. host adaptor and its attached drives.
  1380. The Symbios NVRAM also holds data on the boot order of host adaptors in a
  1381. system with more than one host adaptor. This enables the order of scanning
  1382. the cards for drives to be changed from the default used during host adaptor
  1383. detection.
  1384. This can be done to a limited extent at the moment using "reverse probe" but
  1385. this only changes the order of detection of different types of cards. The
  1386. NVRAM boot order settings can do this as well as change the order the same
  1387. types of cards are scanned in, something "reverse probe" cannot do.
  1388. Tekram boards using Symbios chips, DC390W/F/U, which have NVRAM are detected
  1389. and this is used to distinguish between Symbios compatible and Tekram host
  1390. adaptors. This is used to disable the Symbios compatible "diff" setting
  1391. incorrectly set on Tekram boards if the CONFIG_SCSI_53C8XX_SYMBIOS_COMPAT
  1392. configuration parameter is set enabling both Symbios and Tekram boards to be
  1393. used together with the Symbios cards using all their features, including
  1394. "diff" support. ("led pin" support for Symbios compatible cards can remain
  1395. enabled when using Tekram cards. It does nothing useful for Tekram host
  1396. adaptors but does not cause problems either.)
  1397. 17.2 Symbios NVRAM layout
  1398. -------------------------
  1399. typical data at NVRAM address 0x100 (53c810a NVRAM)::
  1400. 00 00
  1401. 64 01
  1402. 8e 0b
  1403. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
  1404. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62
  1405. 04 00 03 00 00 10 00 58 00 00 01 00 00 63
  1406. 04 00 01 00 00 10 00 48 00 00 01 00 00 61
  1407. 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  1408. 0f 00 08 08 64 00 0a 00
  1409. 0f 00 08 08 64 00 0a 00
  1410. 0f 00 08 08 64 00 0a 00
  1411. 0f 00 08 08 64 00 0a 00
  1412. 0f 00 08 08 64 00 0a 00
  1413. 0f 00 08 08 64 00 0a 00
  1414. 0f 00 08 08 64 00 0a 00
  1415. 0f 00 08 08 64 00 0a 00
  1416. 0f 00 08 08 64 00 0a 00
  1417. 0f 00 08 08 64 00 0a 00
  1418. 0f 00 08 08 64 00 0a 00
  1419. 0f 00 08 08 64 00 0a 00
  1420. 0f 00 08 08 64 00 0a 00
  1421. 0f 00 08 08 64 00 0a 00
  1422. 0f 00 08 08 64 00 0a 00
  1423. 0f 00 08 08 64 00 0a 00
  1424. 00 00 00 00 00 00 00 00
  1425. 00 00 00 00 00 00 00 00
  1426. 00 00 00 00 00 00 00 00
  1427. 00 00 00 00 00 00 00 00
  1428. 00 00 00 00 00 00 00 00
  1429. 00 00 00 00 00 00 00 00
  1430. 00 00 00 00 00 00 00 00
  1431. 00 00 00 00 00 00 00 00
  1432. 00 00 00 00 00 00 00 00
  1433. 00 00 00 00 00 00 00 00
  1434. 00 00 00 00 00 00 00 00
  1435. 00 00 00 00 00 00 00 00
  1436. 00 00 00 00 00 00 00 00
  1437. 00 00 00 00 00 00 00 00
  1438. 00 00 00 00 00 00 00 00
  1439. 00 00 00 00 00 00 00 00
  1440. 00 00 00 00 00 00 00 00
  1441. 00 00 00 00 00 00 00 00
  1442. 00 00 00 00 00 00 00 00
  1443. fe fe
  1444. 00 00
  1445. 00 00
  1446. NVRAM layout details
  1447. ============= ================
  1448. NVRAM Address
  1449. ============= ================
  1450. 0x000-0x0ff not used
  1451. 0x100-0x26f initialised data
  1452. 0x270-0x7ff not used
  1453. ============= ================
  1454. general layout::
  1455. header - 6 bytes,
  1456. data - 356 bytes (checksum is byte sum of this data)
  1457. trailer - 6 bytes
  1458. ---
  1459. total 368 bytes
  1460. data area layout::
  1461. controller set up - 20 bytes
  1462. boot configuration - 56 bytes (4x14 bytes)
  1463. device set up - 128 bytes (16x8 bytes)
  1464. unused (spare?) - 152 bytes (19x8 bytes)
  1465. ---
  1466. total 356 bytes
  1467. header::
  1468. 00 00 - ?? start marker
  1469. 64 01 - byte count (lsb/msb excludes header/trailer)
  1470. 8e 0b - checksum (lsb/msb excludes header/trailer)
  1471. controller set up::
  1472. 00 30 00 00 00 00 07 00 00 00 00 00 00 00 07 04 10 04 00 00
  1473. | | | |
  1474. | | | -- host ID
  1475. | | |
  1476. | | --Removable Media Support
  1477. | | 0x00 = none
  1478. | | 0x01 = Bootable Device
  1479. | | 0x02 = All with Media
  1480. | |
  1481. | --flag bits 2
  1482. | 0x00000001= scan order hi->low
  1483. | (default 0x00 - scan low->hi)
  1484. --flag bits 1
  1485. 0x00000001 scam enable
  1486. 0x00000010 parity enable
  1487. 0x00000100 verbose boot msgs
  1488. remaining bytes unknown - they do not appear to change in my
  1489. current set up for any of the controllers.
  1490. default set up is identical for 53c810a and 53c875 NVRAM
  1491. (Removable Media added Symbios BIOS version 4.09)
  1492. boot configuration
  1493. boot order set by order of the devices in this table::
  1494. 04 00 0f 00 00 10 00 50 00 00 01 00 00 62 -- 1st controller
  1495. 04 00 03 00 00 10 00 58 00 00 01 00 00 63 2nd controller
  1496. 04 00 01 00 00 10 00 48 00 00 01 00 00 61 3rd controller
  1497. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4th controller
  1498. | | | | | | | |
  1499. | | | | | | ---- PCI io port adr
  1500. | | | | | --0x01 init/scan at boot time
  1501. | | | | --PCI device/function number (0xdddddfff)
  1502. | | ----- ?? PCI vendor ID (lsb/msb)
  1503. ----PCI device ID (lsb/msb)
  1504. ?? use of this data is a guess but seems reasonable
  1505. remaining bytes unknown - they do not appear to change in my
  1506. current set up
  1507. default set up is identical for 53c810a and 53c875 NVRAM
  1508. --------------------------------------------------------
  1509. device set up (up to 16 devices - includes controller)::
  1510. 0f 00 08 08 64 00 0a 00 - id 0
  1511. 0f 00 08 08 64 00 0a 00
  1512. 0f 00 08 08 64 00 0a 00
  1513. 0f 00 08 08 64 00 0a 00
  1514. 0f 00 08 08 64 00 0a 00
  1515. 0f 00 08 08 64 00 0a 00
  1516. 0f 00 08 08 64 00 0a 00
  1517. 0f 00 08 08 64 00 0a 00
  1518. 0f 00 08 08 64 00 0a 00
  1519. 0f 00 08 08 64 00 0a 00
  1520. 0f 00 08 08 64 00 0a 00
  1521. 0f 00 08 08 64 00 0a 00
  1522. 0f 00 08 08 64 00 0a 00
  1523. 0f 00 08 08 64 00 0a 00
  1524. 0f 00 08 08 64 00 0a 00
  1525. 0f 00 08 08 64 00 0a 00 - id 15
  1526. | | | | | |
  1527. | | | | ----timeout (lsb/msb)
  1528. | | | --synch period (0x?? 40 Mtrans/sec- fast 40) (probably 0x28)
  1529. | | | (0x30 20 Mtrans/sec- fast 20)
  1530. | | | (0x64 10 Mtrans/sec- fast )
  1531. | | | (0xc8 5 Mtrans/sec)
  1532. | | | (0x00 asynchronous)
  1533. | | -- ?? max sync offset (0x08 in NVRAM on 53c810a)
  1534. | | (0x10 in NVRAM on 53c875)
  1535. | --device bus width (0x08 narrow)
  1536. | (0x10 16 bit wide)
  1537. --flag bits
  1538. 0x00000001 - disconnect enabled
  1539. 0x00000010 - scan at boot time
  1540. 0x00000100 - scan luns
  1541. 0x00001000 - queue tags enabled
  1542. remaining bytes unknown - they do not appear to change in my
  1543. current set up
  1544. ?? use of this data is a guess but seems reasonable
  1545. (but it could be max bus width)
  1546. default set up for 53c810a NVRAM
  1547. default set up for 53c875 NVRAM
  1548. - bus width - 0x10
  1549. - sync offset ? - 0x10
  1550. - sync period - 0x30
  1551. ?? spare device space (32 bit bus ??)
  1552. ::
  1553. 00 00 00 00 00 00 00 00 (19x8bytes)
  1554. .
  1555. .
  1556. 00 00 00 00 00 00 00 00
  1557. default set up is identical for 53c810a and 53c875 NVRAM
  1558. --------------------------------------------------------
  1559. trailer::
  1560. fe fe - ? end marker ?
  1561. 00 00
  1562. 00 00
  1563. default set up is identical for 53c810a and 53c875 NVRAM
  1564. -----------------------------------------------------------
  1565. 17.3 Tekram NVRAM layout
  1566. ------------------------
  1567. nvram 64x16 (1024 bit)
  1568. Drive settings::
  1569. Drive ID 0-15 (addr 0x0yyyy0 = device setup, yyyy = ID)
  1570. (addr 0x0yyyy1 = 0x0000)
  1571. x x x x x x x x x x x x x x x x
  1572. | | | | | | | | |
  1573. | | | | | | | | ----- parity check 0 - off
  1574. | | | | | | | | 1 - on
  1575. | | | | | | | |
  1576. | | | | | | | ------- sync neg 0 - off
  1577. | | | | | | | 1 - on
  1578. | | | | | | |
  1579. | | | | | | --------- disconnect 0 - off
  1580. | | | | | | 1 - on
  1581. | | | | | |
  1582. | | | | | ----------- start cmd 0 - off
  1583. | | | | | 1 - on
  1584. | | | | |
  1585. | | | | -------------- tagged cmds 0 - off
  1586. | | | | 1 - on
  1587. | | | |
  1588. | | | ---------------- wide neg 0 - off
  1589. | | | 1 - on
  1590. | | |
  1591. --------------------------- sync rate 0 - 10.0 Mtrans/sec
  1592. 1 - 8.0
  1593. 2 - 6.6
  1594. 3 - 5.7
  1595. 4 - 5.0
  1596. 5 - 4.0
  1597. 6 - 3.0
  1598. 7 - 2.0
  1599. 7 - 2.0
  1600. 8 - 20.0
  1601. 9 - 16.7
  1602. a - 13.9
  1603. b - 11.9
  1604. Global settings
  1605. Host flags 0 (addr 0x100000, 32)::
  1606. x x x x x x x x x x x x x x x x
  1607. | | | | | | | | | | | |
  1608. | | | | | | | | ----------- host ID 0x00 - 0x0f
  1609. | | | | | | | |
  1610. | | | | | | | ----------------------- support for 0 - off
  1611. | | | | | | | > 2 drives 1 - on
  1612. | | | | | | |
  1613. | | | | | | ------------------------- support drives 0 - off
  1614. | | | | | | > 1Gbytes 1 - on
  1615. | | | | | |
  1616. | | | | | --------------------------- bus reset on 0 - off
  1617. | | | | | power on 1 - on
  1618. | | | | |
  1619. | | | | ----------------------------- active neg 0 - off
  1620. | | | | 1 - on
  1621. | | | |
  1622. | | | -------------------------------- imm seek 0 - off
  1623. | | | 1 - on
  1624. | | |
  1625. | | ---------------------------------- scan luns 0 - off
  1626. | | 1 - on
  1627. | |
  1628. -------------------------------------- removable 0 - disable
  1629. as BIOS dev 1 - boot device
  1630. 2 - all
  1631. Host flags 1 (addr 0x100001, 33)::
  1632. x x x x x x x x x x x x x x x x
  1633. | | | | | |
  1634. | | | --------- boot delay 0 - 3 sec
  1635. | | | 1 - 5
  1636. | | | 2 - 10
  1637. | | | 3 - 20
  1638. | | | 4 - 30
  1639. | | | 5 - 60
  1640. | | | 6 - 120
  1641. | | |
  1642. --------------------------- max tag cmds 0 - 2
  1643. 1 - 4
  1644. 2 - 8
  1645. 3 - 16
  1646. 4 - 32
  1647. Host flags 2 (addr 0x100010, 34)::
  1648. x x x x x x x x x x x x x x x x
  1649. |
  1650. ----- F2/F6 enable 0 - off ???
  1651. 1 - on ???
  1652. checksum (addr 0x111111)
  1653. checksum = 0x1234 - (sum addr 0-63)
  1654. ----------------------------------------------------------------------------
  1655. default nvram data::
  1656. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  1657. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  1658. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  1659. 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000 0x0037 0x0000
  1660. 0x0f07 0x0400 0x0001 0x0000 0x0000 0x0000 0x0000 0x0000
  1661. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  1662. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
  1663. 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0xfbbc
  1664. 18. Support for Big Endian
  1665. ==========================
  1666. The PCI local bus has been primarily designed for x86 architecture.
  1667. As a consequence, PCI devices generally expect DWORDS using little endian
  1668. byte ordering.
  1669. 18.1 Big Endian CPU
  1670. -------------------
  1671. In order to support NCR chips on a Big Endian architecture the driver has to
  1672. perform byte reordering each time it is needed. This feature has been
  1673. added to the driver by Cort <[email protected]> and is available in driver
  1674. version 2.5 and later ones. For the moment Big Endian support has only
  1675. been tested on Linux/PPC (PowerPC).
  1676. 18.2 NCR chip in Big Endian mode of operations
  1677. ----------------------------------------------
  1678. It can be read in SYMBIOS documentation that some chips support a special
  1679. Big Endian mode, on paper: 53C815, 53C825A, 53C875, 53C875N, 53C895.
  1680. This mode of operations is not software-selectable, but needs pin named
  1681. BigLit to be pulled-up. Using this mode, most of byte reorderings should
  1682. be avoided when the driver is running on a Big Endian CPU.
  1683. Driver version 2.5 is also, in theory, ready for this feature.