On Sun, 17 Mar 2002 16:05:43 -0800 David Brownell <[EMAIL PROTECTED]> wrote:
> > 1) What does -12 mean when it is returned in purb->status? > > 2) Is there a function in the kernel API to resolve a numeric error return > > to a textual description (kinda like perror() in the C library)? > > "-12" on my system == "-ENOMEM" according to <include/asm/errno.h>, > as you'd see if you passed the code to userland, negated it, and > then called perror() ... :) Aah, that's where the definitions were hiding. Ok, I admit it, dumb question, I should have found this myself. I don't understand why I'm getting this returned though. USB Programming Guide says that it means no memory for internal structures although I can't see how that can be possible. Have to think about that a little more. > > > > 3) Have I got the syntax of the call right in the first place? > > No, you're passing the setup data as if it were the data. > There are separate fields in the control URB for setup > data and "real data". > > If I were you I'd start by using usb_control_msg(), which is a > synchronous call ... and if you really need async control > messaging, then look at how that function makes control > requests. Ok, got you. I'm now chucking my 8 bytes of data into purb->setup_packet (which I believe is where it should be). No real data needs to be sent to the camera at this point its just the commands so I've blanked out transfer_buffer and zeroed transfer_buffer_length. I'll take a look at usb_control_msg(). I didn't use it before as the guide mentioned it was simply a compatibility wrapper to the old API and I was worried it might get deprecated in later kernel versions. I probably shouldn't have as pretty much every other driver I have looked at since uses it. Thanks for your reply. Cheers, Robin > > - Dave > > > _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
