xref: /OK3568_Linux_fs/kernel/Documentation/scsi/advansys.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun=====================
4*4882a593SmuzhiyunAdvanSys Driver Notes
5*4882a593Smuzhiyun=====================
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunAdvanSys (Advanced System Products, Inc.) manufactures the following
8*4882a593SmuzhiyunRISC-based, Bus-Mastering, Fast (10 Mhz) and Ultra (20 Mhz) Narrow
9*4882a593Smuzhiyun(8-bit transfer) SCSI Host Adapters for the ISA, EISA, VL, and PCI
10*4882a593Smuzhiyunbuses and RISC-based, Bus-Mastering, Ultra (20 Mhz) Wide (16-bit
11*4882a593Smuzhiyuntransfer) SCSI Host Adapters for the PCI bus.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunThe CDB counts below indicate the number of SCSI CDB (Command
14*4882a593SmuzhiyunDescriptor Block) requests that can be stored in the RISC chip
15*4882a593Smuzhiyuncache and board LRAM. A CDB is a single SCSI command. The driver
16*4882a593Smuzhiyundetect routine will display the number of CDBs available for each
17*4882a593Smuzhiyunadapter detected. The number of CDBs used by the driver can be
18*4882a593Smuzhiyunlowered in the BIOS by changing the 'Host Queue Size' adapter setting.
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunLaptop Products:
21*4882a593Smuzhiyun  - ABP-480 - Bus-Master CardBus (16 CDB)
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunConnectivity Products:
24*4882a593Smuzhiyun   - ABP510/5150 - Bus-Master ISA (240 CDB)
25*4882a593Smuzhiyun   - ABP5140 - Bus-Master ISA PnP (16 CDB)
26*4882a593Smuzhiyun   - ABP5142 - Bus-Master ISA PnP with floppy (16 CDB)
27*4882a593Smuzhiyun   - ABP902/3902 - Bus-Master PCI (16 CDB)
28*4882a593Smuzhiyun   - ABP3905 - Bus-Master PCI (16 CDB)
29*4882a593Smuzhiyun   - ABP915 - Bus-Master PCI (16 CDB)
30*4882a593Smuzhiyun   - ABP920 - Bus-Master PCI (16 CDB)
31*4882a593Smuzhiyun   - ABP3922 - Bus-Master PCI (16 CDB)
32*4882a593Smuzhiyun   - ABP3925 - Bus-Master PCI (16 CDB)
33*4882a593Smuzhiyun   - ABP930 - Bus-Master PCI (16 CDB)
34*4882a593Smuzhiyun   - ABP930U - Bus-Master PCI Ultra (16 CDB)
35*4882a593Smuzhiyun   - ABP930UA - Bus-Master PCI Ultra (16 CDB)
36*4882a593Smuzhiyun   - ABP960 - Bus-Master PCI MAC/PC (16 CDB)
37*4882a593Smuzhiyun   - ABP960U - Bus-Master PCI MAC/PC Ultra (16 CDB)
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunSingle Channel Products:
40*4882a593Smuzhiyun   - ABP542 - Bus-Master ISA with floppy (240 CDB)
41*4882a593Smuzhiyun   - ABP742 - Bus-Master EISA (240 CDB)
42*4882a593Smuzhiyun   - ABP842 - Bus-Master VL (240 CDB)
43*4882a593Smuzhiyun   - ABP940 - Bus-Master PCI (240 CDB)
44*4882a593Smuzhiyun   - ABP940U - Bus-Master PCI Ultra (240 CDB)
45*4882a593Smuzhiyun   - ABP940UA/3940UA - Bus-Master PCI Ultra (240 CDB)
46*4882a593Smuzhiyun   - ABP970 - Bus-Master PCI MAC/PC (240 CDB)
47*4882a593Smuzhiyun   - ABP970U - Bus-Master PCI MAC/PC Ultra (240 CDB)
48*4882a593Smuzhiyun   - ABP3960UA - Bus-Master PCI MAC/PC Ultra (240 CDB)
49*4882a593Smuzhiyun   - ABP940UW/3940UW - Bus-Master PCI Ultra-Wide (253 CDB)
50*4882a593Smuzhiyun   - ABP970UW - Bus-Master PCI MAC/PC Ultra-Wide (253 CDB)
51*4882a593Smuzhiyun   - ABP3940U2W - Bus-Master PCI LVD/Ultra2-Wide (253 CDB)
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunMulti-Channel Products:
54*4882a593Smuzhiyun   - ABP752 - Dual Channel Bus-Master EISA (240 CDB Per Channel)
55*4882a593Smuzhiyun   - ABP852 - Dual Channel Bus-Master VL (240 CDB Per Channel)
56*4882a593Smuzhiyun   - ABP950 - Dual Channel Bus-Master PCI (240 CDB Per Channel)
57*4882a593Smuzhiyun   - ABP950UW - Dual Channel Bus-Master PCI Ultra-Wide (253 CDB Per Channel)
58*4882a593Smuzhiyun   - ABP980 - Four Channel Bus-Master PCI (240 CDB Per Channel)
59*4882a593Smuzhiyun   - ABP980U - Four Channel Bus-Master PCI Ultra (240 CDB Per Channel)
60*4882a593Smuzhiyun   - ABP980UA/3980UA - Four Channel Bus-Master PCI Ultra (16 CDB Per Chan.)
61*4882a593Smuzhiyun   - ABP3950U2W - Bus-Master PCI LVD/Ultra2-Wide and Ultra-Wide (253 CDB)
62*4882a593Smuzhiyun   - ABP3950U3W - Bus-Master PCI Dual LVD2/Ultra3-Wide (253 CDB)
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunDriver Compile Time Options and Debugging
65*4882a593Smuzhiyun=========================================
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunThe following constants can be defined in the source file.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun1. ADVANSYS_ASSERT - Enable driver assertions (Def: Enabled)
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun   Enabling this option adds assertion logic statements to the
72*4882a593Smuzhiyun   driver. If an assertion fails a message will be displayed to
73*4882a593Smuzhiyun   the console, but the system will continue to operate. Any
74*4882a593Smuzhiyun   assertions encountered should be reported to the person
75*4882a593Smuzhiyun   responsible for the driver. Assertion statements may proactively
76*4882a593Smuzhiyun   detect problems with the driver and facilitate fixing these
77*4882a593Smuzhiyun   problems. Enabling assertions will add a small overhead to the
78*4882a593Smuzhiyun   execution of the driver.
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun2. ADVANSYS_DEBUG - Enable driver debugging (Def: Disabled)
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun   Enabling this option adds tracing functions to the driver and the
83*4882a593Smuzhiyun   ability to set a driver tracing level at boot time.  This option is
84*4882a593Smuzhiyun   very useful for debugging the driver, but it will add to the size
85*4882a593Smuzhiyun   of the driver execution image and add overhead to the execution of
86*4882a593Smuzhiyun   the driver.
87*4882a593Smuzhiyun
88*4882a593Smuzhiyun   The amount of debugging output can be controlled with the global
89*4882a593Smuzhiyun   variable 'asc_dbglvl'. The higher the number the more output. By
90*4882a593Smuzhiyun   default the debug level is 0.
91*4882a593Smuzhiyun
92*4882a593Smuzhiyun   If the driver is loaded at boot time and the LILO Driver Option
93*4882a593Smuzhiyun   is included in the system, the debug level can be changed by
94*4882a593Smuzhiyun   specifying a 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. The
95*4882a593Smuzhiyun   first three hex digits of the pseudo I/O Port must be set to
96*4882a593Smuzhiyun   'deb' and the fourth hex digit specifies the debug level: 0 - F.
97*4882a593Smuzhiyun   The following command line will look for an adapter at 0x330
98*4882a593Smuzhiyun   and set the debug level to 2::
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun      linux advansys=0x330,0,0,0,0xdeb2
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun   If the driver is built as a loadable module this variable can be
103*4882a593Smuzhiyun   defined when the driver is loaded. The following insmod command
104*4882a593Smuzhiyun   will set the debug level to one::
105*4882a593Smuzhiyun
106*4882a593Smuzhiyun      insmod advansys.o asc_dbglvl=1
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun   Debugging Message Levels:
109*4882a593Smuzhiyun
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun      ==== ==================
112*4882a593Smuzhiyun      0    Errors Only
113*4882a593Smuzhiyun      1    High-Level Tracing
114*4882a593Smuzhiyun      2-N  Verbose Tracing
115*4882a593Smuzhiyun      ==== ==================
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun   To enable debug output to console, please make sure that:
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun   a. System and kernel logging is enabled (syslogd, klogd running).
120*4882a593Smuzhiyun   b. Kernel messages are routed to console output. Check
121*4882a593Smuzhiyun      /etc/syslog.conf for an entry similar to this::
122*4882a593Smuzhiyun
123*4882a593Smuzhiyun           kern.*                  /dev/console
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun   c. klogd is started with the appropriate -c parameter
126*4882a593Smuzhiyun      (e.g. klogd -c 8)
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun   This will cause printk() messages to be displayed on the
129*4882a593Smuzhiyun   current console. Refer to the klogd(8) and syslogd(8) man pages
130*4882a593Smuzhiyun   for details.
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun   Alternatively you can enable printk() to console with this
133*4882a593Smuzhiyun   program. However, this is not the 'official' way to do this.
134*4882a593Smuzhiyun
135*4882a593Smuzhiyun   Debug output is logged in /var/log/messages.
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun   ::
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun     main()
140*4882a593Smuzhiyun     {
141*4882a593Smuzhiyun             syscall(103, 7, 0, 0);
142*4882a593Smuzhiyun     }
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun   Increasing LOG_BUF_LEN in kernel/printk.c to something like
145*4882a593Smuzhiyun   40960 allows more debug messages to be buffered in the kernel
146*4882a593Smuzhiyun   and written to the console or log file.
147*4882a593Smuzhiyun
148*4882a593Smuzhiyun3. ADVANSYS_STATS - Enable statistics (Def: Enabled)
149*4882a593Smuzhiyun
150*4882a593Smuzhiyun   Enabling this option adds statistics collection and display
151*4882a593Smuzhiyun   through /proc to the driver. The information is useful for
152*4882a593Smuzhiyun   monitoring driver and device performance. It will add to the
153*4882a593Smuzhiyun   size of the driver execution image and add minor overhead to
154*4882a593Smuzhiyun   the execution of the driver.
155*4882a593Smuzhiyun
156*4882a593Smuzhiyun   Statistics are maintained on a per adapter basis. Driver entry
157*4882a593Smuzhiyun   point call counts and transfer size counts are maintained.
158*4882a593Smuzhiyun   Statistics are only available for kernels greater than or equal
159*4882a593Smuzhiyun   to v1.3.0 with the CONFIG_PROC_FS (/proc) file system configured.
160*4882a593Smuzhiyun
161*4882a593Smuzhiyun   AdvanSys SCSI adapter files have the following path name format::
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun      /proc/scsi/advansys/{0,1,2,3,...}
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun   This information can be displayed with cat. For example::
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun      cat /proc/scsi/advansys/0
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun   When ADVANSYS_STATS is not defined the AdvanSys /proc files only
170*4882a593Smuzhiyun   contain adapter and device configuration information.
171*4882a593Smuzhiyun
172*4882a593SmuzhiyunDriver LILO Option
173*4882a593Smuzhiyun==================
174*4882a593Smuzhiyun
175*4882a593SmuzhiyunIf init/main.c is modified as described in the 'Directions for Adding
176*4882a593Smuzhiyunthe AdvanSys Driver to Linux' section (B.4.) above, the driver will
177*4882a593Smuzhiyunrecognize the 'advansys' LILO command line and /etc/lilo.conf option.
178*4882a593SmuzhiyunThis option can be used to either disable I/O port scanning or to limit
179*4882a593Smuzhiyunscanning to 1 - 4 I/O ports. Regardless of the option setting EISA and
180*4882a593SmuzhiyunPCI boards will still be searched for and detected. This option only
181*4882a593Smuzhiyunaffects searching for ISA and VL boards.
182*4882a593Smuzhiyun
183*4882a593SmuzhiyunExamples:
184*4882a593Smuzhiyun  1. Eliminate I/O port scanning:
185*4882a593Smuzhiyun
186*4882a593Smuzhiyun     boot::
187*4882a593Smuzhiyun
188*4882a593Smuzhiyun	linux advansys=
189*4882a593Smuzhiyun
190*4882a593Smuzhiyun     or::
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun	boot: linux advansys=0x0
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun  2. Limit I/O port scanning to one I/O port:
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun     boot::
197*4882a593Smuzhiyun
198*4882a593Smuzhiyun	linux advansys=0x110
199*4882a593Smuzhiyun
200*4882a593Smuzhiyun  3. Limit I/O port scanning to four I/O ports:
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun     boot::
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun	linux advansys=0x110,0x210,0x230,0x330
205*4882a593Smuzhiyun
206*4882a593SmuzhiyunFor a loadable module the same effect can be achieved by setting
207*4882a593Smuzhiyunthe 'asc_iopflag' variable and 'asc_ioport' array when loading
208*4882a593Smuzhiyunthe driver, e.g.::
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun      insmod advansys.o asc_iopflag=1 asc_ioport=0x110,0x330
211*4882a593Smuzhiyun
212*4882a593SmuzhiyunIf ADVANSYS_DEBUG is defined a 5th (ASC_NUM_IOPORT_PROBE + 1)
213*4882a593SmuzhiyunI/O Port may be added to specify the driver debug level. Refer to
214*4882a593Smuzhiyunthe 'Driver Compile Time Options and Debugging' section above for
215*4882a593Smuzhiyunmore information.
216*4882a593Smuzhiyun
217*4882a593SmuzhiyunCredits (Chronological Order)
218*4882a593Smuzhiyun=============================
219*4882a593Smuzhiyun
220*4882a593SmuzhiyunBob Frey <bfrey@turbolinux.com.cn> wrote the AdvanSys SCSI driver
221*4882a593Smuzhiyunand maintained it up to 3.3F. He continues to answer questions
222*4882a593Smuzhiyunand help maintain the driver.
223*4882a593Smuzhiyun
224*4882a593SmuzhiyunNathan Hartwell <mage@cdc3.cdc.net> provided the directions and
225*4882a593Smuzhiyunbasis for the Linux v1.3.X changes which were included in the
226*4882a593Smuzhiyun1.2 release.
227*4882a593Smuzhiyun
228*4882a593SmuzhiyunThomas E Zerucha <zerucha@shell.portal.com> pointed out a bug
229*4882a593Smuzhiyunin advansys_biosparam() which was fixed in the 1.3 release.
230*4882a593Smuzhiyun
231*4882a593SmuzhiyunErik Ratcliffe <erik@caldera.com> has done testing of the
232*4882a593SmuzhiyunAdvanSys driver in the Caldera releases.
233*4882a593Smuzhiyun
234*4882a593SmuzhiyunRik van Riel <H.H.vanRiel@fys.ruu.nl> provided a patch to
235*4882a593SmuzhiyunAscWaitTixISRDone() which he found necessary to make the
236*4882a593Smuzhiyundriver work with a SCSI-1 disk.
237*4882a593Smuzhiyun
238*4882a593SmuzhiyunMark Moran <mmoran@mmoran.com> has helped test Ultra-Wide
239*4882a593Smuzhiyunsupport in the 3.1A driver.
240*4882a593Smuzhiyun
241*4882a593SmuzhiyunDoug Gilbert <dgilbert@interlog.com> has made changes and
242*4882a593Smuzhiyunsuggestions to improve the driver and done a lot of testing.
243*4882a593Smuzhiyun
244*4882a593SmuzhiyunKen Mort <ken@mort.net> reported a DEBUG compile bug fixed
245*4882a593Smuzhiyunin 3.2K.
246*4882a593Smuzhiyun
247*4882a593SmuzhiyunTom Rini <trini@kernel.crashing.org> provided the CONFIG_ISA
248*4882a593Smuzhiyunpatch and helped with PowerPC wide and narrow board support.
249*4882a593Smuzhiyun
250*4882a593SmuzhiyunPhilip Blundell <philb@gnu.org> provided an
251*4882a593Smuzhiyunadvansys_interrupts_enabled patch.
252*4882a593Smuzhiyun
253*4882a593SmuzhiyunDave Jones <dave@denial.force9.co.uk> reported the compiler
254*4882a593Smuzhiyunwarnings generated when CONFIG_PROC_FS was not defined in
255*4882a593Smuzhiyunthe 3.2M driver.
256*4882a593Smuzhiyun
257*4882a593SmuzhiyunJerry Quinn <jlquinn@us.ibm.com> fixed PowerPC support (endian
258*4882a593Smuzhiyunproblems) for wide cards.
259*4882a593Smuzhiyun
260*4882a593SmuzhiyunBryan Henderson <bryanh@giraffe-data.com> helped debug narrow
261*4882a593Smuzhiyuncard error handling.
262*4882a593Smuzhiyun
263*4882a593SmuzhiyunManuel Veloso <veloso@pobox.com> worked hard on PowerPC narrow
264*4882a593Smuzhiyunboard support and fixed a bug in AscGetEEPConfig().
265*4882a593Smuzhiyun
266*4882a593SmuzhiyunArnaldo Carvalho de Melo <acme@conectiva.com.br> made
267*4882a593Smuzhiyunsave_flags/restore_flags changes.
268*4882a593Smuzhiyun
269*4882a593SmuzhiyunAndy Kellner <AKellner@connectcom.net> continued the Advansys SCSI
270*4882a593Smuzhiyundriver development for ConnectCom (Version > 3.3F).
271*4882a593Smuzhiyun
272*4882a593SmuzhiyunKen Witherow for extensive testing during the development of version 3.4.
273