[lkml]   [2018]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net] macmace: Set platform device coherent_dma_mask
Hi Finn,

Am 11.05.2018 um 15:28 schrieb Finn Thain:
> On Fri, 11 May 2018, Michael Schmitz wrote:
>>>> Which begs the question: why can' you set up all Nubus bus devices'
>>>> DMA masks in nubus_device_register(), or nubus_add_board()?
>>> I am expecting to see the same WARNING from the nubus sonic driver but
>>> it hasn't happened yet, so I don't have a patch for it yet. In
>>> anycase, the nubus fix would be a lot like the zorro bus fix, so I
>>> don't see a problem.
>> That's odd. But what I meant to say is that by setting up
>> dma_coherent_mask in nubus_add_board(), and pointing dma_mask to that,
>> ypu won't need any patches to Nubus device drivers.
> Right. I think I've already acknowledged that. But it's off-topic, because
> the patches under review are for platform drivers. Those patches fix an
> actual bug that I've observed. Whereas, the nubus driver dma mask issue
> that you raised is purely theoretical at this stage.

I had lost track of the fact that macsonic can be probed as either Nubus
or platform device. Sorry for the noise.

I'm afraid using platform_device_register() (which you already use for
the SCC devices) is the only option handling this on a per-device basis
without touching platform core code, while at the same time keeping the
DMA mask setup out of device drivers (I can see Geert's point there -
device driver code might be shared across implementations of the device
on platforms with different DMA mask requirements,, something the driver
can't be expected to know about).



 \ /
  Last update: 2018-05-11 06:19    [W:0.071 / U:5.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site