I have a kernel module in which I deal with USB devices.
It happens that I can successfully send a USB bulk message to a device, but that operation is being made under the callback of a binary attribute.
However, there is a specific operation that I need to do when something happens. When that happens, I need to send a bulk message to the device. The place in which that occurs is the own device data income callback. If I send the bulk message in that place I get a kernel panic.
Can someone tell me why?
If that is not a proper place to do such operation, where can I safely do it? How can I signal the operation to be done in another place? A Timer?
Please advice regarding this specific problem.