From koshy@india.hp.com  Wed Jul  9 23:42:01 1997
Received: from palrel3.hp.com (palrel3.hp.com [156.153.255.219])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA10146
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 9 Jul 1997 23:40:23 -0700 (PDT)
Received: from postbox.india.hp.com (postbox.india.hp.com [15.10.45.1])
	by palrel3.hp.com (8.8.5/8.8.5) with ESMTP id XAA24078
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 9 Jul 1997 23:40:14 -0700 (PDT)
Received: from localhost by postbox.india.hp.com with ESMTP
	(1.39.111.2/16.2) id AA118356762; Thu, 10 Jul 1997 12:09:22 +0530
Message-Id: <199707100640.XAA24078@palrel3.hp.com>
Date: Thu, 10 Jul 1997 12:09:22 +0530
From: koshy@india.hp.com
Sender: koshy@india.hp.com
Reply-To: koshy@india.hp.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Writing SCSI tape fails: DMA beyond end of ISA
X-Send-Pr-Version: 3.2

>Number:         4071
>Category:       kern
>Synopsis:       Accessing /dev/rst0 causes `DMA beyond end of ISA' errors
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul  9 23:50:02 PDT 1997
>Closed-Date:    Mon May 4 03:52:59 PDT 1998
>Last-Modified:  Mon May  4 03:53:22 PDT 1998
>Originator:     Joseph Koshy
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Hewlett-Packard ISO Bangalore
>Environment:

A 32MB machine running -current of July 1st week vintage.  An AHA1542CF
controller as the SCSI adapter, and a HP 2GB DAT drive.

    FreeBSD krill.india.hp.com 3.0-CURRENT FreeBSD 3.0-CURRENT #0:	\
    Tue Jul  8 10:36:25 IST 1997     					\
    root@krill.india.hp.com:/usr/src/sys/compile/KRILL  i386

>Description:

Accessing /dev/rst0 causes I/O's to abort with `DMA beyond end of ISA' errors.

    Jul 10 12:31:32 krill /kernel: aha0: DMA beyond end Of ISA: 0x1f86d08
    Jul 10 12:31:32 krill /kernel: st0: bad request, must be between 0 and 0

The kernel has BOUNCE_BUFFERS configured.  The problem was not present in 
-current kernels of April 1997 vintage.

Disk access to SD0 works OK (touch wood).

Kernel DMESG output:

    Copyright (c) 1992-1997 FreeBSD Inc.
    Copyright (c) 1982, 1986, 1989, 1991, 1993
	    The Regents of the University of California. All rights reserved.
    FreeBSD 3.0-CURRENT #0: Tue Jul  8 10:36:25 IST 1997
	root@krill.india.hp.com:/usr/src/sys/compile/KRILL
    CPU: Pentium (90.00-MHz 586-class CPU)
      Origin = "GenuineIntel"  Id = 0x525  Stepping=5
      Features=0x1bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
    real memory  = 33554432 (32768K bytes)
    avail memory = 30396416 (29684K bytes)
    Probing for devices on PCI bus 0:
    chip0: <Host to PCI bridge (vendor=1004 device=0005)> rev 0x01 on pci0.0.0
    chip1: <PCI to ISA bridge (vendor=1004 device=0006)> rev 0x01 on pci0.1.0
    vga0: <VGA-compatible display device> rev 0x2d int a irq 9 on pci0.5.0
    Probing for devices on the ISA bus:
    sc0 at 0x60-0x6f irq 1 on motherboard
    sc0: VGA color <16 virtual consoles, flags=0x0>
    ed0 at 0x300-0x31f irq 15 on isa
    ed0: address 08:00:09:d9:d3:f9, type HP-PCLAN+ (32-bit regular IO)
    sio0 at 0x3f8-0x3ff irq 4 on isa
    sio0: type 16550A
    sio1 at 0x2f8-0x2ff irq 3 on isa
    sio1: type 16550A
    psm0 at 0x60-0x64 irq 12 on motherboard
    psm0: device ID 0
    fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa
    fdc0: NEC 72065B
    fd0: 1.44MB 3.5in
    wdc0 at 0x1f0-0x1f7 irq 14 on isa
    wdc0: unit 0 (wd0): <QUANTUM MAVERICK 540A>
    wd0: 516MB (1057392 sectors), 1049 cyls, 16 heads, 63 S/T, 512 B/S
    aha0 at 0x330-0x333 irq 11 drq 5 on isa
    scbus0 at aha0 bus 0
    st0 at scbus0 target 3 lun 0
    st0: <HP HP35480A 1109> type 1 removable SCSI 2
    st0: Sequential-Access density code 0x13,  drive empty
    sd0 at scbus0 target 4 lun 0
    sd0: <SEAGATE ST32151N HP01> type 0 fixed SCSI 2
    sd0: Direct-Access 2048MB (4194685 512 byte sectors)
    npx0 on motherboard
    npx0: INT 16 interface

And these are some error messages:

    aha0: DMA beyond end Of ISA: 0x194fd08
    st0: bad request, must be between 0 and 0
    aha0: DMA beyond end Of ISA: 0x12d0d08
    st0: bad request, must be between 0 and 0
    aha0: DMA beyond end Of ISA: 0x1f86d08
    st0: bad request, must be between 0 and 0

>How-To-Repeat:

Build a -current kernel with an AHA adapter (other ISA SCSI controllers should
be ok too) and try to access the tape drive.  The machine should have >16MB 
memory.

>Fix:

No workaround/fix known, sorry.


>Release-Note:
>Audit-Trail:

From: Peter Wemm <peter@spinner.dialix.com.au>
To: koshy@india.hp.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4071: Writing SCSI tape fails: DMA beyond end of ISA 
Date: Thu, 10 Jul 1997 15:27:29 +0800

 koshy@india.hp.com wrote:
 > 
 >     Jul 10 12:31:32 krill /kernel: aha0: DMA beyond end Of ISA: 0x1f86d08
 >     Jul 10 12:31:32 krill /kernel: st0: bad request, must be between 0 and 0
 > 
 > The kernel has BOUNCE_BUFFERS configured.  The problem was not present in 
 > -current kernels of April 1997 vintage.
 > 
 > Disk access to SD0 works OK (touch wood).
 
 It happens for me too on an old machine, but the only active scsi devices
 are sd0 and sd1.
 
 aha0 at 0x330-0x333 irq 11 drq 7 on isa
 aha0: waiting for scsi devices to settle
 scbus0 at aha0 bus 0
 sd0 at scbus0 target 0 lun 0
 sd0: <QUANTUM MAVERICK 540S 0901> type 0 fixed SCSI 2
 sd0: Direct-Access 516MB (1057758 512 byte sectors)
 sd0: with 2853 cyls, 4 heads, and an average 92 sectors/track
 sd1 at scbus0 target 1 lun 0
 sd1: <QUANTUM FIREBALL_TM2110S 300X> type 0 fixed SCSI 2
 sd1: Direct-Access 2014MB (4124736 512 byte sectors)
 sd1: with 6810 cyls, 4 heads, and an average 151 sectors/track
 cd0 at scbus0 target 2 lun 0
 cd0: <NEC CD-ROM DRIVE:55 1.0> type 5 removable SCSI 1
 cd0: CD-ROM cd present [132125 x 2048 byte records]
 st0 at scbus0 target 4 lun 0
 st0: <ARCHIVE VIPER 2525 25462 -007> type 1 removable SCSI 1
 st0: Sequential-Access density code 0x0,  drive empty
 npx0 on motherboard
 npx0: INT 16 interface
 aha0: DMA beyond end Of ISA: 0x1eafd14
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 It happens once only, I wonder if this is st0 checking for status or 
 something?
 
 
 Cheers,
 -Peter
 
State-Changed-From-To: open->analyzed 
State-Changed-By: phk 
State-Changed-When: Wed Apr 15 10:40:27 PDT 1998 
State-Changed-Why:  
BOUNCEBUFFERS are broken because of the sneaky way they were used in the 
scsi system.  Expected fixed with the introduction of CAM. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: phk 
State-Changed-When: Mon May 4 03:52:59 PDT 1998 
State-Changed-Why:  
fixed recently by Peter. 
>Unformatted:
