Re: [Libusbx-devel] 3 warnings in git master from Xcode

2014-01-21 Thread Orin Eman
I've not met an MSVC compiler that hasn't implemented {0} correctly. Perhaps it's the comma Xcode doesn't like: {0,} and {0} would be OK. (Assuming the comma in the original post wasn't a typo.) I haven't compiled libusb(x) on the Mac since I got forced into installing Xcode 5... I'll give it a

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-09 Thread Orin Eman
If an EFAULT return from the kernel results in an infinite loop in libusb(x): It's not a matter of _recovering_ from the EFAULT. It's a matter of whether libusb(x) should propagate it to the caller or not. There is simply _no_ excuse not to propagate it. Should we tell the kernel developers no

Re: [Libusbx-devel] Unblocking libusb_handle_events()...?

2013-07-03 Thread Orin Eman
I'm pretty sure I use some form of handle events with timeout in the thread that I use to handle events. Each time the thread wakes up, it checks a run flag and if the flag is reset, the thread exits. When it wants the event handler thread to quit, the main code resets the run flag and waits for

Re: [Libusbx-devel] [PATCH] RFC: Add a libusb_strerror() function

2013-05-30 Thread Orin Eman
On Thu, May 30, 2013 at 2:30 AM, Hans de Goede wrote: > Hi, > > On 05/30/2013 09:44 AM, Xiaofan Chen wrote: > > On Tue, May 28, 2013 at 6:25 PM, Hans de Goede > wrote: > >> This patch adds the much requested libusb_strerror() function, taking > into > >> account all issues people raised wrt prev

Re: [Libusbx-devel] OT Right clickable .inf file for usbser.sys on Win7

2013-03-30 Thread Orin Eman
On Sat, Mar 30, 2013 at 6:00 AM, Kustaa Nyholm wrote: > Hi, > > > sorry for the OT but I felt the expertise on this > list might have answer on tap. > > I've got a .inf file for my USB CDC ACM device > that works fine. However installing it requires > about million steps for the end user so I thou

Re: [Libusbx-devel] Hotplug

2013-02-12 Thread Orin Eman
On Tue, Feb 12, 2013 at 2:38 PM, Nathan Hjelm wrote: > > On Feb 12, 2013, at 3:41 AM, Kustaa Nyholm > wrote: > > > On 12.2.2013 12.29, "Hans de Goede" wrote: > >> > >> I know, but I'm operating under the assumption that Nathan will > eventually > >> do a libusb release with his code, at which p

Re: [Libusbx-devel] libusbx and Windows 8 and Windows 8 RT

2012-12-31 Thread Orin Eman
On Mon, Dec 31, 2012 at 9:49 AM, Tim Roberts wrote: > Pete Batard wrote: > > Last time I tried with VS2012, it seemed to produce ARM binaries > > alright, but since Microsoft decided to go all Apple in terms of pricing > > and control of RT hardware, I doubt there's going to be much point > > try

Re: [Libusbx-devel] [libusbx] persisting LIBUSB_ERROR_NO_MEM on burst condition

2012-12-11 Thread Orin Eman
On Mon, Dec 10, 2012 at 5:23 PM, Peter Stuge wrote: > Peter Stuge wrote: > > Are there considerations (timing? something else?) > > related to asking Windows for memory as needed > > Pete Batard wrote: > > Adding and testing array reallocation code is a PITA > > and development time is always sup

Re: [Libusbx-devel] -Wcast-align warnings in public libusb.h

2012-10-15 Thread Orin Eman
On Mon, Oct 15, 2012 at 7:58 PM, Pete Batard wrote: > On 15 October 2012 12:15, Sean McBride wrote: > >>3) Look at how other software that uses -Wcast-align handles the same > issue. > > > > I'm not exactly sure what you're asking... > > I was suggesting that, before we do anything, we look at w

Re: [Libusbx-devel] -Wcast-align warnings in public libusb.h

2012-10-15 Thread Orin Eman
On Mon, Oct 15, 2012 at 9:15 AM, Sean McBride wrote: > On Fri, 12 Oct 2012 23:25:14 +0100, Pete Batard said: > > >On 2012.10.12 22:06, Sean McBride wrote: > >> 3) ??? > > > >3) Look at how other software that uses -Wcast-align handles the same > issue. > > > >There's probably hardly any piece of

Re: [Libusbx-devel] Building git code on Mac; CMake support?

2012-10-12 Thread Orin Eman
On Fri, Oct 12, 2012 at 6:03 PM, Xiaofan Chen wrote: > On Sat, Oct 13, 2012 at 2:15 AM, Orin Eman wrote: > > Personally, I think it's better to supply native build methods than to > try > > to force autotools to work on systems that don't support it. > > Me to

Re: [Libusbx-devel] Building git code on Mac; CMake support?

2012-10-12 Thread Orin Eman
On Fri, Oct 12, 2012 at 9:43 AM, Sean McBride wrote: > On Mon, 1 Oct 2012 22:01:39 +0100, Pete Batard said: > > >Now, if a dependency on CMake is preferable, I'm not closing the door on > >either (After all, I did add Vitali's CMake support in my branch when he > >proposed it), but I'd like to hea

Re: [Libusbx-devel] libusbx-1.0.13 has been released

2012-09-24 Thread Orin Eman
On Mon, Sep 24, 2012 at 12:35 PM, Pete Batard wrote: > On 2012.09.24 20:31, Greg KH wrote: > > No one delivered any such "fix", all I got was a bunch of bug reports > > this morning from the distros saying that usbutils was suddenly broken. > > That shows that libusbx is really the problem here,

Re: [Libusbx-devel] libusbx-1.0.13 has been released

2012-09-24 Thread Orin Eman
On Mon, Sep 24, 2012 at 12:12 PM, Hans de Goede wrote: > I see 3 possible solutions: > > 1) Revert the change, and do a 1.0.14 release with just that change > right away, before anyone starts depending on the new name > > 2) Adapt usbutils to work with both versions of the API, as is suggested >

Re: [Libusbx-devel] [PATCH 0/2 for v1.0.13]: Add libusb_detach_kernel_driver_and_claim()

2012-09-12 Thread Orin Eman
On Wed, Sep 12, 2012 at 4:40 PM, Pete Batard wrote: > On 2012.09.12 10:51, Hans de Goede wrote: > >> should we add a new API even if we > >> expect at least one for the platforms we support never to have any use > >> for it? > > > > Yes, I want libusbx to enable app writers to do whatever they en

Re: [Libusbx-devel] [PATCH] Update libusb.h header in accordance with USB 3.0 specs

2012-09-06 Thread Orin Eman
On Thu, Sep 6, 2012 at 11:28 AM, Hans de Goede wrote: > > > > > > I don't think you should break existing code until libusbx 2.0. > I think you should add: > > > > #define MaxPower bMaxPower > > > > > > That was my initial thought to, but MaxPower is too generic of a > na

Re: [Libusbx-devel] [PATCH] Update libusb.h header in accordance with USB 3.0 specs

2012-09-06 Thread Orin Eman
On Thu, Sep 6, 2012 at 3:07 AM, Hans de Goede wrote: > Hi, > > On 09/06/2012 04:35 AM, Orin Eman wrote: > >> On Wed, Sep 5, 2012 at 5:00 PM, Pete Batard > p...@akeo.ie>> wrote: >> >> This is #26: >> https://github.com/libusbx/__**libusbx/issues/2

Re: [Libusbx-devel] [PATCH] Update libusb.h header in accordance with USB 3.0 specs

2012-09-05 Thread Orin Eman
On Wed, Sep 5, 2012 at 5:00 PM, Pete Batard wrote: > This is #26: > https://github.com/libusbx/**libusbx/issues/26, > but doesn't include BOS/EP Companion. > > Note that the proposed patch fixes libusb_config_descriptor to use > bMaxPower, as it is l

Re: [Libusbx-devel] RFC: libusbx OS specific API calls

2012-09-02 Thread Orin Eman
On Sun, Sep 2, 2012 at 2:15 PM, Alan Stern wrote: > On Sun, 2 Sep 2012, Orin Eman wrote: > > > > Then as said that is a pretty useless feature, since apps can already > > > find out as much by comparing the amount actually read versus the > amount > > > the

Re: [Libusbx-devel] RFC: libusbx OS specific API calls

2012-09-02 Thread Orin Eman
On Sun, Sep 2, 2012 at 7:15 AM, Hans de Goede wrote: > Hi, > > On 09/02/2012 03:47 AM, Pete Batard wrote: > >> On 2012.08.31 20:40, Hans de Goede wrote: > >>> This assumes that the winusb flag causes the ep to halt when the short > >>> read is encountered > > > > Couldn't see much in NetMon, but

Re: [Libusbx-devel] libusb-win32 and libusbK support has now been pushed to mainline

2012-08-29 Thread Orin Eman
On Wed, Aug 29, 2012 at 8:43 PM, Kustaa Nyholm wrote: > On 30.8.2012 4.21, "Pete Batard" wrote: > > > >I doubt I'm the only one who'd prefer an API that solves actual > >problems, such as setting platform specific preferences, over an API > >that's been over sanitized for the sake of abstraction.

Re: [Libusbx-devel] [PATCH] Samples: Add FX2/FX3 firmware upload to RAM

2012-08-09 Thread Orin Eman
On Thu, Aug 9, 2012 at 4:57 PM, Jon Sturm wrote: > On Thu, Aug 9, 2012 at 3:01 AM, Markus wrote: > > Hi Pete, > > > > my answers became a bit longer than intended. Here's my 5 cent, > > but generally, I'd leave the decision to you: > > > >> Now, this being said, I don't have that much of an issu

Re: [Libusbx-devel] libusb segfaults - causes pcscd to crash

2012-08-02 Thread Orin Eman
On Thu, Aug 2, 2012 at 1:58 PM, Pete Batard wrote: > > > Setting next and prev to NULL in list_del() caused a crash in > > usbi_cond_destroy() in threads_windows.c (next was used after calling > > list_del). Using list_for_each_entry_safe fixed it and cleaned up the > code. > > > > int usbi_cond

Re: [Libusbx-devel] libusb segfaults - causes pcscd to crash

2012-08-02 Thread Orin Eman
On Thu, Aug 2, 2012 at 9:30 AM, Orin Eman wrote: > I've seen the list get screwed up by trying to reissue a transfer before > getting the callback. The list got a circular segment in that case. > Perhaps something like cancelling a transfer followed by freeing it before > get

Re: [Libusbx-devel] libusb segfaults - causes pcscd to crash

2012-08-02 Thread Orin Eman
I've seen the list get screwed up by trying to reissue a transfer before getting the callback. The list got a circular segment in that case. Perhaps something like cancelling a transfer followed by freeing it before getting the callback causes this? I made a couple of changes to trap this - I'll

Re: [Libusbx-devel] Warnings from Intel Compiler

2012-06-22 Thread Orin Eman
On Fri, Jun 22, 2012 at 4:38 AM, Pete Batard wrote: > On 2012.06.21 21:42, Orin Eman wrote: > >> The patch is OK, but the compiler then throws the same warning on the >> next line ("return 1;") so you need to remove the next line as well. >> > >

Re: [Libusbx-devel] Warnings from Intel Compiler

2012-06-21 Thread Orin Eman
On Thu, Jun 21, 2012 at 1:08 PM, Pete Batard wrote: > I'm gonna bump the priority of churning through the warnings, else I'm > pretty sure they're going to fall through. > > Proposed patch attached. Please let me know if still get reports for the > ones mentioned below. > All but the "statement

[Libusbx-devel] Warnings from Intel Compiler

2012-06-19 Thread Orin Eman
Since I have a copy, I compiled 1.0.12 with the Intel Compiler. I turned off the zero length array and unreferenced parameter warnings. This is what is left: Building with Intel(R) C++ Compiler 12.1 ClCompile: * ClCompile (Win32 - Intel C++) All outputs are up-to-date. core.c ..\libu

Re: [Libusbx-devel] hot unplug on windows, only 3 IN transfers complete

2012-06-18 Thread Orin Eman
On Mon, Jun 18, 2012 at 4:56 PM, Peter Stuge wrote: > Peter Stuge wrote: > > Is there a reason why we would ever not want to set AUTO_CLEAR_STALL? > > > > It's done unconditionally now, which seems to be the right way to go > > so that the 31 error happens for one less reason. > > On the other ha

Re: [Libusbx-devel] hot unplug on windows, only 3 IN transfers complete

2012-06-18 Thread Orin Eman
On Mon, Jun 18, 2012 at 4:07 PM, Peter Stuge wrote: > Pete Batard wrote: > > > What does GetLastError() return in the relevant cases after the > > > WinUsb functions return FALSE? > > > > I'd expect "[22] The device does not recognize the command". > > Do you know all possible reasons are for tha

Re: [Libusbx-devel] libusbx v1.0.12 has been released

2012-06-15 Thread Orin Eman
On Fri, Jun 15, 2012 at 12:22 PM, Pete Batard wrote: > On 2012.06.15 19:56, Orin Eman wrote: > > I compiled at warning level 4 with Visual Studio 2010. There is a lot > > of noise... > > Good point. > > I don't think I recompiled at level 4 since last time we t

Re: [Libusbx-devel] libusbx v1.0.12 has been released

2012-06-15 Thread Orin Eman
On Fri, Jun 15, 2012 at 11:08 AM, Pete Batard wrote: > All, > > It is my pleasure to announce the release of libusbx v1.0.12. > > In terms of bugfixes and new features, this new version brings the > following improvements: > * Fix a potential major regression with pthread on Linux > * Fix missing

Re: [Libusbx-devel] libusb_control_transfer() stalls

2012-06-14 Thread Orin Eman
On Wed, Jun 13, 2012 at 6:29 AM, Xiaofan Chen wrote: > On Wed, Jun 13, 2012 at 9:17 PM, Markus wrote: > > On Wed, 13 13:24 , Pete Batard wrote: > >> > >> When achievable, being able to have a look at the data being sent on the > >> bus usually pays off, especially if you're not sure where to lo

Re: [Libusbx-devel] option to log to stdout instead of stderr

2012-05-25 Thread Orin Eman
On Fri, May 25, 2012 at 5:22 AM, Ludovic Rousseau < ludovic.rouss...@gmail.com> wrote: > Hello, > > I have program that send its debug log to stdout. > libusbx used stderr or stdout depending of the log level. That is > weird but not really the problem. > > If a program uses both stdout and stderr

Re: [Libusbx-devel] Proposed topology API and USB Location ID

2012-05-23 Thread Orin Eman
On Wed, May 23, 2012 at 4:43 AM, Pete Batard wrote: > On 2012.05.23 03:17, Yves Arrouye wrote: > > I double-checked the actual OS X API (the 32 bits comes from one of > > their samples). It seems like the underlying object is actually an > > OSNumber, which is a wrapper for a kernel number of 8,

Re: [Libusbx-devel] Fwd: problems with libusb_get_string_descriptor()

2012-05-07 Thread Orin Eman
I'll just add my opinion on parameter checking... Anyone remember the "User Application Error" that old Windows versions used to pop up? It was Microsoft's attempt to deflect blame for exactly the same kind of crash in the Windows environment - most likely the user had passed in a bad pointer (of

Re: [Libusbx-devel] Microsoft's view on the perceived WinUSB limitations

2012-05-02 Thread Orin Eman
On Wed, May 2, 2012 at 6:54 PM, Xiaofan Chen wrote: > On Thu, May 3, 2012 at 4:31 AM, Hans Petter Selasky > wrote: > > On Wednesday 02 May 2012 21:15:27 Tim Roberts wrote: > >> Hans Petter Selasky wrote: > >> > Why Microsoft can't use the BSD or Linux USB stack then, which > supports > >> > all

Re: [Libusbx-devel] Microsoft's view on the perceived WinUSB limitations

2012-05-02 Thread Orin Eman
On Wed, May 2, 2012 at 9:17 AM, Robert Heller wrote: > > Can't use that pesky open source code -- it might cause a code leak or > something. Or make MS-Windows too much like UNIX or even too POSIX > compliant or something else equally bad. :-) > > Like having to wait two years for a release...

Re: [Libusbx-devel] usbclerk: Windows service for signing and installing usb device drivers

2012-05-01 Thread Orin Eman
On Tue, May 1, 2012 at 2:17 PM, Pete Batard wrote: > On 2012.04.29 06:42, Arnon Gilboa wrote: > >> I see that you used wdi_register_logger() in an "Hack for wdi logging" > >> section (currenlty disabled). > >> Can you elaborate on the limitation you found there and if you would > >> like an enhan

Re: [Libusbx-devel] Name of the files

2012-04-20 Thread Orin Eman
On Fri, Apr 20, 2012 at 8:21 PM, Jose Pablo wrote: > What If I use a software which uses libusb-1.0 and then I decide to > install another software which use libusbx-1.0? Do I have to uninstall the > first one to uses the second one? Just because you people can“t decide not > to change the names?!