:) "error -90" means that "EMSGSIZE", message too long in errno.h. #define EMSGSIZE 90 /* Message too long */ In the implementation of usb_submit_urb, there are three occassion that will return -EMSGSIZE. I have asked skel_write to ouptput the variable "count" whose value is 8 at my pc.
I am tracking down now. On 11/19/05, Karsten Ohme <[EMAIL PROTECTED]> wrote: > mail mail wrote: > > hi, * and Karsten > > > > Thanks a lot. It is really because of the call of kfree which leads to > > the kernel oops. > > And do now forget to clean the memory it the no-error case. If think > this was missing. Else it will lead to a growing memory consumption ... > > > I am now tried to find out why "failed submitting > > write urb". Do you have any idea concerning to debug with it? Is there > > any source code about USB on kernel 2.6.11 that I can learn from? > > Well, what is error code 90? Is the USB device correctly set up? Look it > the headers for the USB stuff. (google for "browse kernel source") > I have never programmed a USB driver and have only limited knowledge of > driver programming. But I bet there will be some examples, e.g. I have a > Kobil Kaan Professional card terminal and this USB driver is included in > the kernel sources (I believe it is named kobil_sct.) > > You have the possibility to debug a kernel and so a driver over a serial > line from a second computer. Because you have the complete exact source > code of the running kernel you could debug it step by step ... > Look for kernel debugger nlkd, kdgb, maybe also kdb. > > Karsten > > > > > TowerGee > > > > On 11/18/05, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > >>Message: 1 > >>Date: Thu, 17 Nov 2005 19:06:50 +0100 > >>From: Karsten Ohme <[EMAIL PROTECTED]> > >>Subject: Re: [Muscle] question about writing DT3500 driver on kernel > >> 2.6.11 for muscle > >>To: MUSCLE <[email protected]> > >>Message-ID: <[EMAIL PROTECTED]> > >>Content-Type: text/plain; charset=ISO-8859-1 > >> > >>mail mail wrote: > >> > >>>hi, * > >>>I am migrating DT3500 driver from kernel 2.4 to kernel 2.6. Now I did > >>>some work on it. When I try to run pcscd with "-f -d stdout" > >>>arguments. I find that "skel_write" function has some problem. > >> > >>What means problems? A kernel oops is a problem. And the output seems to > >>be one. > >> > >>Is the kfree(buf) necessary in the error case? The buf seems to be > >>allocated with usb_buffer_alloc(dev->udev, count, GFP_KERNEL, > >>&urb->transfer_dma); so it must be deallocated with > >>usb_buffer_free(dev->udev, count, buf, urb->transfer_dma); ? > >>And is the buf deallocated in the case of success? > >> > >>You should detect the error for the failed sending. This is one error. > >>Because it is only a skeleton driver it may need some further handling. > >>The real problem is the paging request in the error case, I would it > >>contribute to the kfree(), because the buf is already deallocated. > >> > >>Karsten > >> > > _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
