Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / usb / host / uhci-debug.c
index d1372cb..e123931 100644 (file)
@@ -9,6 +9,7 @@
  * (C) Copyright 1999-2001 Johannes Erdfelt
  */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/debugfs.h>
 #include <linux/smp_lock.h>
@@ -97,7 +98,6 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
        char *out = buf;
        struct uhci_td *td;
        int i, nactive, ninactive;
-       char *ptype;
 
        if (len < 200)
                return 0;
@@ -110,15 +110,13 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
                        (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT"));
 
        switch (usb_pipetype(urbp->urb->pipe)) {
-       case PIPE_ISOCHRONOUS: ptype = "ISO"; break;
-       case PIPE_INTERRUPT: ptype = "INT"; break;
-       case PIPE_BULK: ptype = "BLK"; break;
-       default:
-       case PIPE_CONTROL: ptype = "CTL"; break;
+       case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO"); break;
+       case PIPE_INTERRUPT: out += sprintf(out, "INT"); break;
+       case PIPE_BULK: out += sprintf(out, "BLK"); break;
+       case PIPE_CONTROL: out += sprintf(out, "CTL"); break;
        }
 
-       out += sprintf(out, "%s%s", ptype, (urbp->fsbr ? " FSBR" : ""));
-       out += sprintf(out, " Actlen=%d", urbp->urb->actual_length);
+       out += sprintf(out, "%s", (urbp->fsbr ? " FSBR" : ""));
 
        if (urbp->urb->status != -EINPROGRESS)
                out += sprintf(out, " Status=%d", urbp->urb->status);
@@ -126,8 +124,7 @@ static int uhci_show_urbp(struct urb_priv *urbp, char *buf, int len, int space)
 
        i = nactive = ninactive = 0;
        list_for_each_entry(td, &urbp->td_list, list) {
-               if (urbp->qh->type != USB_ENDPOINT_XFER_ISOC &&
-                               (++i <= 10 || debug > 2)) {
+               if (++i <= 10 || debug > 2) {
                        out += sprintf(out, "%*s%d: ", space + 2, "", i);
                        out += uhci_show_td(td, out, len - (out - buf), 0);
                } else {
@@ -150,27 +147,13 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
        char *out = buf;
        int i, nurbs;
        __le32 element = qh_element(qh);
-       char *qtype;
 
        /* Try to make sure there's enough memory */
-       if (len < 80 * 7)
+       if (len < 80 * 6)
                return 0;
 
-       switch (qh->type) {
-       case USB_ENDPOINT_XFER_ISOC: qtype = "ISO"; break;
-       case USB_ENDPOINT_XFER_INT: qtype = "INT"; break;
-       case USB_ENDPOINT_XFER_BULK: qtype = "BLK"; break;
-       case USB_ENDPOINT_XFER_CONTROL: qtype = "CTL"; break;
-       default: qtype = "Skel" ; break;
-       }
-
-       out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n",
-                       space, "", qh, qtype,
-                       le32_to_cpu(qh->link), le32_to_cpu(element));
-       if (qh->type == USB_ENDPOINT_XFER_ISOC)
-               out += sprintf(out, "%*s    period %d frame %x desc [%p]\n",
-                               space, "", qh->period, qh->iso_frame,
-                               qh->iso_packet_desc);
+       out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "",
+                       qh, le32_to_cpu(qh->link), le32_to_cpu(element));
 
        if (element & UHCI_PTR_QH)
                out += sprintf(out, "%*s  Element points to QH (bug?)\n", space, "");
@@ -278,8 +261,7 @@ static int uhci_show_root_hub_state(struct uhci_hcd *uhci, char *buf, int len)
            default:
                rh_state = "?";                 break;
        }
-       out += sprintf(out, "Root-hub state: %s   FSBR: %d\n",
-                       rh_state, uhci->fsbr_is_on);
+       out += sprintf(out, "Root-hub state: %s\n", rh_state);
        return out - buf;
 }
 
@@ -293,7 +275,7 @@ static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
        unsigned short portsc1, portsc2;
 
        /* Try to make sure there's enough memory */
-       if (len < 80 * 9)
+       if (len < 80 * 6)
                return 0;
 
        usbcmd    = inw(io_addr + 0);
@@ -332,10 +314,6 @@ static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
        out += sprintf(out, "  sof       =       %02x\n", sof);
        out += uhci_show_sc(1, portsc1, out, len - (out - buf));
        out += uhci_show_sc(2, portsc2, out, len - (out - buf));
-       out += sprintf(out, "Most recent frame: %x (%d)   "
-                       "Last ISO frame: %x (%d)\n",
-                       uhci->frame_number, uhci->frame_number & 1023,
-                       uhci->last_iso_frame, uhci->last_iso_frame & 1023);
 
        return out - buf;
 }
@@ -428,7 +406,7 @@ struct uhci_debug {
 
 static int uhci_debug_open(struct inode *inode, struct file *file)
 {
-       struct uhci_hcd *uhci = inode->i_private;
+       struct uhci_hcd *uhci = inode->u.generic_ip;
        struct uhci_debug *up;
        int ret = -ENOMEM;
        unsigned long flags;