RE: [linuxppc-dev] Unbinding device from a driver
> -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, July 09, 2013 5:04 AM > To: Gupta Ruchika-R66431 > Cc: linuxppc-...@linux.freescale.net; linux-kernel@vger.kernel.org > Subject: Re: [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? This is being printed by jr driver. Ruchika > > -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [linuxppc-dev] Unbinding device from a driver
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 09, 2013 5:04 AM To: Gupta Ruchika-R66431 Cc: linuxppc-...@linux.freescale.net; linux-kernel@vger.kernel.org Subject: Re: [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? This is being printed by jr driver. Ruchika -Scott -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/