Re: DMA mapping on SCSI device?

2008-01-30 Thread Mark Lord
Robert Hancock wrote: Luben Tuikov wrote: --- On Mon, 1/28/08, Robert Hancock [EMAIL PROTECTED] wrote: The trick is that if an ATAPI device is connected, we (as far as I'm aware) can't use ADMA mode, so we have to switch that port into legacy mode. Can you double check this with the HW

Re: DMA mapping on SCSI device?

2008-01-30 Thread Mark Lord
Mark Lord wrote: .. Commands which were not ADMA compatible (eg. MODE_SENSE, TEST_UNIT_READY, ..) were simply handled with PIO (in the driver) rather than any form of DMA, which is okay because those commands are relatively infrequent. .. A slight correction there: TEST_UNIT_READY was fine

Re: DMA mapping on SCSI device?

2008-01-30 Thread Robert Hancock
Mark Lord wrote: Robert Hancock wrote: Luben Tuikov wrote: --- On Mon, 1/28/08, Robert Hancock [EMAIL PROTECTED] wrote: The trick is that if an ATAPI device is connected, we (as far as I'm aware) can't use ADMA mode, so we have to switch that port into legacy mode. Can you double check this

Re: DMA mapping on SCSI device?

2008-01-30 Thread Matthew Wilcox
. The thought of using the SCSI struct device for DMA mapping was brought up at one point.. any thoughts on that? The reason for this is that the object that a struct scsi_dev represents has nothing to do with HW DMA engines. It really would work, once the few remaining architectures move away from

Re: DMA mapping on SCSI device?

2008-01-29 Thread James Bottomley
On Tue, 2008-01-29 at 05:28 +0100, Andi Kleen wrote: The ideal solution would be to do mapping against a different struct device for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. I cannot imagine why it

Re: DMA mapping on SCSI device?

2008-01-29 Thread Luben Tuikov
--- On Mon, 1/28/08, Andi Kleen [EMAIL PROTECTED] wrote: The ideal solution would be to do mapping against a different struct device for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. I cannot imagine why

Re: DMA mapping on SCSI device?

2008-01-29 Thread Luben Tuikov
. The thought of using the SCSI struct device for DMA mapping was brought up at one point.. any thoughts on that? The reason for this is that the object that a struct scsi_dev represents has nothing to do with HW DMA engines. It looks like your current solution is correct and x86_64's

Re: DMA mapping on SCSI device?

2008-01-29 Thread Robert Hancock
that it is entirely true). The ideal solution would be to do mapping against a different struct device for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. The thought of using the SCSI struct device for DMA mapping

DMA mapping on SCSI device?

2008-01-28 Thread Robert Hancock
on it into 32-bit DMA needlessly. The ideal solution would be to do mapping against a different struct device for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. The thought of using the SCSI struct device for DMA

Re: DMA mapping on SCSI device?

2008-01-28 Thread Grant Grundler
for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. The thought of using the SCSI struct device for DMA mapping was brought up at one point.. any thoughts on that? I'm pretty sure that's not possible (using two PCI dev

Re: DMA mapping on SCSI device?

2008-01-28 Thread Matthew Wilcox
On Mon, Jan 28, 2008 at 06:08:44PM -0600, Robert Hancock wrote: The thought of using the SCSI struct device for DMA mapping was brought up at one point.. any thoughts on that? I believe this will work on some architectures and not others. Anything that uses include/asm-generic/dma-mapping.h

Re: DMA mapping on SCSI device?

2008-01-28 Thread Andi Kleen
The ideal solution would be to do mapping against a different struct device for each port, so that we could maintain the proper DMA mask for each of them at all times. However I'm not sure if that's possible. I cannot imagine why it should be that difficult. The PCI subsystem could over a