kevin wrote:
>
> Thanks for the suggestions but so far I am still having the same problem
> with the usb_control_msg. I tried kmalloc-ing buf but this made no
> difference. I also tried ksymoops on the crash file but I don't
> understand the output- it seems to have a lot of messages having nothing
> to do with usb. Maybe I'm not using it correctly.
>
> I have found that the problem appears to be caused by the 'usbrcvpipe'
> part of the usb_control_msg command. I defined pipe =
> usbrcvpipe(dev-udev,0)
> and replaced the usb_conrtol_msg(dev->udev, usbrcvpipe(dev->udev,0),
> 0x8a, 0xc1, 0, 0, buf, 0x02, PENCAM_TIMEOUT) with
>
> info("setting pipe");
> pipe = usb_control_msg(dev->udev,0);
Do you mean:
pipe = usb_rcvctrlpipe(dev->udev,0);
here?
I'd suggest using cut & paste to correctly show us what you
are using. "usbrcvpipe" isn't a [full] USB macro name.
> info("pipe set");
>
> if ((i = usb_control_mag(dev->udev, pipe, 0x8a, ...) < 0) {
> .. error msgs and return i;
> }
>
> When I insmod pendrv.o, I get the "settng pipe" message, and then the
> crash
>
> invalid operand: 0000
> etc (see below)
This could be a real invalid op error (executing some garbage
data as code e.g.) or it could be that you have hit a
BUG() call in the kernel. BUG() uses invalid operand (on x86
at least).
> I never get the "pipe set" message. The libusb functions (which work) do
> not apppear to use the usb(snd/rcv)pipe(..) commands. I am trying to use
> the libusb version of the usb_control_msg command, which uses an ioctl
> command. I can't seem to get the right include file for this;
> <linux/ioctl.h> and <linux/usbdevice_fs.h> do not have it (I get
> unresolved symbol for ioctl after a make) and including <sys/ioctl.h>
> which is used in libusb, give me errors about conflicting defines of
> some names. Any idea as to why the usbrcvpipe(.. is causing the crash?
> Or about how I could implement the libusb type of fuction, avoiding the
> reference to usbrcvpipe?
>
> Kevin
> > [snip]
> And the crash log:
>
> > >
> > > invalid operand: 0000
> > > CPU: 0
> > > EIP: 0010:[<c88f165d>]
> > > EFLAGS: 00010202
> > > eax: 00000300 ebx: c4c79dec ecx: c29c2c00 edx: 04000300
> > > esi: c541af60 edi: c29c2c00 ebp: 00000000 esp: c4c79dc4
> > > ds: 0018 es: 0018 ss: 0018
> > > Process insmod (pid: 1551, stackpage=c4c79000)
> > > Stack: 0000008a 000000c1 00000000 00000000 c4c79dec 00000002 000003e8
> > > 00000000
> > > 00000000 00000086 00000000 00000000 00000000 00000000 00000000
> > > 00000000
> > > 00000000 00000000 00000000 00000000 c0113e93 c88f2130 c88f2130
> > > 00000000
> > > Call Trace: [<c0113e93>] [<c88f2130>] [<c88f2130>] [<c88f197e>]
> > > [<c0129463>] [<c88f22a4>] [<c88f2360>]
> > > [<c8851ae9>] [<c88f22a4>] [<c88f2494>] [<c88f237c>] [<c885c340>]
> > > [<c885186c>] [<c8851845>] [<c8851845>]
> > > [<c885c348>] [<c88f1a50>] [<c8851116>] [<c88f2360>] [<c88510f3>]
> > > [<c88f1000>] [<c88f1a5d>] [<c88f2360>]
> > > [<c012972e>] [<c0129754>] [<c0114aa8>] [<c8851000>] [<c8851000>]
> > > [<c88f2480>] [<c88fe000>] [<c88f1060>]
> > > [<c0106f23>]
> > >
> > > Code: 0f 44 c2 0d 80 00 00 80 50 8b 0e 51 e8 2a 0b f6 ff 83 c4 30
> >
> > Needs to be run thru ksymoops.
>
> Did it; don't understand the output. I'm probably doing something wrong
> with that too.
I don't recall what kernel version you are using, but please
make sure that you are using the latest version of ksymoops
for that kernel version. The ksymoops output would help
a lot (when it's done correctly).
Give ksymoops the file names of your kernel vmlinux file and the
matching System.map file.
Try it like this:
ksymoops -v vmlinux_filename -m system.map.filename -LK oops.file >
oops.txt
and see if that's readable.
Hopefully that will point you to an offset in pendrv that is
crashing. Then you can use "objdump pendrv.o" to find that code
and its corresponding source code...or you can post the source
code and some other people can help you with it.
~Randy
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel