⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 advansys.c

📁 GNU Mach 微内核源代码, 基于美国卡内基美隆大学的 Mach 研究项目
💻 C
📖 第 1 页 / 共 5 页
字号:
        Debugging Message Levels:           0: Errors Only           1: High-Level Tracing           2-N: Verbose Tracing         I don't know the approved way for turning on printk()s to the        console. Here's a program I use to do this. Debug output is        logged in /var/adm/messages.           main()          {                  syscall(103, 7, 0, 0);          }         I found that increasing LOG_BUF_LEN to 40960 in kernel/printk.c        prevents most level 1 debug messages from being lost.     3. ADVANSYS_STATS - Enable statistics (Def: Enabled >= v1.3.0)         Enabling this option adds statistics collection and display        through /proc to the driver. The information is useful for        monitoring driver and device performance. It will add to the        size of the driver execution image and add minor overhead to        the execution of the driver.        Statistics are maintained on a per adapter basis. Driver entry        point call counts and transfer size counts are maintained.        Statistics are only available for kernels greater than or equal        to v1.3.0 with the CONFIG_PROC_FS (/proc) file system configured.        AdvanSys SCSI adapter files have the following path name format:           /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)]        This information can be displayed with cat. For example:           cat /proc/scsi/advansys/0        When ADVANSYS_STATS is not defined the AdvanSys /proc files only        contain adapter and device configuration information.  H. Driver LILO Option      If init/main.c is modified as described in the 'Directions for Adding     the AdvanSys Driver to Linux' section (B.4.) above, the driver will     recognize the 'advansys' LILO command line and /etc/lilo.conf option.     This option can be used to either disable I/O port scanning or to limit     scanning to 1 - 4 I/O ports. Regardless of the option setting EISA and     PCI boards will still be searched for and detected. This option only     affects searching for ISA and VL boards.     Examples:       1. Eliminate I/O port scanning:            boot: linux advansys=              or            boot: linux advansys=0x0       2. Limit I/O port scanning to one I/O port:            boot: linux advansys=0x110       3. Limit I/O port scanning to four I/O ports:            boot: linux advansys=0x110,0x210,0x230,0x330     For a loadable module the same effect can be achieved by setting     the 'asc_iopflag' variable and 'asc_ioport' array when loading     the driver, e.g.           insmod advansys.o asc_iopflag=1 asc_ioport=0x110,0x330     If ADVANSYS_DEBUG is defined a 5th (ASC_NUM_IOPORT_PROBE + 1)     I/O Port may be added to specify the driver debug level. Refer to     the 'Driver Compile Time Options and Debugging' section above for     more information.  I. Release History     BETA-1.0 (12/23/95):          First Release     BETA-1.1 (12/28/95):         1. Prevent advansys_detect() from being called twice.         2. Add LILO 0xdeb[0-f] option to set 'asc_dbglvl'.     1.2 (1/12/96):         1. Prevent re-entrancy in the interrupt handler which            resulted in the driver hanging Linux.         2. Fix problem that prevented ABP-940 cards from being            recognized on some PCI motherboards.         3. Add support for the ABP-5140 PnP ISA card.         4. Fix check condition return status.         5. Add conditionally compiled code for Linux v1.3.X.     1.3 (2/23/96):         1. Fix problem in advansys_biosparam() that resulted in the            wrong drive geometry being returned for drives > 1GB with            extended translation enabled.         2. Add additional tracing during device initialization.         3. Change code that only applies to ISA PnP adapter.         4. Eliminate 'make dep' warning.         5. Try to fix problem with handling resets by increasing their            timeout value.     1.4 (5/8/96):         1. Change definitions to eliminate conflicts with other subsystems.         2. Add versioning code for the shared interrupt changes.         3. Eliminate problem in asc_rmqueue() with iterating after removing            a request.         4. Remove reset request loop problem from the "Known Problems or            Issues" section. This problem was isolated and fixed in the            mid-level SCSI driver.             1.5 (8/8/96):         1. Add support for ABP-940U (PCI Ultra) adapter.         2. Add support for IRQ sharing by setting the SA_SHIRQ flag for            request_irq and supplying a dev_id pointer to both request_irq()            and free_irq().         3. In AscSearchIOPortAddr11() restore a call to check_region() which            should be used before I/O port probing.         4. Fix bug in asc_prt_hex() which resulted in the displaying            the wrong data.         5. Incorporate miscellaneous Asc Library bug fixes and new microcode.         6. Change driver versioning to be specific to each Linux sub-level.         7. Change statistics gathering to be per adapter instead of global            to the driver.         8. Add more information and statistics to the adapter /proc file:            /proc/scsi/advansys[0...].         9. Remove 'cmd_per_lun' from the "Known Problems or Issues" list.            This problem has been addressed with the SCSI mid-level changes            made in v1.3.89. The advansys_select_queue_depths() function            was added for the v1.3.89 changes.     1.6 (9/10/96):         1. Incorporate miscellaneous Asc Library bug fixes and new microcode.     1.7 (9/25/96):         1. Enable clustering and optimize the setting of the maximum number            of scatter gather elements for any particular board. Clustering            increases CPU utilization, but results in a relatively larger            increase in I/O throughput.         2. Improve the performance of the request queuing functions by            adding a last pointer to the queue structure.         3. Correct problems with reset and abort request handling that            could have hung or crashed Linux.         4. Add more information to the adapter /proc file:            /proc/scsi/advansys[0...].         5. Remove the request timeout issue form the driver issues list.         6. Miscellaneous documentation additions and changes.     1.8 (10/4/96):         1. Make changes to handle the new v2.1.0 kernel memory mapping            in which a kernel virtual address may not be equivalent to its            bus or DMA memory address.         2. Change abort and reset request handling to make it yet even            more robust.         3. Try to mitigate request starvation by sending ordered requests            to heavily loaded, tag queuing enabled devices.         4. Maintain statistics on request response time.         5. Add request response time statistics and other information to            the adapter /proc file: /proc/scsi/advansys[0...].     1.9 (10/21/96):         1. Add conditionally compiled code (ASC_QUEUE_FLOW_CONTROL) to            make use of mid-level SCSI driver device queue depth flow            control mechanism. This will eliminate aborts caused by a            device being unable to keep up with requests and eliminate            repeat busy or QUEUE FULL status returned by a device.         2. Incorporate miscellaneous Asc Library bug fixes.         3. To allow the driver to work in kernels with broken module            support set 'cmd_per_lun' if the driver is compiled as a            module. This change affects kernels v1.3.89 to present.         4. Remove PCI BIOS address from the driver banner. The PCI BIOS            is relocated by the motherboard BIOS and its new address can            not be determined by the driver.         5. Add mid-level SCSI queue depth information to the adapter            /proc file: /proc/scsi/advansys[0...].     2.0 (11/14/96):         1. Change allocation of global structures used for device            initialization to guarantee they are in DMA-able memory.            Previously when the driver was loaded as a module these            structures might not have been in DMA-able memory, causing            device initialization to fail.     2.1 (12/30/96):         1. In advansys_reset(), if the request is a synchronous reset            request, even if the request serial number has changed, then            complete the request.         2. Add Asc Library bug fixes including new microcode.         3. Clear inquiry buffer before using it.         4. Correct ifdef typo.     2.2 (1/15/97):         1. Add Asc Library bug fixes including new microcode.         2. Add synchronous data transfer rate information to the            adapter /proc file: /proc/scsi/advansys[0...].         3. Change ADVANSYS_DEBUG to be disabled by default. This            will reduce the size of the driver image, eliminate execution            overhead, and remove unneeded symbols from the kernel symbol            space that were previously added by the driver.         4. Add new compile-time option ADVANSYS_ASSERT for assertion            code that used to be defined within ADVANSYS_DEBUG. This            option is enabled by default.     2.8 (5/26/97):         1. Change version number to 2.8 to synchronize the Linux driver            version numbering with other AdvanSys drivers.         2. Reformat source files without tabs to present the same view            of the file to everyone regardless of the editor tab setting            being used.         3. Add Asc Library bug fixes.     3.1A (1/8/98):         1. Change version number to 3.1 to indicate that support for            Ultra-Wide adapters (ABP-940UW) is included in this release.         2. Add Asc Library (Narrow Board) bug fixes.         3. Report an underrun condition with the host status byte set            to DID_UNDERRUN. Currently DID_UNDERRUN is defined to 0 which            causes the underrun condition to be ignored. When Linux defines            its own DID_UNDERRUN the constant defined in this file can be            removed.         4. Add patch to AscWaitTixISRDone().         5. Add support for up to 16 different AdvanSys host adapter SCSI            channels in one system. This allows four cards with four channels            to be used in one system.     3.1B (1/9/98):         1. Handle that PCI register base addresses are not always page            aligned even though ioremap() requires that the address argument            be page aligned.     3.1C (1/10/98):         1. Update latest BIOS version checked for from the /proc file.         2. Don't set microcode SDTR variable at initialization. Instead            wait until device capabilities have been detected from an Inquiry            command.     3.1D (1/21/98):         1. Improve performance when the driver is compiled as module by            allowing up to 64 scatter-gather elements instead of 8.     3.1E (5/1/98):         1. Set time delay in AscWaitTixISRDone() to 1000 ms.         2. Include SMP locking changes.         3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS            access functions.         4. Update board serial number printing.         5. Try allocating an IRQ both with and without the SA_INTERRUPT            flag set to allow IRQ sharing with drivers that do not set            the SA_INTERRUPT flag. Also display a more descriptive error            message if request_irq() fails.         5. Update to latest Asc and Adv Libraries.  J. Known Problems or Issues         1. Remove conditional constants (ASC_QUEUE_FLOW_CONTROL) around            the queue depth flow control code when mid-level SCSI changes            are included in Linux.  K. Credits     Nathan Hartwell <mage@cdc3.cdc.net> provided the directions and     basis for the Linux v1.3.X changes which were included in the     1.2 release.     Thomas E Zerucha <zerucha@shell.portal.com> pointed out a bug     in advansys_biosparam() which was fixed in the 1.3 release.     Erik Ratcliffe <erik@caldera.com> has done testing of the     AdvanSys driver in the Caldera releases.     Rik van Riel <H.H.vanRiel@fys.ruu.nl> provided a patch to     AscWaitTixISRDone() which he found necessary to make the     driver work with a SCSI-1 disk.     Mark Moran <mmoran@mmoran.com> has helped test Ultra-Wide     support in the 3.1A driver.  L. AdvanSys Contact Information      Mail:                   Advanced System Products, Inc.                             1150 Ringwood Court                             San Jose, CA 95131     Operator:               1-408-383-9400     FAX:                    1-408-383-9612     Tech Support:           1-800-525-7440/1-408-467-2930     BBS:                    1-408-383-9540 (14400,N,8,1)     Interactive FAX:        1-408-383-9753     Customer Direct Sales:  1-800-525-7443/1-408-383-5777     Tech Support E-Mail:    support@advansys.com     FTP Site:               ftp.advansys.com (login: anonymous)     Web Site:               http://www.advansys.com*//* * --- Linux Version *//* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */#define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))#ifndef LINUX_VERSION_CODE#include <linux/version.h>#endif /* LINUX_VERSION_CODE *//* * --- Linux Include Files  */#include <linux/config.h>#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)#ifdef MODULE#include <linux/module.h>#endif /* MODULE */#endif /* version >= v1.3.0 */#include <linux/string.h>#include <linux/sched.h>#include <linux/kernel.h>#include <linux/head.h>#include <linux/types.h>#include <linux/ioport.h>#include <linux/delay.h>#include <linux/malloc.h>#include <linux/mm.h>#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)#include <linux/proc_fs.h>#endif /* version >= v1.3.0 */#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,23)#include <linux/init.h>#endif /* version >= v2.1.23 */#include <asm/io.h>#include <asm/system.h>#include <asm/dma.h>#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)#include "../block/blk.h"#else /* version >= v1.3.0 */#include <linux/blk.h>#include <linux/stat.h>#endif /* version >= v1.3.0 */#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,95)#include <asm/spinlock.h>#endif /* version >= 2.1.95 */#include "scsi.h"#include "hosts.h"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -