Re: [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vinod,

On 05/02/2020 13.31, Vinod Koul wrote:
>> Looking at the commit which added it and I still don't get the point.
>> If any of the channel is in use then we should not allow the DMA driver
>> to go away at all.
> 
> Not really, if the device is already gone, we cant do much about it. We
> have to handle that gracefully rather than oopsing

Ah, I have not thought about that. True.

> The important part is that the device is gone. Think about a device on
> PCI card which is yanked off or a USB device unplugged. Device is
> already gone, you can't communicate with it anymore. So all we can do is
> handle the condition and exit, hence the new method to let driver know.

But for most devices this is not applicable, I also wondered what should
I do in order to silence the print. Just add an empty device_release?

>> Imho there should be a function to check if we can proceed with the
>> .remove of the driver and fail it if any of the channels are in use.
>>
>> Hrm, base/dd.c __device_release_driver() does not check the .remove's
>> return value, so it can not fail.
>>
>> What is expected if the .remove returns with OK but we still have
>> channels in use?
>>
>> After the remove all sorts of things got yanked which might makes the
>> still in use channels cause issues down the road.
>>
>> I'm curious why it is a good thing to remotely try to support unbind
>> when the driver is in use.
>> It is like one wants to support ext4 removal even when your rootfs is ext4.
>>
>> I think krefing the DMA driver for channel request/release is just fine,
>> if user wants to break the system we should not assist...
>>
>>>> It's not limited to that driver, but actually all I'm maintaining.
>>>>
>>>> Users are not happy!
>>>>
>>>> -- 
>>>> With Best Regards,
>>>> Andy Shevchenko
>>>
>>
>> - Péter
>>
>> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
>> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux