bug#105: [kernel] bug#105: ccio_dma kernel panic


None


X-PA-RISC Linux-PR-Message: report 105
X-PA-RISC Linux-PR-Package: kernel
X-Loop: daniel_frazier@hp.com
Received: via spool by 105-bugs@bugs.parisc-linux.org id=B105.98720143021643
          (code B ref 105); Fri, 13 Apr 2001 22:48:01 GMT
Message-Id: <200104132230.QAA09407@puffin.external.hp.com>
To: Matt Taggart <taggart@carmen.fc.hp.com>,
	105@bugs.parisc-linux.org
In-Reply-To: Your message of "Fri, 13 Apr 2001 15:57:05 MDT."
             <200104132157.PAA08703@puffin.external.hp.com> 
Date: Fri, 13 Apr 2001 16:30:36 -0600
From: Grant Grundler <grundler@puffin.external.hp.com>

kernel-admin@lists.parisc-linux.org wrote:
...
> ccio_dma.c:365: Assertion (pages needed * IOVP_SIZE) < DMA_CHUNK_SIZE
> Kernel panic: (pages needed * IOVP_SIZE) < DMA_CHUNK_SIZE

DMA_CHUNK_SIZE is the max IO length SCSI midlayer will limit itself
to when doin I/O.
parisc defines it with:
#define DMA_CHUNK_SIZE  (BITS_PER_LONG*PAGE_SIZE)

If any part of the I/O is not aligned to a page boundary, we will need
more than BITS_PER_LONG I/O pdir entries and hit the above assertion.
Worst case might be (BITS_PER_LONG/2).

If the mapping request is for the HD, then we might avoid the buffer
aligment issue by forcing the file system to 4K blocks.
This is just a workaround though.

grant

Grant Grundler
parisc-linux {PCI|IOMMU|SMP} hacker
+1.408.447.7253