Date: Tue, 03 Jun 2008 13:53:39 +0400 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: cvs-src@FreeBSD.org, =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= <sos@FreeBSD.org> Subject: Re: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-chipset.c ata-disk.c ata-dma.c ata-lowlevel.c ata-pci.c ata-queue.c ata-raid.c atapi-cam.c atapi-cd.c atapi-fd.c atapi-tape.c Message-ID: <484514A3.5060501@yandex.ru> In-Reply-To: <20080417195338.257a1df2@fabiankeil.de> References: <200804171229.m3HCTaG4089203@repoman.freebsd.org> <20080417195338.257a1df2@fabiankeil.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------070800040204070509070903 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Fabian Keil wrote: > With this commit, I'm getting a page fault in bus_dmamap_load() > reached through ata_dmaload(), right after ad1 is detected: > http://www.fabiankeil.de/tmp/freebsd/ata-bus-dmamap-load-page-fault-600x383.jpg > http://www.fabiankeil.de/tmp/freebsd/ata-bus-dmamap-load-page-fault-where-600x440.jpg I'm writing AHCI-capable driver which based on ata(4) and I have the same problem. Problem was introduced with this commit. AHCI driver is trying use DMA without ata_dmaalloc call. Problem fixed for me with attached patch. -- WBR, Andrey V. Elsukov --------------070800040204070509070903 Content-Type: text/plain; name="ata-pci.c.diff.txt" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="ata-pci.c.diff.txt" LS0tIGF0YS5vcmlnL2F0YS1wY2kuYwkyMDA4LTA2LTAzIDEzOjE3OjU5LjAwMDAwMDAwMCAr MDQwMAorKysgYXRhL2F0YS1wY2kuYwkyMDA4LTA2LTAzIDEzOjMzOjM2LjAwMDAwMDAwMCAr MDQwMApAQCAtNjE3LDE0ICs2MjIsMTYgQEAgYXRhX3BjaWNoYW5uZWxfYXR0YWNoKGRldmlj ZV90IGRldikKICAgICBpZiAoY3Rsci0+ZG1haW5pdCkKIAljdGxyLT5kbWFpbml0KGRldik7 CiAKLSAgICBpZiAoKGVycm9yID0gY3Rsci0+YWxsb2NhdGUoZGV2KSkpCi0JcmV0dXJuIGVy cm9yOworICAgIGlmIChjaC0+ZG1hLmFsbG9jKQorCWNoLT5kbWEuYWxsb2MoZGV2KTsKIAot ICAgIGlmICgoZXJyb3IgPSBhdGFfYXR0YWNoKGRldikpKQorICAgIGlmICgoZXJyb3IgPSBj dGxyLT5hbGxvY2F0ZShkZXYpKSkgeworCWlmIChjaC0+ZG1hLmZyZWUpCisJICAgIGNoLT5k bWEuZnJlZShkZXYpOwogCXJldHVybiBlcnJvcjsKKyAgICB9CiAKLSAgICBjaC0+ZG1hLmFs bG9jKGRldik7Ci0gICAgcmV0dXJuIDA7CisgICAgcmV0dXJuIGF0YV9hdHRhY2goZGV2KTsK IH0KIAogc3RhdGljIGludAo= --------------070800040204070509070903--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?484514A3.5060501>