From: Scott Wood <scottwood@freescale.com>
To: Gupta Ruchika-R66431 <R66431@freescale.com>
Cc: "linuxppc-dev@linux.freescale.net"
<linuxppc-dev@linux.freescale.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [linuxppc-dev] Unbinding device from a driver
Date: Mon, 8 Jul 2013 18:33:45 -0500 [thread overview]
Message-ID: <1373326425.8183.184@snotra> (raw)
In-Reply-To: <B2B5EF0D8FDD10429C8DE6C4C2B38282093BABDD@039-SN2MPN1-023.039d.mgd.msft.net> (from R66431@freescale.com on Thu Jul 4 05:35:28 2013)
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
next parent reply other threads:[~2013-07-08 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B2B5EF0D8FDD10429C8DE6C4C2B38282093BABDD@039-SN2MPN1-023.039d.mgd.msft.net>
2013-07-08 23:33 ` Scott Wood [this message]
2013-07-09 4:47 ` [linuxppc-dev] Unbinding device from a driver Gupta Ruchika-R66431
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373326425.8183.184@snotra \
--to=scottwood@freescale.com \
--cc=R66431@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@linux.freescale.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox