vserver 1.9.3
[linux-2.6.git] / drivers / usb / host / uhci-hcd.c
index bf8ab3c..20a42f9 100644 (file)
@@ -82,7 +82,7 @@ static int debug = 1;
 #else
 static int debug = 0;
 #endif
-MODULE_PARM(debug, "i");
+module_param(debug, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Debug level");
 static char *errbuf;
 #define ERRBUF_LEN    (32 * 1024)
@@ -232,7 +232,7 @@ static void uhci_remove_td(struct uhci_hcd *uhci, struct uhci_td *td)
 /*
  * Inserts a td into qh list at the top.
  */
-static void uhci_insert_tds_in_qh(struct uhci_qh *qh, struct urb *urb, u32 breadth)
+static void uhci_insert_tds_in_qh(struct uhci_qh *qh, struct urb *urb, __le32 breadth)
 {
        struct list_head *tmp, *head;
        struct urb_priv *urbp = (struct urb_priv *)urb->hcpriv;
@@ -376,7 +376,7 @@ static void uhci_insert_qh(struct uhci_hcd *uhci, struct uhci_qh *skelqh, struct
 static void uhci_remove_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
 {
        struct uhci_qh *pqh;
-       u32 newlink;
+       __le32 newlink;
        unsigned int age;
 
        if (!qh)
@@ -1120,10 +1120,6 @@ static int uhci_result_common(struct uhci_hcd *uhci, struct urb *urb)
 
 td_error:
        ret = uhci_map_status(status, uhci_packetout(td_token(td)));
-       if (ret == -EPIPE)
-               /* endpoint has stalled - mark it halted */
-               usb_endpoint_halt(urb->dev, uhci_endpoint(td_token(td)),
-                               uhci_packetout(td_token(td)));
 
 err:
        /* 
@@ -1344,7 +1340,7 @@ static struct urb *uhci_find_urb_ep(struct uhci_hcd *uhci, struct urb *urb)
 
 static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags)
 {
-       int ret = -EINVAL;
+       int ret;
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
        unsigned long flags;
        struct urb *eurb;
@@ -1352,7 +1348,8 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags)
 
        spin_lock_irqsave(&uhci->schedule_lock, flags);
 
-       if (urb->status != -EINPROGRESS)        /* URB already unlinked! */
+       ret = urb->status;
+       if (ret != -EINPROGRESS)                /* URB already unlinked! */
                goto out;
 
        eurb = uhci_find_urb_ep(uhci, urb);
@@ -1637,13 +1634,6 @@ static void stall_callback(unsigned long ptr)
                if (up->fsbr && !up->fsbr_timeout && time_after_eq(jiffies, up->fsbrtime + IDLE_TIMEOUT))
                        uhci_fsbr_timeout(uhci, u);
 
-               /* Check if the URB timed out */
-               if (u->timeout && u->status == -EINPROGRESS &&
-                       time_after_eq(jiffies, up->inserttime + u->timeout)) {
-                       u->status = -ETIMEDOUT;
-                       list_move_tail(&up->urb_list, &list);
-               }
-
                spin_unlock(&u->lock);
        }
        spin_unlock_irqrestore(&uhci->schedule_lock, flags);
@@ -2258,7 +2248,8 @@ static int uhci_start(struct usb_hcd *hcd)
                        irq = 7;
 
                /* Only place we don't use the frame list routines */
-               uhci->fl->frame[i] = cpu_to_le32(uhci->skelqh[irq]->dma_handle);
+               uhci->fl->frame[i] = UHCI_PTR_QH |
+                               cpu_to_le32(uhci->skelqh[irq]->dma_handle);
        }
 
        /*