[PATCH 3/4] PS3: Fix DMA scatter-gather

Geoff Levand geoffrey.levand at am.sony.com
Wed Feb 7 03:43:34 EST 2007


Arnd Bergmann wrote:
> On Wednesday 31 January 2007 00:20, Geoff Levand wrote:
>> @@ -272,10 +272,29 @@ static void ps3_unmap_single(struct devi
>> �static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
>> ��������enum dma_data_direction direction)
>> �{
>> +�������struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
>> +�������int i;
>> +
>> �#if defined(CONFIG_PS3_DYNAMIC_DMA)
>> ��������BUG_ON("do");
>> +�������return -EPERM;
>> +#else
> 
> Do you still need the #ifdef? Since there is no point executing this,
> would guess you can just as well keep only the other version, right?

I wanted to keep it there in the event someone tries to use a usb device
that needs scatter-gather with CONFIG_PS3_DYNAMIC_DMA=y.  Currently,
CONFIG_PS3_DYNAMIC_DMA=y only supports alloc_coherent and map_single.

I plan to rework the entire CONFIG_PS3_DYNAMIC_DMA to use Ben's fixes for
iommu support, but until then, I think it would be safer to keep this.

-Geoff




More information about the Linuxppc-dev mailing list