boundarydevices / imx_usb_loader

USB & UART loader for i.MX5/6/7/8 series
GNU Lesser General Public License v2.1
262 stars 158 forks source link

Moving libusb_free_device_list to get imx_usb to work on Windows. #100

Closed fredrikmarcus closed 5 years ago

fredrikmarcus commented 5 years ago

From the libusb documentation, "Be careful not to unreference a device you are about to open unitl after you opened it" It seems all devices where unreference before libusb_open was called. In Windows, at least, it gives a libusb error -4. Moving the libusb_free_device_list to after libusb_open ensures device is still referenced while trying to open.

This request fixes issue #99

tkisky commented 5 years ago

Can I get a Signed-off-by ?

fredrikmarcus commented 5 years ago

Is it something I missed doing? What should I do where?

I'm very new in doing pull requests. Sorry.

tkisky commented 5 years ago

On 9/4/2019 5:38 AM, Fredrik Marcus wrote:

Is it something I missed doing? What should I do where?

I'm very new in doing pull requests. Sorry.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boundarydevices/imx_usb_loader/pull/100?email_source=notifications&email_token=AANA3PZANBWPLT24EMAPS4DQH6T37A5CNFSM4ITGCCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53NNHI#issuecomment-527881885, or mute the thread https://github.com/notifications/unsubscribe-auth/AANA3P5CA2YEDS2JZKICJ2LQH6T37ANCNFSM4ITGCCMA.

If you do a "git log' you will see lines like

Signed-off-by: Martin Hundebøll martin@geanix.com

You should do something similar.

BR Troy

fredrikmarcus commented 5 years ago

Does this look better?

/Fredrik

tkisky commented 5 years ago

On 9/4/2019 8:45 AM, Fredrik Marcus wrote:

Does this look better?

/Fredrik

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/boundarydevices/imx_usb_loader/pull/100?email_source=notifications&email_token=AANA3P3OF75FXAJ3NYNESITQH7J3HA5CNFSM4ITGCCMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD54AXNQ#issuecomment-527961014, or mute the thread https://github.com/notifications/unsubscribe-auth/AANA3P2MXSQMWPPQGYW7TQLQH7J3HANCNFSM4ITGCCMA.

Pulled, Thanks! Troy