Date: Wed, 30 Dec 1998 18:34:36 -0500 (EST) From: David Kott <dakott@customnet.net> To: freebsd-stable@FreeBSD.ORG Subject: Possible Adaptec 1540 breakage in -stable? Message-ID: <Pine.BSF.4.05.9812301726290.221-200000@kott.my.domain>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Recently, I purchased a Zip plus, intending to hang it off an Adaptec
1540 SCSI adapter I had laying around. However, much to my dismay, after
re-adding aha support to my kernel, I got the following errors on all
subsequent SCSI bus reprobes:
aha0: DMA beyond end Of ISA: 0x748bf2c
(note, this address would change on every probe)
I seem to recall having this very same problem when I had initially
installed this adapter as my primary SCSI bus, before upgrading to a 2940.
IIRC, adding the kernel configuration option:
options BOUNCE_BUFFERS
cleared up the error. However, this time around, I do indeed still have
that directive in my configuration file, yet I still observe these errors.
I began searching the mail archives, and found several other similar
instances where users alleged that they had the aforementioned option
specified in a kernel built for an aha, and still observed similar errors.
I could not, however, find any correspondence suggesting a definitive
cause or resolution.
Some blundering kernel source searches showed me that I know absolutely
nothing about how FreeBSD handles ISA DMA transfers, save that the kernel
traps them, and copies the specific data to an address outside of the ISA
address range (> 16 Meg?) for subsequent access by the process requesting
said information.
Also, /usr/src/sys/i386/isa/aha1542.c has the line:
aha->flags = SDEV_BOUNCE;
directly after this I added the line:
printf ("aha%d: Enabling bounce buffers\n",aha->unit);
which then showed up in the kernel device probe at boot time. Here I was
just convincing myself that this buffer support was indeed being enabled,
as there were quite a few preprocessor directives surrounding said code.
Later, it seems that the flag is actually being referenced. For instance,
in /usr/src/sys/scsi/sd.c:
/*
* Use a bounce buffer if necessary
*/
#ifdef BOUNCE_BUFFERS
if (sc_link->flags & SDEV_BOUNCE)
vm_bounce_alloc(bp);
#endif
My kernel compile directory (/usr/src/sys/compile/mynofw) has the file
opt_bounce.h that consists of a single line:
#define BOUNCE_BUFFERS 1
One is inclined to suspect, then, that I properly specified that bounce
buffers should be used, and indeed the kernel compiled in code to support
them. Has anyone noticed any similar problems with their 154x
devices? Perhaps similar problems with their bt, wd7000 or ultra14
devices (which also have similar SDEV_BOUNCE flags set)
How about news that your 154x is working perfectly on a machine with more
then 16 megs? Is it your first bus? (scbus0?). What's _your_ kernel
config file look like?
I am currently using:
2.2.8-STABLE, compiled on Mon Dec 28 19:40:50 EST 1998 from a 'supped
tree updated that day, on an ASUS T2P4 with 128 Megs of RAM.
Relevant portions of my kernel device boot probe:
aha_init: AHA_RESET_TIMEOUT went to 1790
aha0: inquire 41, 30, 30, 35
aha0: Enabling bounce buffers <--- This was my added code.
100 nSEC ok, using 150 nSEC
aha0 at 0x330-0x333 irq 11 drq 7 on isa
aha0 waiting for scsi devices to settle
ahaintr mbxin op=0 0 0 0 0 0 <--- Prob. due to AHADEBUG that I
have defined
stat 4 for mbi[0]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[1]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[2]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[3]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[4]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[5]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[6]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[7]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[8]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[9]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[10]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[11]
addr = 0xf0a27b18
ahaintr mbxin op=0 0 0 0 0 0
stat 4 for mbi[12]
addr = 0xf0a27b18
ahaintr mbxin op=12 0 0 0 2c 0
stat 4 for mbi[13]
addr = 0xf0a27b18
Here is an abridged version of my kernel config file with the full text
as an attachment:
options BOUNCE_BUFFERS #include support for DMA bounce buffers
options "TUNE_1542"
options AHADEBUG <-- added subsequently.
controller isa0
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 7 vector ahaintr
controller scbus1 at aha0 <-- I have a 2940 providing scbus0
device sd0
pseudo-device ssc #super scsi <-- used to reprobe a given
SCSI bus
Any hints or suggests would be most welcome.
-d
[-- Attachment #2 --]
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
#For more information read the handbook part System Administration ->
# Configuring the FreeBSD Kernel -> The Configuration File.
# The handbook is available in /usr/share/doc/handbook or online as
# latest version from the FreeBSD World Wide Web server
# <URL:http://www.FreeBSD.ORG/>
#
# An exhaustive list of options and more detailed explanations of the
# device lines is present in the ./LINT configuration file. If you are
# in doubt as to the purpose or necessity of a line, check first in LINT.
#
# $Id: GENERIC,v 1.77.2.4 1997/02/22 20:31:24 joerg Exp $
machine "i386"
#cpu "I386_CPU"
#cpu "I486_CPU"
cpu "I586_CPU"
#cpu "I686_CPU"
ident mykernel
maxusers 25
options "CPU_FASTER_5X86_FPU" #Faster FPU exception handling
options "CPU_WT_ALLOC" #Enables CPU Write Through allocation
#options COMPAT_LINUX #linux compatibility, use LKM
options UCONSOLE #Allow users to take console
options INCLUDE_CONFIG_FILE #puts dis config in da' kernel
options USER_LDT #something for Wine
options SCSI_REPORT_GEOMETRY
options SCSIDEBUG
#options NO_SCSI_SENSE
options SYSVSHM
options SYSVSEM
options SYSVMSG
options SYSVPEX
options SYSVXIE
#options IPX #IPX proto support
options INET #InterNETworking
options FFS #Berkeley Fast Filesystem
options NFS #Network Filesystem
#options MSDOSFS #MSDOS Filesystem
options "CD9660" #ISO 9660 Filesystem
options PROCFS #Process filesystem
options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!]
options SCSI_DELAY=5 #Be pessimistic about Joe SCSI device
options BOUNCE_BUFFERS #include support for DMA bounce buffers
options "MAXMEM=(128*1024)"
options UCONSOLE #Allow users to grab the console
#options FAILSAFE #Be conservative
options USERCONFIG #boot -c editor
options VISUAL_USERCONFIG #visual boot -c editor
#options IPFIREWALL #add firewalling support
#options IPFIREWALL_VERBOSE #allow logging of packets
#options IPDIVERT #adds support for fw ip diversion
options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default
options "MD5" #MD5 support
options SHOW_BUSYBUFS #show buffers that prevent umounts
options "TUNE_1542"
options AHADEBUG
options GPL_MATH_EMULATE #something for Octave 2.0.12
options PPP_BSDCOMP #PPP BSD-compress support
options PPP_DEFLATE #PPP zlib/deflate/gzip support
options PPP_FILTER #enable bpf filtering (needs bpfilter)
options FDC_DEBUG
config kernel root on sd0
controller isa0
#controller eisa0
controller pci0
controller fdc0 at isa? port "IO_FD1" bio flags 0x1 irq 6 drq 2 vector fdintr
disk fd0 at fdc0 drive 0
#disk fd1 at fdc0 drive 1
#tape ft0 at fdc0 drive 2
#tape ft1 at fdc0 drive 2
#tape ft2 at fdc0 drive 3
controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xa0ffa0ff vector wdintr
disk wd0 at wdc0 drive 0
disk wd1 at wdc0 drive 1
controller wdc1 at isa? port "IO_WD2" bio irq 15 flags 0xa0ffa0ff vector wdintr
disk wd2 at wdc1 drive 0
disk wd3 at wdc1 drive 1
#controller wdc2 at isa? port "0x1E8" bio irq 11 flags 0xa0ffa0ff vector wdintr
options ATAPI #Enable ATAPI support for IDE bus
options ATAPI_STATIC #Don't do it as an LKM
#device wcd0 #IDE CD-ROM
controller snd0
device sb0 at isa? port 0x220 irq 7 conflicts drq 1 vector sbintr
#options SBC_IRQ=5
device opl0 at isa? port 0x388 conflicts
# SoundBlaster 16 DSP driver - for SB16 - requires sb0 device
device sbxvi0 at isa? drq 5
# SoundBlaster 16 MIDI - for SB16 - requires sb0 device
device sbmidi0 at isa? port 0x300
# A single entry for any of these controllers (ncr, ahb, ahc, amd) is
# sufficient for any number of installed devices.
#controller ncr0
#controller amd0
#controller ahb0
controller ahc0
#controller bt0 at isa? port "IO_BT0" bio irq ? vector bt_isa_intr
#controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 7 vector ahaintr
#controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
#controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
#controller nca1 at isa? port 0x350 bio irq 5 vector ncaintr
#controller sea0 at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr
controller scbus0 at ahc0
controller scbus1 at aha0
device worm0 at scbus? # SCSI worm
#disk sd0 at scbus1 target 5 unit 0
#disk sd0 at scbus0 target 0 unit 0
device sd0
device sd1
device od0 #See LINT for possible `od' options.
#device st0
device cd0 #Only need one of these, the code dynamically grows
#device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr
#device mcd0 at isa? port 0x300 bio irq 10 vector mcdintr
#controller matcd0 at isa? port 0x1E8 bio
#device scd0 at isa? port 0x230 bio
# enable tagged command queueing, which is a major performance win on
# devices that support it (and controllers with enough SCB's)
#
# Note that some drives claim to grok tagged commands, but actually
# don't. The HP C3725S is a known offender.
options AHC_TAGENABLE
# enable SCB paging - See the ahc.4 man page for usage warnings.
# (IOW: better don't use it by now.)
options AHC_SCBPAGING_ENABLE
# The aic7xxx driver will attempt to use memory mapped I/O for all PCI
# controllers that have it configured only if this option is set. Unfortunately,
# this doesn't work on some motherboards, which prevents it from being the
# default.
options AHC_ALLOW_MEMIO
# syscons is the default console driver, resembling an SCO console
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
# Enable this and PCVT_FREEBSD for pcvt vt220 compatible console driver
#device vt0 at isa? port "IO_KBD" tty irq 1 vector pcrint
options PCVT_FREEBSD=210 # pcvt running on FreeBSD >= 2.0.5
options XSERVER # include code for XFree86
options FAT_CURSOR # start with block cursor
# If you have a ThinkPAD, uncomment this along with the rest of the PCVT lines
#options PCVT_SCANSET=2 # IBM keyboards are non-std
# Mandatory, don't remove
device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
#
# Laptop support (see LINT for more options)
#
#device apm0 at isa? disable # Advanced Power Management
#options APM_BROKEN_STATCLOCK # Workaround some buggy APM BIOS
# PCCARD (PCMCIA) support
#controller crd0
#device pcic0 at crd?
#device pcic1 at crd?
device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr
#device sio3 at isa? port "IO_COM4" tty flags 0x1005 irq 3 vector siointr
device lpt0 at isa? port? tty
#device lpt1 at isa? port? tty
#device mse0 at isa? port 0x23c tty irq 5 vector mseintr
device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
# Order is important here due to intrusive probes, do *not* alphabetize
# this list of network interfaces until the probes have been fixed.
# Right now it appears that the ie0 must be probed before ep0. See
# revision 1.20 of this file.
device de0
#device fxp0
#device vx0
#device ed0 at pci? port 0xe001 net irq 12 vector edintr
#device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr
#device ie0 at isa? port 0x360 net irq 7 iomem 0xd0000 vector ieintr
#device ep0 at isa? port 0x300 net irq 10 vector epintr
#device ex0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector exintr
#device fe0 at isa? port 0x300 net irq ? vector feintr
#device ix0 at isa? port 0x300 net irq 10 iomem 0xd0000 iosiz 32768 vector ixintr
#device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr
#device lnc0 at isa? port 0x280 net irq 10 drq 0 vector lncintr
#device ze0 at isa? port 0x300 net irq 5 iomem 0xd8000 vector zeintr
#device zp0 at isa? port 0x300 net irq 10 iomem 0xd8000 vector zpintr
pseudo-device loop
pseudo-device ether
pseudo-device log
pseudo-device sl 1
# ijppp uses tun instead of ppp device
pseudo-device ppp 4
pseudo-device tun 4
pseudo-device pty 16
pseudo-device gzip # Exec gzipped a.out's
pseudo-device bpfilter 4
pseudo-device speaker
pseudo-device snp 8 #Snoop device - to look at pty/vty/etc
pseudo-device vn
pseudo-device ssc #super scsi
pseudo-device su
# KTRACE enables the system-call tracing facility ktrace(2).
# This adds 4 KB bloat to your kernel, and slightly increases
# the costs of each syscall.
options KTRACE #kernel tracing
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812301726290.221-200000>
