Am Samstag, 21. Februar 2004 01:08 schrieb Torrey Hoffman:
> Hello.
> 
> I've taken the old GATOS version of the ati_remote driver and done 
> some cleanup/rework of it while porting to 2.6 kernels.
> 
> This patch is against 2.6.3.  Comments or suggestions for improvement
> are welcome - my intent is to get the driver into 2.6. mainline soon.
> 
> Thanks,
> 
> Torrey Hoffman
> [EMAIL PROTECTED]
> 
+       ati_remote->send_flags |= SEND_FLAG_COMPLETE;
+       wmb();
+       if (waitqueue_active(&ati_remote->wait))
+               wake_up(&ati_remote->wait);

Do it unconditionally.

+       set_current_state(TASK_INTERRUPTIBLE);
+       add_wait_queue(&ati_remote->wait, &wait);
+
+       retval = usb_submit_urb(ati_remote->out_urb, GFP_KERNEL);

Must be GFP_ATOMIC. GFP_KERNEL may sleep and reset the current state
to TASK_RUNNING

+       input_unregister_device(&ati_remote->idev);
+
+       /* Mark device as unplugged */
+       ati_remote->present = 0;
+
+       /* If device is still open, ati_remote_close will call delete. */
+       if (!ati_remote->open)
+               ati_remote_delete(ati_remote);
+}

race condition with close(). Use a semaphore.
+/* Device initialization strings */
+static char init1[] = { 0x01, 0x00, 0x20, 0x14 };
+static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };

IMHO you need to copy this into a kmalloc buffer before use.

        HTH
                Oliver



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to