From: badari <pbadari@us.ibm.com>
To: Berkley Shands <berkley@cs.wustl.edu>
Cc: gibbs@scsiguy.com, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps
Date: Wed, 07 Jan 2004 11:19:46 -0800 [thread overview]
Message-ID: <3FFC5BD2.F995A824@us.ibm.com> (raw)
In-Reply-To: 200401071535.i07FZIX0000020986@mudpuddle.cs.wustl.edu
Hi,
Andi Kleen reworked pci-gart code.
Would you try Andi's x86-64 patch and see if the problems still exist ?
ftp://ftp.x86-64.org/pub/linux/v2.6/x86_64-2.6.1rc2-1.bz2
And also, Can you try with "iommu=noforce,nomerge" ?
Fixing the sg-list in the upperlayer (by re-creating) it in case of retry
worked for me. I am still not sure why you are running into "len==0"
panics.
Thanks,
Badari
Berkley Shands wrote:
> Running with the force segment merge OFF panics the processor after
> about 1000 scsi retries. the error given, also in pci-gart.c, is
> pci_map_area overflow 4096 bytes
> So a brain dead repair kills the kernel. Someone clearly needs to figure
> out where to correct the merge of the sg lists. A bit of doc on the iommu
> and the 4096 byte limit would be nice too :-)
>
> I see that is is the aborting of an SCB that causes the sg list halt.
>
> Jan 7 09:18:32 typhoon kernel: DevQ(0:6:0): 0 waiting
> Jan 7 09:18:32 typhoon kernel: (scsi0:A:2:0): SCB 0x46 - timed out
> Jan 7 09:18:32 typhoon kernel: Recovery SCB completes
> Jan 7 09:18:32 typhoon kernel: scsi0: Issued Channel A Bus Reset. 3 SCBs aborted
> Jan 7 09:18:46 typhoon kernel: Did it again, boss 0000:01:03.0
>
> Since the sg list merges into one i/o list, simply adding s->length = 4096
> back into the list seems to keep the kernel up. a better if slightly less
> stupid fix is to add up the remaining sg list lengths, and ajust
> the sg[0] entry to sum to the correct value.
>
> /* BUG_ON(s->length == 0); */
> if (! s->length)
> {
> unsigned long zero = sg[0].length;
> unsigned long remain = 0;
> int t = 0;
>
> BUG_ON(i != 1); /* some other error here */
>
> for (t = i + 1; t < nents; t++)
> remain += sg[t].length; /* collect remaining sizes */
> zero -= remain; /* deduct what is left on the list */
> sg[0].length = zero / 2;
> sg[1].length = zero / 2; /* allocate uniformly */
> size = zero / 2; /* reduce oversize first entry */
> printk(KERN_WARNING "Did it again, boss %s\n", dev->slot_name);
> }
>
> The better solution is to have the upper layer fix the sg list, or
> have some marker that the list was diddled, and save the old entries
> to put it back.
>
> berkley
next prev parent reply other threads:[~2004-01-07 19:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 15:35 [BUG] x86_64 pci_map_sg modifies sg list - fails multiple map/unmaps Berkley Shands
2004-01-07 19:19 ` badari [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-07 16:33 Berkley Shands
[not found] <200401051929.i05JTsM0000014248@mudpuddle.cs.wustl.edu.suse.lists.linux.kernel>
[not found] ` <20040105112800.7a9f240b.davem@redhat.com.suse.lists.linux.kernel>
2004-01-05 21:02 ` Andi Kleen
2004-01-05 21:01 ` David S. Miller
2004-01-05 21:31 ` Andi Kleen
2004-01-06 0:05 ` James Bottomley
2004-01-06 3:06 ` Andi Kleen
2004-01-06 3:04 ` David S. Miller
2004-01-06 3:14 ` James Bottomley
[not found] <2938942704.1073325455@aslan.btc.adaptec.com.suse.lists.linux.kernel>
[not found] ` <m3brpi41q0.fsf@averell.firstfloor.org.suse.lists.linux.kernel>
[not found] ` <2997092704.1073333041@aslan.btc.adaptec.com.suse.lists.linux.kernel>
2004-01-05 20:58 ` Andi Kleen
2004-01-05 20:00 Berkley Shands
2004-01-05 19:29 Berkley Shands
2004-01-05 19:28 ` David S. Miller
2004-01-05 17:57 Justin T. Gibbs
2004-01-05 19:22 ` David S. Miller
2004-01-05 19:41 ` Badari Pulavarty
2004-01-05 19:47 ` Andi Kleen
2004-01-05 20:04 ` Justin T. Gibbs
2004-01-05 20:35 ` David S. Miller
2004-01-05 21:10 ` Andi Kleen
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=3FFC5BD2.F995A824@us.ibm.com \
--to=pbadari@us.ibm.com \
--cc=berkley@cs.wustl.edu \
--cc=gibbs@scsiguy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/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