From: rubisher <rubisher@scarlet.be>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Subject: iommu_fill_pdir() and its /* Horrible hack. ... */ reading.
Date: Wed, 26 Dec 2007 17:31:51 +0000 [thread overview]
Message-ID: <47729007.8030807@scarlet.be> (raw)
In-Reply-To: <20071224085159.GC15161@colo.lackof.org>
Grant Grundler wrote:
> On Sun, Dec 23, 2007 at 10:50:34PM +0000, rubisher wrote:
> ...
>> btw do you notice how much way are there (in so few lines) to use a
>> unsigned 32bits integer: u32, __u32 but also uint32_t, u_int32_t, ...
>>
>> Is there some advise om the best pratice?
>
> IIRC, Preferred is "u32". But use whatever is consistent with the
> file you are editing.
>
>> Ah also related to ccio-dma patch test on my c110, it seems that removing
>> DELAYED_RESOURCE_CNT code help a bit this system with few ram (64Mb only)
>> to survive a bit longer (enough to debootstrap and download 800Mb to be
>> installed) but that didn't make the drill: there are still fs corruption
>> from time to time and some reset on the lasi disk ;-(.
>> This test just seems to confirm an issue of i/o coherency somewhere but
>> where those rules could be broken???
>
> ISTR Joel Soete reporting problems for CCIO machines as well.
> Offhand, I don't know what's wrong and we depend on Ryan Bradetich
> and other volunteers to track that down.
>
> cheers,
> grant
>
>> Merry Xmas,
>> r.
>> -
Hello Grant,
I suspecting a possible issue with this hack in your iommu_fill_pdir():
you initialized dma_sg with the adress of startsg (/* pointer to current DMA */)
then before the loop you dma_sg--;
(where and what dms_sg point to, I guess we have any idea?)
Now in the while (nents-- > 0), suppose the test "if (sg_dma_address(startsg) & PIDE_FLAG) {" failed,
so later in the loop the "sg_dma_len(dma_sg) += startsg->length" (which is actually "dma_sg->iova_length += startsg->length"
) imo could corrupt something?
That said I tried to re-use the first implementation of jejb (what was in ccio-dma.c before this patch
<http://cvs.parisc-linux.org/linux-2.6/drivers/parisc/ccio-dma.c?r1=1.12&r2=1.13> but that doesn't seems to fix the ccio-dma
issue at all: I can still read those kind of message at the console while doing such copy
[snip]
scsi1: (4:0) phase mismatch at 01e8, phase IO CD MSG BSY REQ MSG IN
scsi1: Bus Reset detected, executing command 10953600, slot 109708a4, dsp 001301e8[01e8]
failing command because of reset, slot 10970778, cmnd 12644a00
failing command because of reset, slot 109708a4, cmnd 10953600
scsi1: (4:0) phase mismatch at 01e8, phase IO CD MSG BSY REQ MSG IN
scsi1: Bus Reset detected, executing command 12644c40, slot 10970520, dsp 001301e8[01e8]
failing command because of reset, slot 10970520, cmnd 12644c40
scsi1: (4:0) phase mismatch at 01e8, phase IO CD MSG BSY REQ MSG IN
scsi1: Bus Reset detected, executing command 109532a0, slot 1097064c, dsp 001301e8[01e8]
failing command because of reset, slot 1097064c, cmnd 109532a0
end_request: I/O error, dev sdc, sector 197250
[snip]
while doing such copy:
root@hpalin:/boot# find . | cpio -mpduv /mnt/OldPA/boot/.
/mnt/OldPA/boot/././vmlinux-cp
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p2
/mnt/OldPA/boot/././vmlinux-cp13
/mnt/OldPA/boot/././vmlinux-2.6.23-c110
/mnt/OldPA/boot/././vmlinux-cp6
/mnt/OldPA/boot/././config-2.6.23-pa-b180
/mnt/OldPA/boot/././vmlinux-cp9
/mnt/OldPA/boot/././lost+found
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p4
/mnt/OldPA/boot/././vmlinux-2.6.22-3-parisc
/mnt/OldPA/boot/././config-2.6.23-c110-p15
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p5
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p15
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p10
/mnt/OldPA/boot/././System.map-2.6.22-3-parisc
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p13
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p6
/mnt/OldPA/boot/././config-2.6.22-3-parisc
/mnt/OldPA/boot/././vmlinux-cp14
/mnt/OldPA/boot/././initrd.img-2.6.22-3-parisc
/mnt/OldPA/boot/././vmlinux-2.4.17-32
/mnt/OldPA/boot/././vmlinux-cp11
/mnt/OldPA/boot/././vmlinux-cp10
/mnt/OldPA/boot/././vmlinux-cp5
/mnt/OldPA/boot/././vmlinux-cp15
/mnt/OldPA/boot/././System.map-2.4.17-32
/mnt/OldPA/boot/././config-2.6.23-c110-p2
/mnt/OldPA/boot/././vmlinux-2.6.23-pa-b180
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p14
/mnt/OldPA/boot/././vmlinux-cp4
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p
/mnt/OldPA/boot/././config-2.4.17-32
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p9
/mnt/OldPA/boot/././vmlinux
/mnt/OldPA/boot/././vmlinux-2.6.23-c110-p11
/mnt/OldPA/boot/././vmlinux-t
/mnt/OldPA/boot/././vmlinux-co
138420 blocks
(the scsi1 is the lasi scsi hba as sources and the target being the disks on ncr53c720 hba)
or experimenting fs issues on this target disks?
That said ok I will wait either U2/Uturn ers public doc or all volonteers feedback.
Cheers,
r.
next prev parent reply other threads:[~2007-12-26 17:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-22 12:15 dma_addr_t: which comment is correct? rubisher
2007-12-23 9:39 ` Grant Grundler
2007-12-23 22:50 ` rubisher
2007-12-24 8:51 ` Grant Grundler
2007-12-26 10:01 ` Thibaut VARENE
2007-12-26 17:31 ` rubisher [this message]
2007-12-28 8:27 ` iommu_fill_pdir() and its /* Horrible hack. ... */ reading Grant Grundler
2007-12-28 15:27 ` rubisher
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=47729007.8030807@scarlet.be \
--to=rubisher@scarlet.be \
--cc=grundler@parisc-linux.org \
--cc=linux-parisc@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