Hi Oliver,
Oliver Neukum <[EMAIL PROTECTED]> writes:
>
> [..]
>> + atomic_t interrupt_in_running;
>> + atomic_t interrupt_in_done;
>
> what use are these atomic declarations?
good question.
I got this pattern from the use of write_busy in usb-skeleton.c .
I think it is a safe programming style for concurrently accessed
variables, but that it isn't strictly necessary if you only read
and set byte values.
> [..]
>> @@ -628,22 +740,23 @@ static void tower_interrupt_out_callback
>> {
>> struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
>>
>> - dbg(4," %s : enter, status %d", __func__, urb->status);
>> - lego_usb_tower_debug_data(5,__func__, urb->actual_length,
>> urb->transfer_buffer);
>> + dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
>> + lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length,
>> urb->transfer_buffer);
>>
>> if (urb->status != 0) {
>> - if ((urb->status != -ENOENT) &&
>> + if ((urb->status != -ENOENT) &&
>
> You should also check for ESHUTDOWN.
Ok, and also in the in callback I suppose
(and that should also be fixed in usb-skeleton, I'll send a patch).
Btw, are the error codes documented somewhere?
>> + dev->read_buffer_lock = SPIN_LOCK_UNLOCKED;
>
> Please use the macro.
Ok.
Thanks
J�rgen
--
J�rgen Stuber <[EMAIL PROTECTED]>
http://www.loria.fr/~stuber/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel