Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2010 23:38:18 +0000 (UTC)
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r212442 - in user/weongyo/usb/sys/dev/usb: net serial
Message-ID:  <201009102338.o8ANcIRq000930@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: weongyo
Date: Fri Sep 10 23:38:18 2010
New Revision: 212442
URL: http://svn.freebsd.org/changeset/base/212442

Log:
  Made the following experimental changes on ucom module:
    o Removes struct ucom_super_softc that contains only `struct
      usb_process' variable.  I could not find a reason why it's separated
      from `struct ucom_softc' and what it's for.
    o No more `struct usb_process' that menas ucom module doesn't create
      its own process context to serialize the USB commands.  If it really
      need to be serialized I'd use sx(9) lock instead of the process
      context.  Currently it'd call the callback functions directly on
      caller context.

Modified:
  user/weongyo/usb/sys/dev/usb/net/uhso.c
  user/weongyo/usb/sys/dev/usb/serial/u3g.c
  user/weongyo/usb/sys/dev/usb/serial/uark.c
  user/weongyo/usb/sys/dev/usb/serial/ubsa.c
  user/weongyo/usb/sys/dev/usb/serial/ubser.c
  user/weongyo/usb/sys/dev/usb/serial/uchcom.c
  user/weongyo/usb/sys/dev/usb/serial/ucycom.c
  user/weongyo/usb/sys/dev/usb/serial/ufoma.c
  user/weongyo/usb/sys/dev/usb/serial/uftdi.c
  user/weongyo/usb/sys/dev/usb/serial/ugensa.c
  user/weongyo/usb/sys/dev/usb/serial/uipaq.c
  user/weongyo/usb/sys/dev/usb/serial/ulpt.c
  user/weongyo/usb/sys/dev/usb/serial/umct.c
  user/weongyo/usb/sys/dev/usb/serial/umodem.c
  user/weongyo/usb/sys/dev/usb/serial/umoscom.c
  user/weongyo/usb/sys/dev/usb/serial/uplcom.c
  user/weongyo/usb/sys/dev/usb/serial/usb_serial.c
  user/weongyo/usb/sys/dev/usb/serial/usb_serial.h
  user/weongyo/usb/sys/dev/usb/serial/uslcom.c
  user/weongyo/usb/sys/dev/usb/serial/uvisor.c
  user/weongyo/usb/sys/dev/usb/serial/uvscom.c

Modified: user/weongyo/usb/sys/dev/usb/net/uhso.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/net/uhso.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/net/uhso.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -98,7 +98,6 @@ struct uhso_softc {
 	struct callout		sc_c;
 
 	/* TTY related structures */
-	struct ucom_super_softc sc_super_ucom;
 	int			sc_ttys;
 	struct uhso_tty		*sc_tty;
 	struct ucom_softc	*sc_ucom;
@@ -665,7 +664,7 @@ uhso_detach(device_t self)
 	usbd_transfer_unsetup(sc->sc_xfer, 3);
 	usbd_transfer_unsetup(sc->sc_ctrl_xfer, UHSO_CTRL_MAX);
 	if (sc->sc_ttys > 0) {
-		ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_ttys);
+		ucom_detach(sc->sc_ucom, sc->sc_ttys);
 
 		for (i = 0; i < sc->sc_ttys; i++) {
 			if (sc->sc_tty[i].ht_muxport != -1) {
@@ -896,8 +895,8 @@ uhso_probe_iface(struct uhso_softc *sc, 
 		UHSO_DPRINTF(1, "Trying to attach mux. serial\n");
 		error = uhso_attach_muxserial(sc, iface, type);
 		if (error == 0 && sc->sc_ttys > 0) {
-			error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom,
-			    sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx);
+			error = ucom_attach(sc->sc_ucom, sc->sc_ttys, sc,
+			    &uhso_ucom_callback, &sc->sc_mtx);
 			if (error) {
 				device_printf(sc->sc_dev, "ucom_attach failed\n");
 				return (ENXIO);
@@ -914,8 +913,8 @@ uhso_probe_iface(struct uhso_softc *sc, 
 		if (error)
 			return (ENXIO);
 
-		error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom,
-		    sc->sc_ttys, sc, &uhso_ucom_callback, &sc->sc_mtx);
+		error = ucom_attach(sc->sc_ucom, sc->sc_ttys, sc,
+		    &uhso_ucom_callback, &sc->sc_mtx);
 		if (error) {
 			device_printf(sc->sc_dev, "ucom_attach failed\n");
 			return (ENXIO);

Modified: user/weongyo/usb/sys/dev/usb/serial/u3g.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/u3g.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/u3g.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -58,7 +58,6 @@
 
 #define	USB_DEBUG_VAR u3g_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 #include <dev/usb/usb_msctest.h>
 
 #include <dev/usb/serial/usb_serial.h>
@@ -101,7 +100,6 @@ enum {
 };
 
 struct u3g_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom[U3G_MAXPORTS];
 
 	struct usb_xfer *sc_xfer[U3G_MAXPORTS][U3G_N_TRANSFER];
@@ -803,8 +801,8 @@ u3g_attach(device_t dev)
 	}
 	sc->sc_numports = nports;
 
-	error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom,
-	    sc->sc_numports, sc, &u3g_callback, &sc->sc_mtx);
+	error = ucom_attach(sc->sc_ucom, sc->sc_numports, sc, &u3g_callback,
+	    &sc->sc_mtx);
 	if (error) {
 		DPRINTF("ucom_attach failed\n");
 		goto detach;
@@ -827,7 +825,7 @@ u3g_detach(device_t dev)
 	DPRINTF("sc=%p\n", sc);
 
 	/* NOTE: It is not dangerous to detach more ports than attached! */
-	ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, U3G_MAXPORTS);
+	ucom_detach(sc->sc_ucom, U3G_MAXPORTS);
 
 	for (m = 0; m != U3G_MAXPORTS; m++)
 		usbd_transfer_unsetup(sc->sc_xfer[m], U3G_N_TRANSFER);

Modified: user/weongyo/usb/sys/dev/usb/serial/uark.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uark.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uark.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -52,7 +52,6 @@
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -84,7 +83,6 @@ enum {
 };
 
 struct uark_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UARK_N_TRANSFER];
@@ -220,8 +218,7 @@ uark_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UARK_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uark_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uark_callback, &sc->sc_mtx);
 	if (error) {
 		DPRINTF("ucom_attach failed\n");
 		goto detach;
@@ -238,7 +235,7 @@ uark_detach(device_t dev)
 {
 	struct uark_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UARK_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ubsa.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ubsa.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ubsa.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -89,7 +89,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR ubsa_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -161,7 +160,6 @@ enum {
 };
 
 struct ubsa_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UBSA_N_TRANSFER];
@@ -324,8 +322,7 @@ ubsa_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UBSA_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &ubsa_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &ubsa_callback, &sc->sc_mtx);
 	if (error) {
 		DPRINTF("ucom_attach failed\n");
 		goto detach;
@@ -344,7 +341,7 @@ ubsa_detach(device_t dev)
 
 	DPRINTF("sc=%p\n", sc);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UBSA_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ubser.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ubser.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ubser.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -103,7 +103,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR ubser_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -129,7 +128,6 @@ enum {
 };
 
 struct ubser_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom[UBSER_UNIT_MAX];
 
 	struct usb_xfer *sc_xfer[UBSER_N_TRANSFER];
@@ -290,8 +288,8 @@ ubser_attach(device_t dev)
 		sc->sc_ucom[n].sc_portno = n;
 	}
 
-	error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom,
-	    sc->sc_numser, sc, &ubser_callback, &sc->sc_mtx);
+	error = ucom_attach(sc->sc_ucom, sc->sc_numser, sc, &ubser_callback,
+	    &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -316,7 +314,7 @@ ubser_detach(device_t dev)
 
 	DPRINTF("\n");
 
-	ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_numser);
+	ucom_detach(sc->sc_ucom, sc->sc_numser);
 	usbd_transfer_unsetup(sc->sc_xfer, UBSER_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/uchcom.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uchcom.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uchcom.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -97,7 +97,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR uchcom_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -166,7 +165,6 @@ enum {
 };
 
 struct uchcom_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UCHCOM_N_TRANSFER];
@@ -348,8 +346,7 @@ uchcom_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UCHCOM_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uchcom_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uchcom_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -367,7 +364,7 @@ uchcom_detach(device_t dev)
 
 	DPRINTFN(11, "\n");
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UCHCOM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ucycom.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ucycom.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ucycom.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -77,7 +76,6 @@ enum {
 };
 
 struct ucycom_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_device *sc_udev;
@@ -269,8 +267,7 @@ ucycom_attach(device_t dev)
 		    "transfers failed\n");
 		goto detach;
 	}
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &ucycom_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &ucycom_callback, &sc->sc_mtx);
 
 	if (error) {
 		goto detach;
@@ -293,7 +290,7 @@ ucycom_detach(device_t dev)
 {
 	struct ucycom_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UCYCOM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ufoma.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ufoma.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ufoma.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -111,7 +111,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -169,7 +168,6 @@ enum {
 };
 
 struct ufoma_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 	struct cv sc_cv;
 	struct mtx sc_mtx;
@@ -442,8 +440,7 @@ ufoma_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_bulk_xfer[UFOMA_BULK_ENDPT_READ]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &ufoma_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &ufoma_callback, &sc->sc_mtx);
 	if (error) {
 		DPRINTF("ucom_attach failed\n");
 		goto detach;
@@ -479,7 +476,7 @@ ufoma_detach(device_t dev)
 {
 	struct ufoma_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_ctrl_xfer, UFOMA_CTRL_ENDPT_MAX);
 	usbd_transfer_unsetup(sc->sc_bulk_xfer, UFOMA_BULK_ENDPT_MAX);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/uftdi.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uftdi.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uftdi.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR uftdi_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 #include <dev/usb/serial/uftdi_reg.h>
@@ -94,7 +93,6 @@ enum {
 };
 
 struct uftdi_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_device *sc_udev;
@@ -324,8 +322,7 @@ uftdi_attach(device_t dev)
 	    FTDI_SIO_SET_DATA_PARITY_NONE |
 	    FTDI_SIO_SET_DATA_BITS(8));
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uftdi_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uftdi_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -341,7 +338,7 @@ uftdi_detach(device_t dev)
 {
 	struct uftdi_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UFTDI_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ugensa.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ugensa.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ugensa.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -61,7 +61,6 @@
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -82,7 +81,6 @@ struct ugensa_sub_softc {
 };
 
 struct ugensa_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom[UGENSA_IFACE_MAX];
 	struct ugensa_sub_softc sc_sub[UGENSA_IFACE_MAX];
 
@@ -240,7 +238,7 @@ ugensa_attach(device_t dev)
 	}
 	device_printf(dev, "Found %d interfaces.\n", sc->sc_niface);
 
-	error = ucom_attach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_niface, sc,
+	error = ucom_attach(sc->sc_ucom, sc->sc_niface, sc,
 	    &ugensa_callback, &sc->sc_mtx);
 	if (error) {
 		DPRINTF("attach failed\n");
@@ -259,7 +257,7 @@ ugensa_detach(device_t dev)
 	struct ugensa_softc *sc = device_get_softc(dev);
 	uint8_t x;
 
-	ucom_detach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_niface);
+	ucom_detach(sc->sc_ucom, sc->sc_niface);
 
 	for (x = 0; x < sc->sc_niface; x++) {
 		usbd_transfer_unsetup(sc->sc_sub[x].sc_xfer, UGENSA_N_TRANSFER);

Modified: user/weongyo/usb/sys/dev/usb/serial/uipaq.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uipaq.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uipaq.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -88,7 +87,6 @@ enum {
 };
 
 struct uipaq_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UIPAQ_N_TRANSFER];
@@ -1155,8 +1153,7 @@ uipaq_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UIPAQ_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uipaq_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uipaq_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -1172,7 +1169,7 @@ uipaq_detach(device_t dev)
 {
 	struct uipaq_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UIPAQ_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/ulpt.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/ulpt.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/ulpt.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR ulpt_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #ifdef USB_DEBUG
 static int ulpt_debug = 0;

Modified: user/weongyo/usb/sys/dev/usb/serial/umct.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/umct.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/umct.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR usb_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -99,7 +98,6 @@ enum {
 };
 
 struct umct_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_device *sc_udev;
@@ -291,8 +289,7 @@ umct_attach(device_t dev)
 			sc->sc_obufsize = 16;
 		}
 	}
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &umct_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &umct_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -308,7 +305,7 @@ umct_detach(device_t dev)
 {
 	struct umct_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UMCT_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/umodem.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/umodem.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/umodem.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -111,7 +111,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR umodem_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 #include <dev/usb/quirk/usb_quirk.h>
 
 #include <dev/usb/serial/usb_serial.h>
@@ -153,7 +152,6 @@ enum {
 #define	UMODEM_MODVER			1	/* module version */
 
 struct umodem_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UMODEM_N_TRANSFER];
@@ -383,8 +381,7 @@ umodem_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &umodem_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &umodem_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -815,7 +812,7 @@ umodem_detach(device_t dev)
 
 	DPRINTF("sc=%p\n", sc);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UMODEM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/umoscom.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/umoscom.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/umoscom.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -44,7 +44,6 @@
 
 #define	USB_DEBUG_VAR umoscom_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -174,7 +173,6 @@ enum {
 };
 
 struct umoscom_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UMOSCOM_N_TRANSFER];
@@ -333,8 +331,8 @@ umoscom_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UMOSCOM_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &umoscom_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &umoscom_callback,
+	    &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -351,7 +349,7 @@ umoscom_detach(device_t dev)
 {
 	struct umoscom_softc *sc = device_get_softc(dev);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UMOSCOM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/uplcom.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uplcom.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uplcom.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -112,7 +112,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR uplcom_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -154,7 +153,6 @@ enum {
 };
 
 struct uplcom_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[UPLCOM_N_TRANSFER];
@@ -431,8 +429,7 @@ uplcom_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uplcom_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uplcom_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -458,7 +455,7 @@ uplcom_detach(device_t dev)
 
 	DPRINTF("sc=%p\n", sc);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, UPLCOM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/usb_serial.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/usb_serial.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -96,7 +96,6 @@ __FBSDID("$FreeBSD$");
 #define	USB_DEBUG_VAR ucom_debug
 #include <dev/usb/usb_debug.h>
 #include <dev/usb/usb_busdma.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -134,20 +133,10 @@ TUNABLE_INT("hw.usb.ucom.cons_baud", &uc
 SYSCTL_INT(_hw_usb_ucom, OID_AUTO, cons_baud, CTLFLAG_RW,
     &ucom_cons_baud, 0, "console baud rate");
 
-static usb_proc_callback_t ucom_cfg_start_transfers;
-static usb_proc_callback_t ucom_cfg_open;
-static usb_proc_callback_t ucom_cfg_close;
-static usb_proc_callback_t ucom_cfg_line_state;
-static usb_proc_callback_t ucom_cfg_status_change;
-static usb_proc_callback_t ucom_cfg_param;
-
 static uint8_t	ucom_units_alloc(uint32_t, uint32_t *);
 static void	ucom_units_free(uint32_t, uint32_t);
 static int	ucom_attach_tty(struct ucom_softc *, uint32_t);
 static void	ucom_detach_tty(struct ucom_softc *);
-static void	ucom_queue_command(struct ucom_softc *,
-		    usb_proc_callback_t *, struct termios *pt,
-		    struct usb_proc_msg *t0, struct usb_proc_msg *t1);
 static void	ucom_shutdown(struct ucom_softc *);
 static void	ucom_ring(struct ucom_softc *, uint8_t);
 static void	ucom_break(struct ucom_softc *, uint8_t);
@@ -260,8 +249,7 @@ ucom_units_free(uint32_t root_unit, uint
  * before calling into the ucom-layer!
  */
 int
-ucom_attach(struct ucom_super_softc *ssc, struct ucom_softc *sc,
-    uint32_t sub_units, void *parent,
+ucom_attach(struct ucom_softc *sc, uint32_t sub_units, void *parent,
     const struct ucom_callback *callback, struct mtx *mtx)
 {
 	uint32_t n;
@@ -280,23 +268,16 @@ ucom_attach(struct ucom_super_softc *ssc
 		return (ENOMEM);
 	}
 
-	error = usb_proc_create(&ssc->sc_tq, mtx, "ucom", USB_PRI_MED);
-	if (error) {
-		ucom_units_free(root_unit, sub_units);
-		return (error);
-	}
-
 	for (n = 0; n != sub_units; n++, sc++) {
 		sc->sc_unit = root_unit + n;
 		sc->sc_local_unit = n;
-		sc->sc_super = ssc;
 		sc->sc_mtx = mtx;
 		sc->sc_parent = parent;
 		sc->sc_callback = callback;
 
 		error = ucom_attach_tty(sc, sub_units);
 		if (error) {
-			ucom_detach(ssc, sc - n, n);
+			ucom_detach(sc - n, n);
 			ucom_units_free(root_unit + n, sub_units - n);
 			return (error);
 		}
@@ -310,13 +291,10 @@ ucom_attach(struct ucom_super_softc *ssc
  * the structure pointed to by "ssc" and "sc" is zero.
  */
 void
-ucom_detach(struct ucom_super_softc *ssc, struct ucom_softc *sc,
-    uint32_t sub_units)
+ucom_detach(struct ucom_softc *sc, uint32_t sub_units)
 {
 	uint32_t n;
 
-	usb_proc_drain(&ssc->sc_tq);
-
 	for (n = 0; n != sub_units; n++, sc++) {
 		if (sc->sc_flag & UCOM_FLAG_ATTACHED) {
 
@@ -328,7 +306,6 @@ ucom_detach(struct ucom_super_softc *ssc
 			sc->sc_flag &= ~UCOM_FLAG_ATTACHED;
 		}
 	}
-	usb_proc_free(&ssc->sc_tq);
 }
 
 static int
@@ -448,53 +425,6 @@ ucom_detach_tty(struct ucom_softc *sc)
 }
 
 static void
-ucom_queue_command(struct ucom_softc *sc,
-    usb_proc_callback_t *fn, struct termios *pt,
-    struct usb_proc_msg *t0, struct usb_proc_msg *t1)
-{
-	struct ucom_super_softc *ssc = sc->sc_super;
-	struct ucom_param_task *task;
-
-	mtx_assert(sc->sc_mtx, MA_OWNED);
-
-	if (usb_proc_is_gone(&ssc->sc_tq)) {
-		DPRINTF("proc is gone\n");
-		return;         /* nothing to do */
-	}
-	/* 
-	 * NOTE: The task cannot get executed before we drop the
-	 * "sc_mtx" mutex. It is safe to update fields in the message
-	 * structure after that the message got queued.
-	 */
-	task = (struct ucom_param_task *)
-	  usb_proc_msignal(&ssc->sc_tq, t0, t1);
-
-	/* Setup callback and softc pointers */
-	task->hdr.pm_callback = fn;
-	task->sc = sc;
-
-	/* 
-	 * Make a copy of the termios. This field is only present if
-	 * the "pt" field is not NULL.
-	 */
-	if (pt != NULL)
-		task->termios_copy = *pt;
-
-	/*
-	 * Closing the device should be synchronous.
-	 */
-	if (fn == ucom_cfg_close)
-		usb_proc_mwait(&ssc->sc_tq, t0, t1);
-
-	/*
-	 * In case of multiple configure requests,
-	 * keep track of the last one!
-	 */
-	if (fn == ucom_cfg_start_transfers)
-		sc->sc_last_start_xfer = &task->hdr;
-}
-
-static void
 ucom_shutdown(struct ucom_softc *sc)
 {
 	struct tty *tp = sc->sc_tty;
@@ -511,25 +441,9 @@ ucom_shutdown(struct ucom_softc *sc)
 	}
 }
 
-/*
- * Return values:
- *    0: normal
- * else: taskqueue is draining or gone
- */
-uint8_t
-ucom_cfg_is_gone(struct ucom_softc *sc)
-{
-	struct ucom_super_softc *ssc = sc->sc_super;
-
-	return (usb_proc_is_gone(&ssc->sc_tq));
-}
-
 static void
-ucom_cfg_start_transfers(struct usb_proc_msg *_task)
+ucom_cfg_start_transfers(struct ucom_softc *sc)
 {
-	struct ucom_cfg_task *task = 
-	    (struct ucom_cfg_task *)_task;
-	struct ucom_softc *sc = task->sc;
 
 	if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) {
 		return;
@@ -539,9 +453,7 @@ ucom_cfg_start_transfers(struct usb_proc
 		return;
 	}
 
-	if (_task == sc->sc_last_start_xfer)
-		sc->sc_flag |= UCOM_FLAG_GP_DATA;
-
+	sc->sc_flag |= UCOM_FLAG_GP_DATA;
 	if (sc->sc_callback->ucom_start_read) {
 		(sc->sc_callback->ucom_start_read) (sc);
 	}
@@ -569,11 +481,8 @@ ucom_start_transfers(struct ucom_softc *
 }
 
 static void
-ucom_cfg_open(struct usb_proc_msg *_task)
+ucom_cfg_open(struct ucom_softc *sc)
 {
-	struct ucom_cfg_task *task = 
-	    (struct ucom_cfg_task *)_task;
-	struct ucom_softc *sc = task->sc;
 
 	DPRINTF("\n");
 
@@ -635,14 +544,8 @@ ucom_open(struct tty *tp)
 	sc->sc_pls_set = 0;
 	sc->sc_pls_clr = 0;
 
-	ucom_queue_command(sc, ucom_cfg_open, NULL,
-	    &sc->sc_open_task[0].hdr,
-	    &sc->sc_open_task[1].hdr);
-
-	/* Queue transfer enable command last */
-	ucom_queue_command(sc, ucom_cfg_start_transfers, NULL,
-	    &sc->sc_start_task[0].hdr, 
-	    &sc->sc_start_task[1].hdr);
+	ucom_cfg_open(sc);
+	ucom_cfg_start_transfers(sc);
 
 	ucom_modem(tp, SER_DTR | SER_RTS, 0);
 
@@ -656,11 +559,8 @@ ucom_open(struct tty *tp)
 }
 
 static void
-ucom_cfg_close(struct usb_proc_msg *_task)
+ucom_cfg_close(struct ucom_softc *sc)
 {
-	struct ucom_cfg_task *task = 
-	    (struct ucom_cfg_task *)_task;
-	struct ucom_softc *sc = task->sc;
 
 	DPRINTF("\n");
 
@@ -687,10 +587,7 @@ ucom_close(struct tty *tp)
 		return;
 	}
 	ucom_shutdown(sc);
-
-	ucom_queue_command(sc, ucom_cfg_close, NULL,
-	    &sc->sc_close_task[0].hdr,
-	    &sc->sc_close_task[1].hdr);
+	ucom_cfg_close(sc);
 
 	sc->sc_flag &= ~(UCOM_FLAG_HL_READY | UCOM_FLAG_RTS_IFLOW);
 
@@ -798,11 +695,8 @@ ucom_modem(struct tty *tp, int sigon, in
 }
 
 static void
-ucom_cfg_line_state(struct usb_proc_msg *_task)
+ucom_cfg_line_state(struct ucom_softc *sc)
 {
-	struct ucom_cfg_task *task = 
-	    (struct ucom_cfg_task *)_task;
-	struct ucom_softc *sc = task->sc;
 	uint8_t notch_bits;
 	uint8_t any_bits;
 	uint8_t prev_value;
@@ -882,10 +776,7 @@ ucom_line_state(struct ucom_softc *sc,
 	sc->sc_pls_set |= set_bits;
 	sc->sc_pls_clr |= clear_bits;
 
-	/* defer driver programming */
-	ucom_queue_command(sc, ucom_cfg_line_state, NULL,
-	    &sc->sc_line_state_task[0].hdr, 
-	    &sc->sc_line_state_task[1].hdr);
+	ucom_cfg_line_state(sc);
 }
 
 static void
@@ -933,11 +824,8 @@ ucom_rts(struct ucom_softc *sc, uint8_t 
 }
 
 static void
-ucom_cfg_status_change(struct usb_proc_msg *_task)
+ucom_cfg_status_change(struct ucom_softc *sc)
 {
-	struct ucom_cfg_task *task = 
-	    (struct ucom_cfg_task *)_task;
-	struct ucom_softc *sc = task->sc;
 	struct tty *tp;
 	uint8_t new_msr;
 	uint8_t new_lsr;
@@ -992,17 +880,12 @@ ucom_status_change(struct ucom_softc *sc
 	}
 	DPRINTF("\n");
 
-	ucom_queue_command(sc, ucom_cfg_status_change, NULL,
-	    &sc->sc_status_task[0].hdr,
-	    &sc->sc_status_task[1].hdr);
+	ucom_cfg_status_change(sc);
 }
 
 static void
-ucom_cfg_param(struct usb_proc_msg *_task)
+ucom_cfg_param(struct ucom_softc *sc, struct termios *t)
 {
-	struct ucom_param_task *task = 
-	    (struct ucom_param_task *)_task;
-	struct ucom_softc *sc = task->sc;
 
 	if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) {
 		return;
@@ -1011,7 +894,7 @@ ucom_cfg_param(struct usb_proc_msg *_tas
 		return;
 	}
 
-	(sc->sc_callback->ucom_cfg_param) (sc, &task->termios_copy);
+	(sc->sc_callback->ucom_cfg_param) (sc, t);
 
 	/* wait a little */
 	usb_pause_mtx(sc->sc_mtx, hz / 10);
@@ -1066,15 +949,8 @@ ucom_param(struct tty *tp, struct termio
 	/* Disable transfers */
 	sc->sc_flag &= ~UCOM_FLAG_GP_DATA;
 
-	/* Queue baud rate programming command first */
-	ucom_queue_command(sc, ucom_cfg_param, t,
-	    &sc->sc_param_task[0].hdr,
-	    &sc->sc_param_task[1].hdr);
-
-	/* Queue transfer enable command last */
-	ucom_queue_command(sc, ucom_cfg_start_transfers, NULL,
-	    &sc->sc_start_task[0].hdr, 
-	    &sc->sc_start_task[1].hdr);
+	ucom_cfg_param(sc, t);
+	ucom_cfg_start_transfers(sc);
 
 	if (t->c_cflag & CRTS_IFLOW) {
 		sc->sc_flag |= UCOM_FLAG_RTS_IFLOW;

Modified: user/weongyo/usb/sys/dev/usb/serial/usb_serial.h
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/usb_serial.h	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/usb_serial.h	Fri Sep 10 23:38:18 2010	(r212442)
@@ -119,44 +119,11 @@ struct ucom_callback {
 #define	ULSR_RXRDY	0x01		/* Byte ready in Receive Buffer */
 #define	ULSR_RCV_MASK	0x1f		/* Mask for incoming data or error */
 
-struct ucom_cfg_task {
-	struct usb_proc_msg hdr;
-	struct ucom_softc *sc;
-};
-
-struct ucom_param_task {
-	struct usb_proc_msg hdr;
-	struct ucom_softc *sc;
-	struct termios termios_copy;
-};
-
-struct ucom_super_softc {
-	struct usb_process sc_tq;
-};
-
 struct ucom_softc {
-	/*
-	 * NOTE: To avoid loosing level change information we use two
-	 * tasks instead of one for all commands.
-	 *
-	 * Level changes are transitions like:
-	 *
-	 * ON->OFF
-	 * OFF->ON
-	 * OPEN->CLOSE
-	 * CLOSE->OPEN
-	 */
-	struct ucom_cfg_task	sc_start_task[2];
-	struct ucom_cfg_task	sc_open_task[2];
-	struct ucom_cfg_task	sc_close_task[2];
-	struct ucom_cfg_task	sc_line_state_task[2];
-	struct ucom_cfg_task	sc_status_task[2];
-	struct ucom_param_task	sc_param_task[2];
 	struct cv sc_cv;
 	/* Used to set "UCOM_FLAG_GP_DATA" flag: */
 	struct usb_proc_msg	*sc_last_start_xfer;
 	const struct ucom_callback *sc_callback;
-	struct ucom_super_softc *sc_super;
 	struct tty *sc_tty;
 	struct mtx *sc_mtx;
 	void   *sc_parent;
@@ -188,14 +155,13 @@ struct ucom_softc {
 #define	UCOM_LOCK(sc)		mtx_lock(sc->sc_mtx)
 #define	UCOM_UNLOCK(sc)		mtx_unlock(sc->sc_mtx)
 
-#define	ucom_cfg_do_request(udev,com,req,ptr,flags,timo) \
-    usbd_do_request_proc(udev,&(com)->sc_super->sc_tq,req,ptr,flags,NULL,timo)
+#define	ucom_cfg_do_request(udev, com, req, ptr, flags, timo)		\
+	usbd_do_request_flags(udev, (com)->sc_mtx, req, ptr,		\
+	    flags, NULL, timo)
 
-int	ucom_attach(struct ucom_super_softc *,
-	    struct ucom_softc *, uint32_t, void *,
+int	ucom_attach(struct ucom_softc *, uint32_t, void *,
 	    const struct ucom_callback *callback, struct mtx *);
-void	ucom_detach(struct ucom_super_softc *,
-	    struct ucom_softc *, uint32_t);
+void	ucom_detach(struct ucom_softc *, uint32_t);
 void	ucom_status_change(struct ucom_softc *);
 uint8_t	ucom_get_data(struct ucom_softc *, struct usb_page_cache *,
 	    uint32_t, uint32_t, uint32_t *);

Modified: user/weongyo/usb/sys/dev/usb/serial/uslcom.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uslcom.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uslcom.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 
 #define	USB_DEBUG_VAR uslcom_debug
 #include <dev/usb/usb_debug.h>
-#include <dev/usb/usb_process.h>
 
 #include <dev/usb/serial/usb_serial.h>
 
@@ -105,7 +104,6 @@ enum {
 };
 
 struct uslcom_softc {
-	struct ucom_super_softc sc_super_ucom;
 	struct ucom_softc sc_ucom;
 
 	struct usb_xfer *sc_xfer[USLCOM_N_TRANSFER];
@@ -318,8 +316,7 @@ uslcom_attach(device_t dev)
 	usbd_xfer_set_stall(sc->sc_xfer[USLCOM_BULK_DT_RD]);
 	mtx_unlock(&sc->sc_mtx);
 
-	error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc,
-	    &uslcom_callback, &sc->sc_mtx);
+	error = ucom_attach(&sc->sc_ucom, 1, sc, &uslcom_callback, &sc->sc_mtx);
 	if (error) {
 		goto detach;
 	}
@@ -337,7 +334,7 @@ uslcom_detach(device_t dev)
 
 	DPRINTF("sc=%p\n", sc);
 
-	ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom, 1);
+	ucom_detach(&sc->sc_ucom, 1);
 	usbd_transfer_unsetup(sc->sc_xfer, USLCOM_N_TRANSFER);
 	mtx_destroy(&sc->sc_mtx);
 

Modified: user/weongyo/usb/sys/dev/usb/serial/uvisor.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/serial/uvisor.c	Fri Sep 10 23:24:55 2010	(r212441)
+++ user/weongyo/usb/sys/dev/usb/serial/uvisor.c	Fri Sep 10 23:38:18 2010	(r212442)
@@ -74,7 +74,6 @@
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009102338.o8ANcIRq000930>