> whiteheat.c
whiteheat_attach:
usb_clear_halt(serial->dev, pipe);
ret = usb_bulk_msg (serial->dev, pipe, command, sizeof(command), &alen,
COMMAND_TIMEOUT);
DMA on stack
whiteheat_write:
result = usb_submit_urb(urb, GFP_ATOMIC);
no need for ATOMIC here
static void command_port_read_callback:
spin_lock_irqsave(&command_info->lock, flags);
no need to save flags, you are in irq context
static int firm_send_command:
retval = usb_submit_urb (command_port->write_urb, GFP_KERNEL);
illegal while holding a spinlock, logic looks fishy
static int start_command_port:
spin_lock_irqsave(&command_info->lock, flags);
if (!command_info->port_running) {
/* Work around HCD bugs */
usb_clear_halt(serial->dev, command_port->read_urb->pipe);
command_port->read_urb->dev = serial->dev;
retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL);
major brokenness -
A - using usb_clear_halt with a spinlock held is absolutely illegal
B - if you have to submit an URB with a spinlock held, you _must_ use GFP_ATOMIC
static int start_port_read:
retval = usb_submit_urb(urb, GFP_KERNEL);
use GFP_ATOMIC
static void stop_command_port (and other places):
spin_lock_irqsave(&command_info->lock, flags);
command_info->port_running--;
if (!command_info->port_running)
usb_unlink_urb(command_port->read_urb);
you must use asynchrnous unlink here.
HTH
Oliver
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel