From: Jens Axboe <axboe@suse.de>
To: Marco Berizzi <pupilla@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel Panic: too few segs for DMA mapping increase AHC_NSEG
Date: Mon, 19 Nov 2001 10:44:11 +0100 [thread overview]
Message-ID: <20011119104411.U11826@suse.de> (raw)
In-Reply-To: <LAW2-OE70z82buW5RNB000007e5@hotmail.com>
In-Reply-To: <LAW2-OE70z82buW5RNB000007e5@hotmail.com>
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
On Mon, Nov 19 2001, Marco Berizzi wrote:
> Hi everybody.
>
> I have just upgraded my PC from 768MB RAM to 1GB.
> I have recompiled the kernel (2.4.14) for hi mem support (4GB).
>
> Now it's appening a very strange behaviour.
> I have several file system on the same disk (vfat file system). I have
> compiled vfat driver as a module. So before try to mount I must issue a
> 'modprobe vfat'. I'm using Slackware 8.0. modutils version is 2.4.6
>
> Then if I try to copy a file from that filesystem to the root filesystem
> I get this error:
>
> Kernel panic: too few segs for DMA mappings increase AHC_NSEG
Aha! Finally someone that can provoke this easily. Could you please
apply attached patch and reproduce? Thanks.
--
Jens Axboe
[-- Attachment #2: aic7xxx-nsegs-1 --]
[-- Type: text/plain, Size: 1060 bytes --]
--- drivers/scsi/aic7xxx/aic7xxx_linux.c~ Mon Nov 19 10:36:12 2001
+++ drivers/scsi/aic7xxx/aic7xxx_linux.c Mon Nov 19 10:43:26 2001
@@ -624,9 +624,10 @@
{
int consumed;
- if ((scb->sg_count + 1) > AHC_NSEG)
- panic("Too few segs for dma mapping. "
- "Increase AHC_NSEG\n");
+ if ((scb->sg_count + 1) > AHC_NSEG) {
+ printk("Too few segs for dma mapping. Increase AHC_NSEG\n");
+ return -1;
+ }
consumed = 1;
sg->addr = ahc_htole32(addr & 0xFFFFFFFF);
@@ -1674,6 +1675,13 @@
len = sg_dma_len(cur_seg);
consumed = ahc_linux_map_seg(ahc, scb,
sg, addr, len);
+ if (consumed == -1) {
+ printk("aic7xxx: scsi segs %d,
+ pci segs %d, aic segs %d\n",
+ cmd->use_sg, nseg,
+ scb->sg_count);
+ BUG();
+ }
sg += consumed;
scb->sg_count += consumed;
cur_seg++;
@@ -1705,6 +1713,8 @@
scb->sg_count = ahc_linux_map_seg(ahc, scb,
sg, addr,
cmd->request_bufflen);
+ if (scb->sg_count == -1)
+ BUG();
sg->len |= ahc_htole32(AHC_DMA_LAST_SEG);
/*
next prev parent reply other threads:[~2001-11-19 9:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-19 8:23 Kernel Panic: too few segs for DMA mapping increase AHC_NSEG Marco Berizzi
2001-11-19 9:44 ` Jens Axboe [this message]
2001-11-21 7:46 ` Marco Berizzi
-- strict thread matches above, loose matches on Subject: below --
2001-11-23 21:26 Marco Berizzi
2001-11-24 15:18 Marco Berizzi
2001-11-27 8:02 Marco Berizzi
2001-11-27 8:11 ` Jens Axboe
2001-11-27 19:59 ` Marco Berizzi
[not found] <200112130644.fBD6ibI83062@saturn.cs.uml.edu>
2001-12-13 8:07 ` Marco Berizzi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011119104411.U11826@suse.de \
--to=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pupilla@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox