[PATCH v2 1/3] PATA host controller driver for ep93xx

Rafal Prylowski prylowski at metasoft.pl
Wed Apr 4 03:47:56 EDT 2012


On 2012-04-03 20:55, H Hartley Sweeten wrote:
> 
> If the dma init fails does the driver fall back to pio mode correctly?
> 

Yes, udma_mask of ata_port is set only if we successfully requested dma
channels. Otherwise, we are limited to PIO4.

>> +	.bmdma_setup		= ep93xx_pata_dma_setup,
>> +	.bmdma_start		= ep93xx_pata_dma_start,
>> +	.bmdma_stop		= ep93xx_pata_dma_stop,
>> +	.bmdma_status		= ep93xx_pata_dma_status,
> 
> The bmdma ops pointers are still set if the dma init failed. Should they
> be set to NULL?
> 

I think it's not needed. Libata will not call them if udma_mask = 0.

> There are only two m2m dma channels on the ep93xx. They could be already in
> use by the spi driver. I just want to make sure that the ide driver will fall back to
> pio mode if they are not available.
> 

I tested this by enabling ep93xx spi in dma mode. In this case, pata driver
works in PIO4 mode.

Thanks,
RP



More information about the linux-arm-kernel mailing list