lkml.org 
[lkml]   [2015]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 2/4] dmaengine: Add STM32 DMA driver
    On Wed, Oct 14, 2015 at 05:41:26PM +0200, M'boumba Cedric Madianga wrote:
    > 2015-10-14 17:28 GMT+02:00 Daniel Thompson <daniel.thompson@linaro.org>:
    > > On 14/10/15 16:26, M'boumba Cedric Madianga wrote:
    > >>
    > >> 2015-10-14 16:24 GMT+02:00 Daniel Thompson <daniel.thompson@linaro.org>:
    > >>>
    > >>>
    > >>> Hmnnn...
    > >>>
    > >>> The dmaengine framework will WARN_ONCE() if an dmaengine is removed
    > >>> whilst
    > >>> it is active and also works hard to ensure dmaengine modules are not
    > >>> removed
    > >>> whilst there are active drivers using the framework.
    > >>>
    > >>> How do we get into this function whilst there is still an active DMA
    > >>> channels?
    > >>
    > >>
    > >> For example, when a user try "rmmod stm32-dma" in uart console.
    > >> It will enter in stm32_dma_remove while there is potentially still active
    > >> DMA.
    > >
    > >
    > > Check dmaengine.c for yourself but I think in this case the dmaengine
    > > framework will hold references to the module and prevent the remove from
    > > taking place.
    >
    > Yes I did it.
    > As far I understand, the dmaengine framework will print a warning
    > message but doesn't stop removing operation if there are some active
    > clients.

    we hold a ref, so removal wont work, see dma_chan_get()

    --
    ~Vinod


    \
     
     \ /
      Last update: 2015-10-15 06:21    [W:5.263 / U:3.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site