aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-07-29 16:11:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 19:23:04 -0400
commitb375a0495fd622037560c73c05f23ae6f127bb0c (patch)
tree7f800cfd288480625e6e9886b51aa6d159a1548e /drivers/usb/misc
parenta4e628328ec60873fec9d506d682155391f589ce (diff)
[PATCH] USB: URB_ASYNC_UNLINK flag removed from the kernel
29 July 2005, Cambridge, MA: This afternoon Alan Stern submitted a patch to remove the URB_ASYNC_UNLINK flag from the Linux kernel. Mr. Stern explained, "This flag is a relic from an earlier, less-well-designed system. For over a year it hasn't been used for anything other than printing warning messages." An anonymous spokesman for the Linux kernel development community commented, "This is exactly the sort of thing we see happening all the time. As the kernel evolves, support for old techniques and old code can be jettisoned and replaced by newer, better approaches. Proprietary operating systems do not have the freedom or flexibility to change so quickly." Mr. Stern, a staff member at Harvard University's Rowland Institute who works on Linux only as a hobby, noted that the patch (labelled as548) did not update two files, keyspan.c and option.c, in the USB drivers' "serial" subdirectory. "Those files need more extensive changes," he remarked. "They examine the status field of several URBs at times when they're not supposed to. That will need to be fixed before the URB_ASYNC_UNLINK flag is removed." Greg Kroah-Hartman, the kernel maintainer responsible for overseeing all of Linux's USB drivers, did not respond to our inquiries or return our calls. His only comment was "Applied, thanks." Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/auerswald.c3
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb.c4
-rw-r--r--drivers/usb/misc/usbtest.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 6f7994f5a714..ae4681f9f0ea 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -426,7 +426,7 @@ static int auerchain_submit_urb (pauerchain_t acp, struct urb * urb)
426 426
427/* cancel an urb which is submitted to the chain 427/* cancel an urb which is submitted to the chain
428 the result is 0 if the urb is cancelled, or -EINPROGRESS if 428 the result is 0 if the urb is cancelled, or -EINPROGRESS if
429 URB_ASYNC_UNLINK is set and the function is successfully started. 429 the function is successfully started.
430*/ 430*/
431static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb) 431static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
432{ 432{
@@ -515,7 +515,6 @@ static void auerchain_unlink_all (pauerchain_t acp)
515 acep = acp->active; 515 acep = acp->active;
516 if (acep) { 516 if (acep) {
517 urbp = acep->urbp; 517 urbp = acep->urbp;
518 urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
519 dbg ("unlink active urb"); 518 dbg ("unlink active urb");
520 usb_kill_urb (urbp); 519 usb_kill_urb (urbp);
521 } 520 }
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 2fd12264fd53..d63ce6c030f3 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -229,7 +229,7 @@ sisusb_bulkout_msg(struct sisusb_usb_data *sisusb, int index, unsigned int pipe,
229 usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len, 229 usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len,
230 sisusb_bulk_completeout, &sisusb->urbout_context[index]); 230 sisusb_bulk_completeout, &sisusb->urbout_context[index]);
231 231
232 urb->transfer_flags |= (tflags | URB_ASYNC_UNLINK); 232 urb->transfer_flags |= tflags;
233 urb->actual_length = 0; 233 urb->actual_length = 0;
234 234
235 if ((urb->transfer_dma = transfer_dma)) 235 if ((urb->transfer_dma = transfer_dma))
@@ -295,7 +295,7 @@ sisusb_bulkin_msg(struct sisusb_usb_data *sisusb, unsigned int pipe, void *data,
295 usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len, 295 usb_fill_bulk_urb(urb, sisusb->sisusb_dev, pipe, data, len,
296 sisusb_bulk_completein, sisusb); 296 sisusb_bulk_completein, sisusb);
297 297
298 urb->transfer_flags |= (tflags | URB_ASYNC_UNLINK); 298 urb->transfer_flags |= tflags;
299 urb->actual_length = 0; 299 urb->actual_length = 0;
300 300
301 if ((urb->transfer_dma = transfer_dma)) 301 if ((urb->transfer_dma = transfer_dma))
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index fd7fb98e4b20..54799eb0bc60 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -986,7 +986,6 @@ test_ctrl_queue (struct usbtest_dev *dev, struct usbtest_param *param)
986 986
987 u->context = &context; 987 u->context = &context;
988 u->complete = ctrl_complete; 988 u->complete = ctrl_complete;
989 u->transfer_flags |= URB_ASYNC_UNLINK;
990 } 989 }
991 990
992 /* queue the urbs */ 991 /* queue the urbs */
@@ -1052,7 +1051,6 @@ static int unlink1 (struct usbtest_dev *dev, int pipe, int size, int async)
1052 urb = simple_alloc_urb (testdev_to_usbdev (dev), pipe, size); 1051 urb = simple_alloc_urb (testdev_to_usbdev (dev), pipe, size);
1053 if (!urb) 1052 if (!urb)
1054 return -ENOMEM; 1053 return -ENOMEM;
1055 urb->transfer_flags |= URB_ASYNC_UNLINK;
1056 urb->context = &completion; 1054 urb->context = &completion;
1057 urb->complete = unlink1_callback; 1055 urb->complete = unlink1_callback;
1058 1056