lkml.org 
[lkml]   [2013]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linuxppc-dev] Unbinding device from a driver
On 07/04/2013 05:35:28 AM, Gupta Ruchika-R66431 wrote:
> Hi,
>
>
>
> I am trying to unbind a platform device from a driver. Even when the
> remove function of the device returns an EBUSY error, the device is
> unbound from the driver. Is this the right behavior ? Why does kernel
> forcefully unbind the device even if device remove function returns
> an error ?

From looking at the code, it seems it's not allowed for a driver to
refuse the unbinding. If you can't unbind yet, you need to block until
you can (and take measures to ensure that it won't take too long).

I don't know the history of why the remove method can return an error
even though nothing seems to check it.

> root@p4080ds: ls
>
> bind ffe301000.jr ffe302000.jr ffe303000.jr ffe304000.jr uevent
> unbind
>
>
>
> root@p4080ds: echo ffe301000.jr > unbind
>
> In caam_jr_remove
>
> caam_jr ffe301000.jr: Device Busy

Is the caam_jr driver printing this, or the device model infrastructure?

-Scott


\
 
 \ /
  Last update: 2013-07-10 23:23    [W:0.139 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site