Quantcast

Reattach kernel driver on usb close

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Reattach kernel driver on usb close

Simon Ye

This is a simple change to reattach the kernel driver on usb close. Let me know if there are any issues.


The following changes since commit 16257d60fb84f09b0d66ad881fe47e7b6faa84ef:


  enable doxygen docstrings (2014-03-05 16:56:27 +0100)


are available in the git repository at:


  https://github.com/yesimon/libftdi.git usb_close_attach


for you to fetch changes up to 3aeb4c79743e28b8498bbbeaaba27653b8584d72:


  Reattach kernel driver on usb close. (2014-05-06 11:10:41 -0700)


----------------------------------------------------------------

Simon Ye (1):

      Reattach kernel driver on usb close.


 src/ftdi.c | 4 ++++

 1 file changed, 4 insertions(+)



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Reattach kernel driver on usb close

Thomas Jarosch
Hi Simon,

On Tuesday, 6. May 2014 18:32:57 Simon Ye wrote:

> This is a simple change to reattach the kernel driver on usb close. Let me
> know if there are any issues.
>
>
> The following changes since commit
> 16257d60fb84f09b0d66ad881fe47e7b6faa84ef:
>
>
>   enable doxygen docstrings (2014-03-05 16:56:27 +0100)
>
>
> are available in the git repository at:
>
>
>   https://github.com/yesimon/libftdi.git usb_close_attach
>
>
> for you to fetch changes up to 3aeb4c79743e28b8498bbbeaaba27653b8584d72:
>
>
>   Reattach kernel driver on usb close. (2014-05-06 11:10:41 -0700)

I've reviewed your patch. How about doing the re-attach only
if the ftdi_module_detach_mode is set to AUTO_DETACH_SIO_MODULE?

Also you should issue a different error code than -1
so the API user can detect that only the re-attach failed.

How about -4 and also add it to the doxygen documentation. Thanks :)


Could there be any side effects to the re-attach?

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...