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
On Tue, Jan 29, 2008 at 02:09:52PM -0800, Luben Tuikov 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. The

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
--- 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 architect of the HW DMA engine of the ASIC?

Re: DMA mapping on SCSI device?

2008-01-29 Thread Robert Hancock
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 architect of the HW DMA

Re: DMA mapping on SCSI device?

2008-01-28 Thread Grant Grundler
On Jan 29, 2008 11:08 AM, Robert Hancock [EMAIL PROTECTED] wrote: ... The last solution I tried was to set the DMA mask on both ports to 32-bit on slave_configure when an ATAPI device is connected. However, this runs into complications as well. This is run on initialization and when trying to

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