ChangeSet 1.850.1.2, 2002/10/29 15:27:28-08:00, [EMAIL PROTECTED]
[PATCH] [PATCH] fix a FIXME in usb.h
In ush.h, there's a FIXME for the URB transfer flags. This patch is
basically a global search and replace to change those all from USB_ to
URB_.
It touches a few things that aren't directly USB-related, and so should
probably be passed by those authors, but I figured i should put it here to
get feedback (ie: "No, moron, you did it all wrong!" or "Oops, that FIXME
wasn't supposed to be there") before bothering them.
diff -Nru a/Documentation/usb/URB.txt b/Documentation/usb/URB.txt
--- a/Documentation/usb/URB.txt Wed Oct 30 09:44:10 2002
+++ b/Documentation/usb/URB.txt Wed Oct 30 09:44:10 2002
@@ -109,7 +109,7 @@
Flags:
For ISO there are two startup behaviors: Specified start_frame or ASAP.
-For ASAP set USB_ISO_ASAP in transfer_flags.
+For ASAP set URB_ISO_ASAP in transfer_flags.
If short packets should NOT be tolerated, set URB_SHORT_NOT_OK in
transfer_flags.
@@ -156,7 +156,7 @@
with usb_free_urb().
There is also an asynchronous unlink mode. To use this, set the
-the USB_ASYNC_UNLINK flag in urb->transfer flags before calling
+the URB_ASYNC_UNLINK flag in urb->transfer flags before calling
usb_unlink_urb(). When using async unlinking, the URB will not
normally be unlinked when usb_unlink_urb() returns. Instead, wait
for the completion handler to be called.
diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
--- a/drivers/bluetooth/hci_usb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/bluetooth/hci_usb.c Wed Oct 30 09:44:10 2002
@@ -67,8 +67,8 @@
#endif
#ifndef CONFIG_BT_USB_ZERO_PACKET
-#undef USB_ZERO_PACKET
-#define USB_ZERO_PACKET 0
+#undef URB_ZERO_PACKET
+#define URB_ZERO_PACKET 0
#endif
static struct usb_driver hci_usb_driver;
@@ -330,7 +330,7 @@
usb_fill_bulk_urb(urb, husb->udev, pipe, skb->data, skb->len,
hci_usb_tx_complete, skb);
- urb->transfer_flags = USB_ZERO_PACKET;
+ urb->transfer_flags = URB_ZERO_PACKET;
BT_DBG("%s urb %p len %d", husb->hdev.name, urb, skb->len);
diff -Nru a/drivers/isdn/hisax/st5481_d.c b/drivers/isdn/hisax/st5481_d.c
--- a/drivers/isdn/hisax/st5481_d.c Wed Oct 30 09:44:10 2002
+++ b/drivers/isdn/hisax/st5481_d.c Wed Oct 30 09:44:10 2002
@@ -358,7 +358,7 @@
if (usb_submit_urb(urb, GFP_KERNEL) < 0) {
// There is another URB queued up
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
SUBMIT_URB(urb, GFP_KERNEL);
}
}
@@ -447,7 +447,7 @@
// Prepare the URB
urb->dev = adapter->usb_dev;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
DBG_ISO_PACKET(0x20,urb);
SUBMIT_URB(urb, GFP_KERNEL);
diff -Nru a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
--- a/drivers/isdn/hisax/st5481_usb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/isdn/hisax/st5481_usb.c Wed Oct 30 09:44:10 2002
@@ -409,7 +409,7 @@
urb->actual_length = 0;
urb->complete=complete;
urb->context=context;
- urb->transfer_flags=USB_ISO_ASAP;
+ urb->transfer_flags=URB_ISO_ASAP;
for (k = 0; k < num_packets; k++) {
urb->iso_frame_desc[k].offset = packet_size * k;
urb->iso_frame_desc[k].length = packet_size;
diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c
--- a/drivers/media/video/cpia_usb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/media/video/cpia_usb.c Wed Oct 30 09:44:10 2002
@@ -220,7 +220,7 @@
urb->dev = ucpia->dev;
urb->context = ucpia;
urb->pipe = usb_rcvisocpipe(ucpia->dev, 1);
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = ucpia->sbuf[0].data;
urb->complete = cpia_usb_complete;
urb->number_of_packets = FRAMES_PER_DESC;
@@ -242,7 +242,7 @@
urb->dev = ucpia->dev;
urb->context = ucpia;
urb->pipe = usb_rcvisocpipe(ucpia->dev, 1);
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = ucpia->sbuf[1].data;
urb->complete = cpia_usb_complete;
urb->number_of_packets = FRAMES_PER_DESC;
diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
--- a/drivers/net/irda/irda-usb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/net/irda/irda-usb.c Wed Oct 30 09:44:10 2002
@@ -41,7 +41,7 @@
* This driver has NOT been tested with the following drivers :
* o ehci-hcd (USB 2.0 controllers)
*
- * Note that all HCD drivers do USB_ZERO_PACKET and timeout properly,
+ * Note that all HCD drivers do URB_ZERO_PACKET and timeout properly,
* so we don't have to worry about that anymore.
* One common problem is the failure to set the address on the dongle,
* but this happens before the driver gets loaded...
@@ -270,7 +270,7 @@
frame, IRDA_USB_SPEED_MTU,
speed_bulk_callback, self);
urb->transfer_buffer_length = USB_IRDA_HEADER;
- urb->transfer_flags = USB_ASYNC_UNLINK;
+ urb->transfer_flags = URB_ASYNC_UNLINK;
urb->timeout = MSECS_TO_JIFFIES(100);
/* Irq disabled -> GFP_ATOMIC */
@@ -407,13 +407,13 @@
urb->transfer_buffer_length = skb->len;
/* Note : unlink *must* be Asynchronous because of the code in
* irda_usb_net_timeout() -> call in irq - Jean II */
- urb->transfer_flags = USB_ASYNC_UNLINK;
- /* This flag (USB_ZERO_PACKET) indicates that what we send is not
+ urb->transfer_flags = URB_ASYNC_UNLINK;
+ /* This flag (URB_ZERO_PACKET) indicates that what we send is not
* a continuous stream of data but separate packets.
* In this case, the USB layer will insert an empty USB frame (TD)
* after each of our packets that is exact multiple of the frame size.
* This is how the dongle will detect the end of packet - Jean II */
- urb->transfer_flags |= USB_ZERO_PACKET;
+ urb->transfer_flags |= URB_ZERO_PACKET;
/* Timeout need to be shorter than NET watchdog timer */
urb->timeout = MSECS_TO_JIFFIES(200);
@@ -634,7 +634,7 @@
* be -ENOENT. We will fix that at the next watchdog,
* leaving more time to USB to recover...
* Also, we are in interrupt, so we need to have
- * USB_ASYNC_UNLINK to work properly...
+ * URB_ASYNC_UNLINK to work properly...
* Jean II */
done = 1;
break;
@@ -1016,9 +1016,9 @@
}
}
/* Cancel Tx and speed URB - need to be synchronous to avoid races */
- self->tx_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb);
- self->speed_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb);
/* Stop and remove instance of IrLAP */
@@ -1573,9 +1573,9 @@
usb_unlink_urb(self->rx_urb[i]);
/* Cancel Tx and speed URB.
* Toggle flags to make sure it's synchronous. */
- self->tx_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->tx_urb);
- self->speed_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(self->speed_urb);
}
diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
--- a/drivers/usb/class/audio.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/class/audio.c Wed Oct 30 09:44:10 2002
@@ -1049,7 +1049,7 @@
urb = u->durb[0].urb;
urb->dev = dev;
urb->pipe = u->datapipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = DESCFRAMES;
urb->context = as;
urb->complete = usbin_completed;
@@ -1062,7 +1062,7 @@
urb = u->durb[1].urb;
urb->dev = dev;
urb->pipe = u->datapipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = DESCFRAMES;
urb->context = as;
urb->complete = usbin_completed;
@@ -1076,7 +1076,7 @@
urb = u->surb[0].urb;
urb->dev = dev;
urb->pipe = u->syncpipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = SYNCFRAMES;
urb->context = as;
urb->complete = usbin_sync_completed;
@@ -1090,7 +1090,7 @@
urb = u->surb[1].urb;
urb->dev = dev;
urb->pipe = u->syncpipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = SYNCFRAMES;
urb->context = as;
urb->complete = usbin_sync_completed;
@@ -1416,7 +1416,7 @@
urb = u->durb[0].urb;
urb->dev = dev;
urb->pipe = u->datapipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = DESCFRAMES;
urb->context = as;
urb->complete = usbout_completed;
@@ -1429,7 +1429,7 @@
urb = u->durb[1].urb;
urb->dev = dev;
urb->pipe = u->datapipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = DESCFRAMES;
urb->context = as;
urb->complete = usbout_completed;
@@ -1443,7 +1443,7 @@
urb = u->surb[0].urb;
urb->dev = dev;
urb->pipe = u->syncpipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = SYNCFRAMES;
urb->context = as;
urb->complete = usbout_sync_completed;
@@ -1457,7 +1457,7 @@
urb = u->surb[1].urb;
urb->dev = dev;
urb->pipe = u->syncpipe;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->number_of_packets = SYNCFRAMES;
urb->context = as;
urb->complete = usbout_sync_completed;
diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
--- a/drivers/usb/class/cdc-acm.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/class/cdc-acm.c Wed Oct 30 09:44:10 2002
@@ -630,11 +630,11 @@
usb_fill_bulk_urb(acm->readurb, dev, usb_rcvbulkpipe(dev,
epread->bEndpointAddress),
buf += ctrlsize, readsize, acm_read_bulk, acm);
- acm->readurb->transfer_flags |= USB_NO_FSBR;
+ acm->readurb->transfer_flags |= URB_NO_FSBR;
usb_fill_bulk_urb(acm->writeurb, dev, usb_sndbulkpipe(dev,
epwrite->bEndpointAddress),
buf += readsize, acm->writesize, acm_write_bulk, acm);
- acm->writeurb->transfer_flags |= USB_NO_FSBR;
+ acm->writeurb->transfer_flags |= URB_NO_FSBR;
info("ttyACM%d: USB ACM device", minor);
diff -Nru a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
--- a/drivers/usb/core/devio.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/core/devio.c Wed Oct 30 09:44:10 2002
@@ -755,7 +755,7 @@
if (copy_from_user(&uurb, arg, sizeof(uurb)))
return -EFAULT;
if (uurb.flags & ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_URB_SHORT_NOT_OK|
- USB_NO_FSBR|USB_ZERO_PACKET))
+ URB_NO_FSBR|URB_ZERO_PACKET))
return -EINVAL;
if (!uurb.buffer)
return -EINVAL;
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/core/hcd.c Wed Oct 30 09:44:10 2002
@@ -1110,7 +1110,7 @@
*/
spin_lock_irqsave (&urb->lock, flags);
spin_lock (&hcd_data_lock);
- if (!urb->hcpriv || urb->transfer_flags & USB_TIMEOUT_KILLED) {
+ if (!urb->hcpriv || urb->transfer_flags & URB_TIMEOUT_KILLED) {
retval = -EINVAL;
goto done;
}
@@ -1182,13 +1182,13 @@
}
/* block till giveback, if needed */
- if (!(urb->transfer_flags & (USB_ASYNC_UNLINK|USB_TIMEOUT_KILLED))
+ if (!(urb->transfer_flags & (URB_ASYNC_UNLINK|URB_TIMEOUT_KILLED))
&& HCD_IS_RUNNING (hcd->state)
&& !retval) {
dbg ("%s: wait for giveback urb %p",
hcd->self.bus_name, urb);
wait_for_completion (&splice.done);
- } else if ((urb->transfer_flags & USB_ASYNC_UNLINK) && retval == 0) {
+ } else if ((urb->transfer_flags & URB_ASYNC_UNLINK) && retval == 0) {
return -EINPROGRESS;
}
goto bye;
diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/core/message.c Wed Oct 30 09:44:10 2002
@@ -324,7 +324,7 @@
if (!io->urbs)
goto nomem;
- urb_flags = USB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT;
+ urb_flags = URB_ASYNC_UNLINK | URB_NO_DMA_MAP | URB_NO_INTERRUPT;
if (usb_pipein (pipe))
urb_flags |= URB_SHORT_NOT_OK;
diff -Nru a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
--- a/drivers/usb/core/urb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/core/urb.c Wed Oct 30 09:44:10 2002
@@ -272,23 +272,23 @@
unsigned int allowed;
/* enforce simple/standard policy */
- allowed = USB_ASYNC_UNLINK; // affects later unlinks
+ allowed = URB_ASYNC_UNLINK; // affects later unlinks
allowed |= URB_NO_DMA_MAP;
allowed |= URB_NO_INTERRUPT;
switch (temp) {
case PIPE_BULK:
if (is_out)
- allowed |= USB_ZERO_PACKET;
+ allowed |= URB_ZERO_PACKET;
/* FALLTHROUGH */
case PIPE_CONTROL:
- allowed |= USB_NO_FSBR; /* only affects UHCI */
+ allowed |= URB_NO_FSBR; /* only affects UHCI */
/* FALLTHROUGH */
default: /* all non-iso endpoints */
if (!is_out)
allowed |= URB_SHORT_NOT_OK;
break;
case PIPE_ISOCHRONOUS:
- allowed |= USB_ISO_ASAP;
+ allowed |= URB_ISO_ASAP;
break;
}
urb->transfer_flags &= allowed;
@@ -360,7 +360,7 @@
* that the request has been canceled, and that control of the URB
* has been returned to that device driver.
*
- * When the USB_ASYNC_UNLINK transfer flag for the URB is clear, this
+ * When the URB_ASYNC_UNLINK transfer flag for the URB is clear, this
* request is synchronous. Success is indicated by returning zero,
* at which time the urb will have been unlinked,
* and the completion function will see status -ENOENT. Failure is
@@ -368,7 +368,7 @@
* when unlinking an urb from an interrupt context, such as a bottom
* half or a completion handler,
*
- * When the USB_ASYNC_UNLINK transfer flag for the URB is set, this
+ * When the URB_ASYNC_UNLINK transfer flag for the URB is set, this
* request is asynchronous. Success is indicated by returning -EINPROGRESS,
* at which time the urb will normally not have been unlinked,
* and the completion function will see status -ECONNRESET. Failure is
diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/ehci-q.c Wed Oct 30 09:44:10 2002
@@ -463,7 +463,7 @@
token ^= 0x0100; /* "in" <--> "out" */
token |= QTD_TOGGLE; /* force DATA1 */
} else if (usb_pipebulk (urb->pipe)
- && (urb->transfer_flags & USB_ZERO_PACKET)
+ && (urb->transfer_flags & URB_ZERO_PACKET)
&& !(urb->transfer_buffer_length % maxpacket)) {
one_more = 1;
}
diff -Nru a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/ehci-sched.c Wed Oct 30 09:44:10 2002
@@ -738,7 +738,7 @@
}
/* explicit start frame? */
- if (!(urb->transfer_flags & USB_ISO_ASAP)) {
+ if (!(urb->transfer_flags & URB_ISO_ASAP)) {
unsigned temp;
/* sanity check: must be in range */
diff -Nru a/drivers/usb/host/hc_simple.c b/drivers/usb/host/hc_simple.c
--- a/drivers/usb/host/hc_simple.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/hc_simple.c Wed Oct 30 09:44:10 2002
@@ -219,7 +219,7 @@
if (!list_empty (&urb->urb_list) && urb->status == -EINPROGRESS) {
/* URB active? */
- if (urb->transfer_flags & (USB_ASYNC_UNLINK | USB_TIMEOUT_KILLED)) {
+ if (urb->transfer_flags & (URB_ASYNC_UNLINK | URB_TIMEOUT_KILLED)) {
/* asynchronous with callback */
/* relink the urb to the del list */
list_move (&urb->urb_list, &hci->del_list);
@@ -251,7 +251,7 @@
/* hcd does not own URB but we keep the driver happy anyway */
spin_unlock_irqrestore (&usb_urb_lock, flags);
- if (urb->complete && (urb->transfer_flags & USB_ASYNC_UNLINK)) {
+ if (urb->complete && (urb->transfer_flags & URB_ASYNC_UNLINK)) {
urb->status = -ENOENT;
urb->actual_length = 0;
urb->complete (urb);
@@ -388,7 +388,7 @@
struct urb *urb = (struct urb *) lurb;
DBGFUNC ("enter qu_urb_timeout\n");
- urb->transfer_flags |= USB_TIMEOUT_KILLED;
+ urb->transfer_flags |= URB_TIMEOUT_KILLED;
hci_unlink_urb (urb);
}
#endif
@@ -472,7 +472,7 @@
case PIPE_BULK:
list_add (&urb->urb_list, &hci->bulk_list);
- if ((urb->transfer_flags & USB_ZERO_PACKET)
+ if ((urb->transfer_flags & URB_ZERO_PACKET)
&& urb->transfer_buffer_length > 0
&&
((urb->transfer_buffer_length %
@@ -523,7 +523,7 @@
/* for ISOC transfers calculate start frame index */
- if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & USB_ISO_ASAP) {
+ if (usb_pipeisoc (urb->pipe) && urb->transfer_flags & URB_ISO_ASAP) {
urb->start_frame = ((ed->pipe_head) ? (ed->last_iso + 1) :
hci_get_current_frame_number (urb-> dev) + 1) & 0xffff;
}
diff -Nru a/drivers/usb/host/hc_sl811_rh.c b/drivers/usb/host/hc_sl811_rh.c
--- a/drivers/usb/host/hc_sl811_rh.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/hc_sl811_rh.c Wed Oct 30 09:44:10 2002
@@ -534,7 +534,7 @@
urb->hcpriv = NULL;
usb_put_dev (urb->dev);
urb->dev = NULL;
- if (urb->transfer_flags & USB_ASYNC_UNLINK) {
+ if (urb->transfer_flags & URB_ASYNC_UNLINK) {
urb->status = -ECONNRESET;
if (urb->complete) {
urb->complete (urb);
diff -Nru a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
--- a/drivers/usb/host/ohci-hcd.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/ohci-hcd.c Wed Oct 30 09:44:10 2002
@@ -29,7 +29,7 @@
*
* 2001/10/18 merge pmac cleanup (Benjamin Herrenschmidt) and bugfixes
* from post-2.4.5 patches.
- * 2001/09/20 USB_ZERO_PACKET support; hcca_dma portability, OPTi warning
+ * 2001/09/20 URB_ZERO_PACKET support; hcca_dma portability, OPTi warning
* 2001/09/07 match PCI PM changes, errnos from Linus' tree
* 2001/05/05 fork 2.4.5 version into "hcd" framework, cleanup, simplify;
* pbook pci quirks gone (please fix pbook pci sw!) (db)
@@ -185,7 +185,7 @@
/* ... and maybe a zero length packet to wrap it up */
if (size == 0)
size++;
- else if ((urb->transfer_flags & USB_ZERO_PACKET) != 0
+ else if ((urb->transfer_flags & URB_ZERO_PACKET) != 0
&& (urb->transfer_buffer_length
% usb_maxpacket (urb->dev, pipe,
usb_pipeout (pipe))) == 0)
@@ -239,7 +239,7 @@
frame |= ed->branch;
urb->start_frame = frame;
- /* yes, only USB_ISO_ASAP is supported, and
+ /* yes, only URB_ISO_ASAP is supported, and
* urb->start_frame is never used as input.
*/
}
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/ohci-q.c Wed Oct 30 09:44:10 2002
@@ -575,7 +575,7 @@
info |= TD_R;
td_fill (info, data, data_len, urb, cnt);
cnt++;
- if ((urb->transfer_flags & USB_ZERO_PACKET)
+ if ((urb->transfer_flags & URB_ZERO_PACKET)
&& cnt < urb_priv->length) {
td_fill (info, 0, 0, urb, cnt);
cnt++;
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/host/uhci-hcd.c Wed Oct 30 09:44:10 2002
@@ -739,7 +739,7 @@
spin_lock_irqsave(&uhci->frame_list_lock, flags);
- if ((!(urb->transfer_flags & USB_NO_FSBR)) && !urbp->fsbr) {
+ if ((!(urb->transfer_flags & URB_NO_FSBR)) && !urbp->fsbr) {
urbp->fsbr = 1;
if (!uhci->fsbr++ && !uhci->fsbrtimeout)
uhci->skel_term_qh->link =
cpu_to_le32(uhci->skel_hs_control_qh->dma_handle) | UHCI_PTR_QH;
@@ -755,7 +755,7 @@
spin_lock_irqsave(&uhci->frame_list_lock, flags);
- if ((!(urb->transfer_flags & USB_NO_FSBR)) && urbp->fsbr) {
+ if ((!(urb->transfer_flags & URB_NO_FSBR)) && urbp->fsbr) {
urbp->fsbr = 0;
if (!--uhci->fsbr)
uhci->fsbrtimeout = jiffies + FSBR_DELAY;
@@ -1124,13 +1124,13 @@
} while (len > 0);
/*
- * USB_ZERO_PACKET means adding a 0-length packet, if direction
+ * URB_ZERO_PACKET means adding a 0-length packet, if direction
* is OUT and the transfer_length was an exact multiple of maxsze,
* hence (len = transfer_length - N * maxsze) == 0
* however, if transfer_length == 0, the zero packet was already
* prepared above.
*/
- if (usb_pipeout(urb->pipe) && (urb->transfer_flags & USB_ZERO_PACKET) &&
+ if (usb_pipeout(urb->pipe) && (urb->transfer_flags & URB_ZERO_PACKET) &&
!len && urb->transfer_buffer_length) {
td = uhci_alloc_td(uhci, urb->dev);
if (!td)
@@ -1306,7 +1306,7 @@
limits = isochronous_find_limits(uhci, urb, &start, &end);
- if (urb->transfer_flags & USB_ISO_ASAP) {
+ if (urb->transfer_flags & URB_ISO_ASAP) {
if (limits) {
int curframe;
@@ -1752,7 +1752,7 @@
tmp = tmp->next;
- u->transfer_flags |= USB_TIMEOUT_KILLED;
+ u->transfer_flags |= URB_TIMEOUT_KILLED;
uhci_urb_dequeue(hcd, u);
}
diff -Nru a/drivers/usb/media/dabusb.c b/drivers/usb/media/dabusb.c
--- a/drivers/usb/media/dabusb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/media/dabusb.c Wed Oct 30 09:44:10 2002
@@ -251,7 +251,7 @@
b->purb->context = b;
b->purb->dev = s->usbdev;
b->purb->pipe = pipe;
- b->purb->transfer_flags = USB_ISO_ASAP;
+ b->purb->transfer_flags = URB_ISO_ASAP;
for (i = 0; i < packets; i++) {
b->purb->iso_frame_desc[i].offset = i * pipesize;
diff -Nru a/drivers/usb/media/konicawc.c b/drivers/usb/media/konicawc.c
--- a/drivers/usb/media/konicawc.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/media/konicawc.c Wed Oct 30 09:44:10 2002
@@ -408,7 +408,7 @@
urb->context = uvd;
urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
urb->interval = 1;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = uvd->sbuf[i].data;
urb->complete = konicawc_isoc_irq;
urb->number_of_packets = FRAMES_PER_DESC;
@@ -423,7 +423,7 @@
urb->context = uvd;
urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp-1);
urb->interval = 1;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = cam->sts_buf[i];
urb->complete = konicawc_isoc_irq;
urb->number_of_packets = FRAMES_PER_DESC;
diff -Nru a/drivers/usb/media/ov511.c b/drivers/usb/media/ov511.c
--- a/drivers/usb/media/ov511.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/media/ov511.c Wed Oct 30 09:44:10 2002
@@ -3949,7 +3949,7 @@
urb->dev = ov->dev;
urb->context = &ov->sbuf[n];
urb->pipe = usb_rcvisocpipe(ov->dev, OV511_ENDPOINT_ADDRESS);
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = ov->sbuf[n].data;
urb->complete = ov51x_isoc_irq;
urb->number_of_packets = FRAMES_PER_DESC;
diff -Nru a/drivers/usb/media/pwc-if.c b/drivers/usb/media/pwc-if.c
--- a/drivers/usb/media/pwc-if.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/media/pwc-if.c Wed Oct 30 09:44:10 2002
@@ -821,7 +821,7 @@
urb->interval = 1; // devik
urb->dev = udev;
urb->pipe = usb_rcvisocpipe(udev, pdev->vendpoint);
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = pdev->sbuf[i].data;
urb->transfer_buffer_length = ISO_BUFFER_SIZE;
urb->complete = pwc_isoc_handler;
diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c
--- a/drivers/usb/media/usbvideo.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/media/usbvideo.c Wed Oct 30 09:44:10 2002
@@ -1914,7 +1914,7 @@
urb->context = uvd;
urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp);
urb->interval = 1;
- urb->transfer_flags = USB_ISO_ASAP;
+ urb->transfer_flags = URB_ISO_ASAP;
urb->transfer_buffer = uvd->sbuf[i].data;
urb->complete = usbvideo_IsocIrq;
urb->number_of_packets = FRAMES_PER_DESC;
diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
--- a/drivers/usb/misc/auerswald.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/misc/auerswald.c Wed Oct 30 09:44:10 2002
@@ -445,7 +445,7 @@
/* cancel an urb which is submitted to the chain
the result is 0 if the urb is cancelled, or -EINPROGRESS if
- USB_ASYNC_UNLINK is set and the function is successfully started.
+ URB_ASYNC_UNLINK is set and the function is successfully started.
*/
static int auerchain_unlink_urb (pauerchain_t acp, struct urb * urb)
{
@@ -534,7 +534,7 @@
acep = acp->active;
if (acep) {
urbp = acep->urbp;
- urbp->transfer_flags &= ~USB_ASYNC_UNLINK;
+ urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
dbg ("unlink active urb");
usb_unlink_urb (urbp);
}
diff -Nru a/drivers/usb/net/catc.c b/drivers/usb/net/catc.c
--- a/drivers/usb/net/catc.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/catc.c Wed Oct 30 09:44:10 2002
@@ -381,7 +381,7 @@
if (urb->status == -ECONNRESET) {
dbg("Tx Reset.");
- urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ urb->transfer_flags &= ~URB_ASYNC_UNLINK;
urb->status = 0;
catc->netdev->trans_start = jiffies;
catc->stats.tx_errors++;
@@ -443,7 +443,7 @@
struct catc *catc = netdev->priv;
warn("Transmit timed out.");
- catc->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ catc->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(catc->tx_urb);
}
diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c
--- a/drivers/usb/net/cdc-ether.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/cdc-ether.c Wed Oct 30 09:44:10 2002
@@ -259,7 +259,7 @@
warn("%s: Tx timed out.", net->name);
// Tear the waiting frame off the list
- ether_dev->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ ether_dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb( ether_dev->tx_urb );
// Update statistics
diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
--- a/drivers/usb/net/kaweth.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/kaweth.c Wed Oct 30 09:44:10 2002
@@ -760,7 +760,7 @@
kaweth_usb_transmit_complete,
kaweth);
kaweth->end = 0;
- kaweth->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ kaweth->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
if((res = usb_submit_urb(kaweth->tx_urb, GFP_ATOMIC)))
{
diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
--- a/drivers/usb/net/pegasus.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/pegasus.c Wed Oct 30 09:44:10 2002
@@ -718,7 +718,7 @@
return;
warn("%s: Tx timed out.", net->name);
- pegasus->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ pegasus->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(pegasus->tx_urb);
pegasus->stats.tx_errors++;
}
diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
--- a/drivers/usb/net/rtl8150.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/rtl8150.c Wed Oct 30 09:44:10 2002
@@ -573,7 +573,7 @@
if (!dev)
return;
warn("%s: Tx timeout.", netdev->name);
- dev->tx_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ dev->tx_urb->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(dev->tx_urb);
dev->stats.tx_errors++;
}
diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
--- a/drivers/usb/net/usbnet.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/net/usbnet.c Wed Oct 30 09:44:10 2002
@@ -1475,11 +1475,11 @@
usb_fill_bulk_urb (urb, dev->udev,
usb_rcvbulkpipe (dev->udev, dev->driver_info->in),
skb->data, size, rx_complete, skb);
- urb->transfer_flags |= USB_ASYNC_UNLINK;
+ urb->transfer_flags |= URB_ASYNC_UNLINK;
#if 0
// Idle-but-posted reads with UHCI really chew up
// PCI bandwidth unless FSBR is disabled
- urb->transfer_flags |= USB_NO_FSBR;
+ urb->transfer_flags |= URB_NO_FSBR;
#endif
spin_lock_irqsave (&dev->rxq.lock, lockflags);
diff -Nru a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
--- a/drivers/usb/serial/ir-usb.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/serial/ir-usb.c Wed Oct 30 09:44:10 2002
@@ -395,7 +395,7 @@
ir_write_bulk_callback,
port);
- port->write_urb->transfer_flags = USB_ZERO_PACKET;
+ port->write_urb->transfer_flags = URB_ZERO_PACKET;
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
@@ -597,7 +597,7 @@
ir_write_bulk_callback,
port);
- port->write_urb->transfer_flags = USB_ZERO_PACKET;
+ port->write_urb->transfer_flags = URB_ZERO_PACKET;
result = usb_submit_urb (port->write_urb, GFP_KERNEL);
if (result)
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/serial/keyspan.c Wed Oct 30 09:44:10 2002
@@ -344,11 +344,11 @@
dbg("%s - endpoint %d flip %d", __FUNCTION__,
usb_pipeendpoint(this_urb->pipe), flip);
if (this_urb->status == -EINPROGRESS) {
- if (this_urb->transfer_flags & USB_ASYNC_UNLINK)
+ if (this_urb->transfer_flags & URB_ASYNC_UNLINK)
break;
if (jiffies - p_priv->tx_start_time[flip] < 10 * HZ)
break;
- this_urb->transfer_flags |= USB_ASYNC_UNLINK;
+ this_urb->transfer_flags |= URB_ASYNC_UNLINK;
usb_unlink_urb(this_urb);
break;
}
@@ -368,7 +368,7 @@
/* send the data out the bulk port */
this_urb->transfer_buffer_length = todo + 1;
- this_urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ this_urb->transfer_flags &= ~URB_ASYNC_UNLINK;
this_urb->dev = port->serial->dev;
if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
dbg("usb_submit_urb(write bulk) failed (%d)", err);
@@ -912,7 +912,7 @@
static inline void stop_urb(struct urb *urb)
{
if (urb && urb->status == -EINPROGRESS) {
- urb->transfer_flags &= ~USB_ASYNC_UNLINK;
+ urb->transfer_flags &= ~URB_ASYNC_UNLINK;
usb_unlink_urb(urb);
}
}
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c Wed Oct 30 09:44:10 2002
+++ b/drivers/usb/storage/transport.c Wed Oct 30 09:44:10 2002
@@ -381,7 +381,7 @@
* before the submission or before setting the CAN_CANCEL bit. If so, it's
* essential to abort the URB if it hasn't been cancelled already (i.e.,
* if the CAN_CANCEL bit is still set). Either way, the function must then
- * wait for the URB to finish. Note that because the USB_ASYNC_UNLINK flag
+ * wait for the URB to finish. Note that because the URB_ASYNC_UNLINK flag
* is set, the URB can still be in progress even after a call to
* usb_unlink_urb() returns.
*
@@ -426,7 +426,7 @@
us->current_urb->context = &urb_done;
us->current_urb->actual_length = 0;
us->current_urb->error_count = 0;
- us->current_urb->transfer_flags = USB_ASYNC_UNLINK;
+ us->current_urb->transfer_flags = URB_ASYNC_UNLINK;
/* submit the URB */
status = usb_submit_urb(us->current_urb, GFP_NOIO);
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h Wed Oct 30 09:44:10 2002
+++ b/include/linux/usb.h Wed Oct 30 09:44:10 2002
@@ -560,17 +560,15 @@
/*
* urb->transfer_flags:
- *
- * FIXME should _all_ be URB_* flags
*/
#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */
-#define USB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */
+#define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */
#define URB_NO_DMA_MAP 0x0004 /* urb->*_dma are valid on submit */
-#define USB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */
-#define USB_NO_FSBR 0x0020 /* UHCI-specific */
-#define USB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet
*/
+#define URB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */
+#define URB_NO_FSBR 0x0020 /* UHCI-specific */
+#define URB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet
+*/
#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt needed */
-#define USB_TIMEOUT_KILLED 0x1000 /* only set by HCD! */
+#define URB_TIMEOUT_KILLED 0x1000 /* only set by HCD! */
struct usb_iso_packet_descriptor {
unsigned int offset;
@@ -674,7 +672,7 @@
*
* All URBs submitted must initialize dev, pipe,
* transfer_flags (may be zero), complete, timeout (may be zero).
- * The USB_ASYNC_UNLINK transfer flag affects later invocations of
+ * The URB_ASYNC_UNLINK transfer flag affects later invocations of
* the usb_unlink_urb() routine.
*
* All URBs must also initialize
@@ -683,7 +681,7 @@
* to be treated as errors; that flag is invalid for write requests.
*
* Bulk URBs may
- * use the USB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
+ * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
* should always terminate with a short packet, even if it means adding an
* extra zero length packet.
*
@@ -700,7 +698,7 @@
* endpoints, as well as high speed interrupt endpoints, the encoding of
* the transfer interval in the endpoint descriptor is logarithmic.)
*
- * Isochronous URBs normally use the USB_ISO_ASAP transfer flag, telling
+ * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling
* the host controller to schedule the transfer as soon as bandwidth
* utilization allows, and then set start_frame to reflect the actual frame
* selected during submission. Otherwise drivers must specify the start_frame
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c Wed Oct 30 09:44:10 2002
+++ b/sound/usb/usbaudio.c Wed Oct 30 09:44:10 2002
@@ -82,7 +82,7 @@
/* #define SND_USE_ASYNC_UNLINK */
#ifdef SND_USB_ASYNC_UNLINK
-#define UNLINK_FLAGS USB_ASYNC_UNLINK
+#define UNLINK_FLAGS URB_ASYNC_UNLINK
#else
#define UNLINK_FLAGS 0
#endif
@@ -867,7 +867,7 @@
}
u->urb->dev = subs->dev;
u->urb->pipe = subs->datapipe;
- u->urb->transfer_flags = USB_ISO_ASAP | UNLINK_FLAGS;
+ u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
u->urb->number_of_packets = u->packets;
u->urb->context = u;
u->urb->complete = snd_complete_urb;
@@ -889,7 +889,7 @@
u->urb->transfer_buffer_length = NRPACKS * 3;
u->urb->dev = subs->dev;
u->urb->pipe = subs->syncpipe;
- u->urb->transfer_flags = USB_ISO_ASAP | UNLINK_FLAGS;
+ u->urb->transfer_flags = URB_ISO_ASAP | UNLINK_FLAGS;
u->urb->number_of_packets = u->packets;
u->urb->context = u;
u->urb->complete = snd_complete_sync_urb;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel