Module Name:    src
Committed By:   skrll
Date:           Tue Feb 16 07:51:13 UTC 2016

Modified Files:
        src/sys/dev/usb: uhub.c usbdivar.h

Log Message:
Re-enable the TT support that existed previously.


To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/dev/usb/uhub.c
cvs rdiff -u -r1.111 -r1.112 src/sys/dev/usb/usbdivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.130 src/sys/dev/usb/uhub.c:1.131
--- src/sys/dev/usb/uhub.c:1.130	Fri Feb  5 15:41:49 2016
+++ src/sys/dev/usb/uhub.c	Tue Feb 16 07:51:13 2016
@@ -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 @@ uhub_attach(device_t parent, device_t se
 	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 @@ uhub_attach(device_t parent, device_t se
 	 *        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 @@ uhub_attach(device_t parent, device_t se
 			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 @@ uhub_detach(device_t self, int flags)
 
 	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)

Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.111 src/sys/dev/usb/usbdivar.h:1.112
--- src/sys/dev/usb/usbdivar.h:1.111	Wed Jan  6 22:12:49 2016
+++ src/sys/dev/usb/usbdivar.h	Tue Feb 16 07:51:13 2016
@@ -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 @@ struct usbd_pipe_methods {
 	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 @@ struct usbd_port {
 	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 {

Reply via email to