From owner-p4-projects@FreeBSD.ORG Mon Sep 15 23:26:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 077E1106567A; Mon, 15 Sep 2008 23:26:16 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF1FB1065678 for ; Mon, 15 Sep 2008 23:26:15 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AE9BF8FC1C for ; Mon, 15 Sep 2008 23:26:15 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8FNQFuj021392 for ; Mon, 15 Sep 2008 23:26:15 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8FNQF5t021386 for perforce@freebsd.org; Mon, 15 Sep 2008 23:26:15 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 15 Sep 2008 23:26:15 GMT Message-Id: <200809152326.m8FNQF5t021386@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 149837 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 23:26:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=149837 Change 149837 by thompsa@thompsa_burger on 2008/09/15 23:25:55 Remove Gaint from ugensa, tested with a Novatel card. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/serial/ugensa2.c#9 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/serial/ugensa2.c#9 (text+ko) ==== @@ -82,6 +82,7 @@ struct usb2_com_softc sc_ucom[UGENSA_IFACE_MAX]; struct ugensa_sub_softc sc_sub[UGENSA_IFACE_MAX]; + struct mtx sc_mtx; uint8_t sc_niface; }; @@ -253,6 +254,7 @@ return (ENOMEM); device_set_usb2_desc(dev); + mtx_init(&sc->sc_mtx, "ugensa", NULL, MTX_DEF); /* Figure out how many interfaces this device has got */ for (cnt = 0; cnt < UGENSA_IFACE_MAX; cnt++) { @@ -279,7 +281,7 @@ iface_index = (UGENSA_IFACE_INDEX + x); error = usb2_transfer_setup(uaa->device, &iface_index, ssc->sc_xfer, ugensa_xfer_config, - UGENSA_N_TRANSFER, ssc, &Giant); + UGENSA_N_TRANSFER, ssc, &sc->sc_mtx); if (error) { device_printf(dev, "allocating USB " @@ -300,7 +302,7 @@ device_printf(dev, "Found %d interfaces.\n", sc->sc_niface); error = usb2_com_attach(&sc->sc_super_ucom, sc->sc_ucom, sc->sc_niface, sc, - &ugensa_callback, &Giant); + &ugensa_callback, &sc->sc_mtx); if (error) { DPRINTF("attach failed\n"); goto detach; @@ -323,6 +325,7 @@ for (x = 0; x < sc->sc_niface; x++) { usb2_transfer_unsetup(sc->sc_sub[x].sc_xfer, UGENSA_N_TRANSFER); } + mtx_destroy(&sc->sc_mtx); return (0); }