Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Re-enable the TT support that existed previously.



details:   https://anonhg.NetBSD.org/src/rev/113959870c20
branches:  trunk
changeset: 813742:113959870c20
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Feb 16 07:51:13 2016 +0000

description:
Re-enable the TT support that existed previously.

diffstat:

 sys/dev/usb/uhub.c     |  12 ++----------
 sys/dev/usb/usbdivar.h |   8 ++------
 2 files changed, 4 insertions(+), 16 deletions(-)

diffs (101 lines):

diff -r 8a3823d37390 -r 113959870c20 sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Tue Feb 16 05:14:31 2016 +0000
+++ b/sys/dev/usb/uhub.c        Tue Feb 16 07:51:13 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.130 2016/02/05 15:41:49 skrll Exp $ */
+/*     $NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.130 2016/02/05 15:41:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -184,9 +184,7 @@
        int p, port, nports, nremov, pwrdly;
        usbd_interface_handle iface;
        usb_endpoint_descriptor_t *ed;
-#if 0 /* notyet */
        struct usbd_tt *tts = NULL;
-#endif
 
        UHUBHIST_FUNC(); UHUBHIST_CALLED();
 
@@ -334,14 +332,12 @@
         *        proceed with device attachment
         */
 
-#if 0
        if (UHUB_IS_HIGH_SPEED(sc) && nports > 0) {
                tts = malloc((UHUB_IS_SINGLE_TT(sc) ? 1 : nports) *
                             sizeof (struct usbd_tt), M_USBDEV, M_NOWAIT);
                if (!tts)
                        goto bad;
        }
-#endif
        /* Set up data structures */
        for (p = 0; p < nports; p++) {
                struct usbd_port *up = &hub->ports[p];
@@ -355,14 +351,12 @@
                        up->power = USB_MIN_POWER;
                up->restartcnt = 0;
                up->reattach = 0;
-#if 0
                if (UHUB_IS_HIGH_SPEED(sc)) {
                        up->tt = &tts[UHUB_IS_SINGLE_TT(sc) ? 0 : p];
                        up->tt->hub = hub;
                } else {
                        up->tt = NULL;
                }
-#endif
        }
 
        /* XXX should check for none, individual, or ganged power? */
@@ -678,10 +672,8 @@
 
        usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_hub, sc->sc_dev);
 
-#if 0
        if (hub->ports[0].tt)
                free(hub->ports[0].tt, M_USBDEV);
-#endif
        free(hub, M_USBDEV);
        sc->sc_hub->hub = NULL;
        if (sc->sc_status)
diff -r 8a3823d37390 -r 113959870c20 sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Tue Feb 16 05:14:31 2016 +0000
+++ b/sys/dev/usb/usbdivar.h    Tue Feb 16 07:51:13 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdivar.h,v 1.111 2016/01/06 22:12:49 skrll Exp $     */
+/*     $NetBSD: usbdivar.h,v 1.112 2016/02/16 07:51:13 skrll Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -114,11 +114,9 @@
        void                  (*done)(usbd_xfer_handle xfer);
 };
 
-#if 0 /* notyet */
 struct usbd_tt {
        struct usbd_hub        *hub;
 };
-#endif
 
 struct usbd_port {
        usb_port_status_t       status;
@@ -129,9 +127,7 @@
        u_int8_t                reattach;
        struct usbd_device     *device; /* Connected device */
        struct usbd_device     *parent; /* The ports hub */
-#if 0
-       struct usbd_tt         *tt; /* Transaction translator (if any) */
-#endif
+       struct usbd_tt         *tt;     /* Transaction translator (if any) */
 };
 
 struct usbd_hub {



Home | Main Index | Thread Index | Old Index