Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000
@ 2003-12-10  8:53 Helge Kreutzmann
  2003-12-11 16:54 ` Jay Estabrook
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 2003-12-10  8:53 UTC (permalink / raw)
  To: AXP-Liste; +Cc: Tim Meyer

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

Hello,
since we had a spare SCSI disk lying around (and I have no idea where
I should get the appropriate containers for the nice drive bays the
rawhide has) we added another SCSI adapter to our SMP rawhide. An
external MO drive works fine, but during access of the attaced drive we
see lots of

kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000

The controller is an "Adaptec AHA-2940U2/W". The relevant code is in
arch/alpha/kernel/pci_iommu.c
and looks like:
        if (dma_ofs * PAGE_SIZE >= arena->size) {
                printk(KERN_ERR "Bogus pci_unmap_single: dma_addr %lx "
                       " base %lx size %x\n", dma_addr, arena->dma_base,
                       arena->size);
                return;
                BUG();
        }
(this is 2.4.21). This looks like a know BUG(). Is this harmless or is
there a workaround available?

Thanks

        Helge
-- 
Helge Kreutzmann, Dipl.-Phys.               Helge.Kreutzmann@itp.uni-hannover.de
  gpg signed mail preferred    gpg-key: finger kreutzm@rigel.itp.uni-hannover.de
    64bit GNU powered                  http://www.itp.uni-hannover.de/~kreutzm
       Help keep free software "libre": http://www.freepatents.org/

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000
  2003-12-10  8:53 kernel: Bogus pci_unmap_single: dma_addr 0 base 800000 size 800000 Helge Kreutzmann
@ 2003-12-11 16:54 ` Jay Estabrook
  2003-12-11 17:44   ` Helge Kreutzmann
  0 siblings, 1 reply; 4+ messages in thread
From: Jay Estabrook @ 2003-12-11 16:54 UTC (permalink / raw)
  To: AXP-Liste, Tim Meyer

On Wed, Dec 10, 2003 at 09:53:34AM +0100, Helge Kreutzmann wrote:
> 
> since we had a spare SCSI disk lying around (and I have no idea where
> I should get the appropriate containers for the nice drive bays the
> rawhide has) we added another SCSI adapter to our SMP rawhide. An
> external MO drive works fine, but during access of the attaced drive we
> see lots of
> 
> kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000
> 
> The controller is an "Adaptec AHA-2940U2/W". The relevant code is in
> arch/alpha/kernel/pci_iommu.c
> and looks like:
>         if (dma_ofs * PAGE_SIZE >= arena->size) {
>                 printk(KERN_ERR "Bogus pci_unmap_single: dma_addr %lx "
>                        " base %lx size %x\n", dma_addr, arena->dma_base,
>                        arena->size);
>                 return;
>                 BUG();
>         }
> (this is 2.4.21). This looks like a know BUG(). Is this harmless or is
> there a workaround available?

It *may* be harmless, in the case where direct-map was used for DMA.

The "dma_addr" passed in (0 in this case) is not a valid address for
either direct-map or scatter-gather-map DMA, and indicates something
may have gone wrong in the driver.

But, this doesn't explain why the MO drive worked and the HDD doesn't...

If your RAWHIDE has more than 2GB of memory, then it most likely WILL
be a problem at some point.

So, what Adaptec driver was used, and what did it report for the chipset?

 --Jay++

-----------------------------------------------------------------------------
Jay A Estabrook                            HPTC - LINUX support
Hewlett-Packard Company - MRO1-2/K15       (508) 467-2080
200 Forest Street, Marlboro MA 01752       Jay.Estabrook@hp.com
-----------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000
  2003-12-11 16:54 ` Jay Estabrook
@ 2003-12-11 17:44   ` Helge Kreutzmann
  2003-12-11 19:40     ` Jay Estabrook
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 2003-12-11 17:44 UTC (permalink / raw)
  To: Jay Estabrook, AXP-Liste, Tim Meyer

[-- Attachment #1: Type: text/plain, Size: 6008 bytes --]

Hello Jay,
On Thu, Dec 11, 2003 at 11:54:38AM -0500, Jay Estabrook wrote:
> The "dma_addr" passed in (0 in this case) is not a valid address for
> either direct-map or scatter-gather-map DMA, and indicates something
> may have gone wrong in the driver.
> 
> But, this doesn't explain why the MO drive worked and the HDD doesn't...

Well, the HDD seems to work so far (we copied some data on and off),
just that access fills the logs with this warning. Maybe DMA is not
used for external/"optical" drives?

> If your RAWHIDE has more than 2GB of memory, then it most likely WILL
> be a problem at some point.

No, we are below 1 GB and I don't think it will be ever upgraded.

> So, what Adaptec driver was used, and what did it report for the chipset?

CONFIG_SCSI_AIC7XXX_OLD=y
CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8

and it reports during bootup:
Dec  6 12:37:55 suker kernel: SCSI subsystem driver Revision: 1.00
Dec  6 12:37:55 suker kernel: (scsi0) <Adaptec AHA-294X Ultra2 SCSI host adapter> found at PCI 1/4/0
Dec  6 12:37:55 suker kernel: (scsi0) Wide Channel, SCSI ID=7, 32/255 SCBs
Dec  6 12:37:55 suker kernel: (scsi0) Downloading sequencer code...  398 instructions downloaded
Dec  6 12:37:55 suker kernel: scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.4/5.2.0
Dec  6 12:37:55 suker kernel:        <Adaptec AHA-294X Ultra2 SCSI host adapter>
Dec  6 12:37:55 suker kernel: blk: queue fffffc000022d0d0, no I/O memory limit
Dec  6 12:37:55 suker kernel:   Vendor: IBM       Model: DDYS-T09170N Rev: S80D
Dec  6 12:37:55 suker kernel:   Type:   Direct-Access ANSI SCSI revision: 03
Dec  6 12:37:55 suker kernel: blk: queue fffffc000022ced0, no I/O memory limit

<snip>

Dec  6 12:37:55 suker kernel: Attached scsi disk sda at scsi0, channel 0, id 5, lun 0

<snip>

Dec  6 12:37:55 suker kernel: sda: Spinning up disk..............ready
Dec  6 12:37:55 suker kernel: SCSI device sda: 17916240 512-byte hdwr sectors (9173 MB)
Dec  6 12:37:55 suker kernel: Partition check:
Dec  6 12:37:55 suker kernel:  sda: sda1

Inbetween the other SCSI adapters and drives are detected.  (The
external MO drive is usually turned off, I activated and deactiviated
it by using some front end to the /proc/scsi interface)

Scanning the bus after switching on the MO drive yields:
Dec 11 18:40:00 suker kernel: scsi singledevice 0 0 0 0
Dec 11 18:40:00 suker kernel: blk: queue fffffc0021a47ad0, no I/O memory limit
Dec 11 18:40:00 suker kernel: scsi singledevice 0 0 1 0
Dec 11 18:40:00 suker kernel: scsi singledevice 0 0 2 0
Dec 11 18:40:00 suker kernel: scsi singledevice 0 0 3 0
Dec 11 18:40:00 suker kernel: scsi singledevice 0 0 4 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 5 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 6 0
Dec 11 18:40:01 suker kernel: blk: queue fffffc00082715f0, no I/O memory limit
Dec 11 18:40:01 suker kernel:   Vendor: FUJITSU   Model: M2512A Rev: 1408
Dec 11 18:40:01 suker kernel:   Type:   Optical Device ANSI SCSI revision: 02
Dec 11 18:40:01 suker kernel: blk: queue fffffc0008271df0, no I/O memory limit
Dec 11 18:40:01 suker kernel: Attached scsi removable disk sdc at scsi0, channel 0, id 6, lun 0
Dec 11 18:40:01 suker kernel: SCSI device sdc: 446325 512-byte hdwr sectors (229 MB)
Dec 11 18:40:01 suker kernel: sdc: Write Protect is off
Dec 11 18:40:01 suker kernel:  sdc: unknown partition table
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 7 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 8 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 9 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 10 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 11 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 12 0
Dec 11 18:40:01 suker kernel: scsi singledevice 0 0 13 0
Dec 11 18:40:02 suker kernel: scsi singledevice 0 0 14 0
Dec 11 18:40:02 suker kernel: scsi singledevice 0 0 15 0

The chipset is reported according to /proc as:
uker:/var/log# cat /proc/scsi/aic7xxx/0 
Adaptec AIC7xxx driver version: 5.2.4/5.2.0
Compile Options:
  TCQ Enabled By Default : Disabled
  AIC7XXX_PROC_STATS     : Disabled

Adapter Configuration:
           SCSI Adapter: Adaptec AHA-294X Ultra2 SCSI host adapter
                           Ultra-2 LVD/SE Wide Controller at PCI 1/4/0
    Programmed I/O Base: 200008800
 Adapter SEEPROM Config: SEEPROM found and used.
      Adaptec SCSI BIOS: Enabled
                    IRQ: 48
                   SCBs: Active 0, Max Active 2,
                         Allocated 31, HW 32, Page 255
             Interrupts: 77385
      BIOS Control Word: 0x18a6
   Adapter Control Word: 0x1c5c
   Extended Translation: Enabled
Disconnect Enable Flags: 0xffff
     Ultra Enable Flags: 0x0000
 Tag Queue Enable Flags: 0x0000
Ordered Queue Tag Flags: 0x0000
Default Tag Queue Depth: 8
    Tagged Queue By Device array for aic7xxx host instance 0:
      {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255}
    Actual queue depth per device for aic7xxx host instance 0:
      {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}

Statistics:

(scsi0:0:5:0)
  Device using Wide/Sync transfers at 40.0 MByte/sec, offset 63
  Transinfo settings: current(12/63/1/0), goal(10/127/1/0), user(10/127/1/0)
  Total transfers 75234 (46362 reads and 28872 writes)


(scsi0:0:6:0)
  Device using Narrow/Sync transfers at 5.0 MByte/sec, offset 8
  Transinfo settings: current(50/8/0/0), goal(10/127/0/0), user(10/127/1/0)
  Total transfers 2011 (2002 reads and 9 writes)


Is there any check you'd recommend before using the drive attached to
this adapter?

Thanks!

       Helge
-- 
Helge Kreutzmann, Dipl.-Phys.               Helge.Kreutzmann@itp.uni-hannover.de
  gpg signed mail preferred    gpg-key: finger kreutzm@rigel.itp.uni-hannover.de
    64bit GNU powered                  http://www.itp.uni-hannover.de/~kreutzm
       Help keep free software "libre": http://www.freepatents.org/

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: kernel: Bogus pci_unmap_single: dma_addr 0  base 800000 size 800000
  2003-12-11 17:44   ` Helge Kreutzmann
@ 2003-12-11 19:40     ` Jay Estabrook
  0 siblings, 0 replies; 4+ messages in thread
From: Jay Estabrook @ 2003-12-11 19:40 UTC (permalink / raw)
  To: AXP-Liste, Tim Meyer

On Thu, Dec 11, 2003 at 06:44:10PM +0100, Helge Kreutzmann wrote:
> On Thu, Dec 11, 2003 at 11:54:38AM -0500, Jay Estabrook wrote:
> > The "dma_addr" passed in (0 in this case) is not a valid address for
> > either direct-map or scatter-gather-map DMA, and indicates something
> > may have gone wrong in the driver.
> > 
> > But, this doesn't explain why the MO drive worked and the HDD doesn't...
> 
> Well, the HDD seems to work so far (we copied some data on and off),
> just that access fills the logs with this warning. Maybe DMA is not
> used for external/"optical" drives?

That'd be very odd, as DMA must be used for all SCSIs, IIRC.

> No, we are below 1 GB and I don't think it will be ever upgraded.

So, direct-map DMA is all that will be used, which means that the error
message is probably benign, but we should try to understand WHY it occurs
anyway...

> CONFIG_SCSI_AIC7XXX_OLD=y
> CONFIG_AIC7XXX_OLD_CMDS_PER_DEVICE=8

Ah, the old one; have you tried the new one? Could you?

> The chipset is reported according to /proc as:
> uker:/var/log# cat /proc/scsi/aic7xxx/0 
> Adaptec AIC7xxx driver version: 5.2.4/5.2.0
> Compile Options:
>   TCQ Enabled By Default : Disabled
>   AIC7XXX_PROC_STATS     : Disabled
> 
> Adapter Configuration:
>            SCSI Adapter: Adaptec AHA-294X Ultra2 SCSI host adapter
>                            Ultra-2 LVD/SE Wide Controller at PCI 1/4/0
>     Programmed I/O Base: 200008800

AHA! This address, IIRC, means that the card is on the SECOND PCI bus;
this sometimes can "expose" driver problems that don't show up when it
is on the first PCI bus.

Any chance you could try it on the FIRST PCI bus to see?

> Is there any check you'd recommend before using the drive attached to
> this adapter?

Well, I'd prefer those messages to go away, so...

1. try the card on the FIRST PCI bus instead of the SECOND.
2. try the newer AIC7xxx driver.

The FIRST PCI bus is made up of the 4 slots with the  3 EISA slots
in between them (from the docs I can see).

Good luck!

 --Jay++

-----------------------------------------------------------------------------
Jay A Estabrook                            HPTC - LINUX support
Hewlett-Packard Company - MRO1-2/K15       (508) 467-2080
200 Forest Street, Marlboro MA 01752       Jay.Estabrook@hp.com
-----------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-11 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10  8:53 kernel: Bogus pci_unmap_single: dma_addr 0 base 800000 size 800000 Helge Kreutzmann
2003-12-11 16:54 ` Jay Estabrook
2003-12-11 17:44   ` Helge Kreutzmann
2003-12-11 19:40     ` Jay Estabrook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox