Re: Calling usb_bulk_msg inside usbtouch_process_pkt is causing kernel panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 03, 2012 at 04:41:57PM +0000, Nuno Santos wrote:
> Hi Greg,
> 
> Thanks for your reply.
> 
> On 01/03/2012 04:29 PM, Greg KH wrote:
> >On Tue, Jan 03, 2012 at 04:10:15PM +0000, Nuno Santos wrote:
> >>Hi,
> >>
> >>I'm calling usb_bulk_msg inside usbtouch_process_pkt and this is
> >>causing the kernel to panic.
> >What is the kernel panic message?  Perhaps that will tell you why you
> >can't do this :)
> That's another pertinent question. After this I usually need to
> restart my computer and the syslog doesn't contain the error to
> better analyse... :/

A picture from a digital camera works a lot of times.

> >>Maybe someone could explain me why this happens and how can I
> >>proceed in order to make what I need to make without having this
> >>problem.
> >You can't call a sleeping function from within irq context, which is
> >probably what you are doing, right?
> Now that you put this in those terms, it makes sense...
> >
> >What are you trying to solve by calling this function at this point in
> >time?
> From time to time I need to send a message to my device to tell him
> to do something. Since right now, the only place in which I have
> continuous access to device data is the data callback I decided to
> do that operation there.

Why is that the only time you have access to the device?

What is causing you to want to do this type of thing?  Can't you trigger
off of that?

Any pointers to your code so we can see it?

> I think my only alternative here is to create a timer that from time
> to time is called and if it is the time to make that operation, it
> will be done inside the timer.

That would work, as would a waitqueue.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux