From owner-freebsd-bugs Tue Feb 26 13:40:58 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 44D8337B41B for ; Tue, 26 Feb 2002 13:40:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1QLe2F11968; Tue, 26 Feb 2002 13:40:02 -0800 (PST) (envelope-from gnats) Received: from netau1.alcanet.com.au (ntp.alcanet.com.au [203.62.196.27]) by hub.freebsd.org (Postfix) with ESMTP id 07ADF37B434 for ; Tue, 26 Feb 2002 13:31:06 -0800 (PST) Received: from mfg1.cim.alcatel.com.au (mfg1.cim.alcatel.com.au [139.188.23.1]) by netau1.alcanet.com.au (8.9.3 (PHNE_22672)/8.9.3) with ESMTP id IAA21318 for ; Wed, 27 Feb 2002 08:31:04 +1100 (EDT) Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au (PMDF V5.2-32 #37641) with ESMTP id <01KERGDQUIAOVFP6MT@cim.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Wed, 27 Feb 2002 08:31:00 +1100 Received: (from jeremyp@localhost) by gsmx07.alcatel.com.au (8.11.6/8.11.6) id g1QLV1r27426; Wed, 27 Feb 2002 08:31:01 +1100 (EST envelope-from jeremyp) Message-Id: <200202262131.g1QLV1r27426@gsmx07.alcatel.com.au> Date: Wed, 27 Feb 2002 08:31:01 +1100 (EST) From: Peter Jeremy To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/35356: Dead code uhci_reset() in /sys/dev/usb/uhci.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35356 >Category: kern >Synopsis: Dead code uhci_reset() in /sys/dev/usb/uhci.c >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 26 13:40:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Peter Jeremy >Release: FreeBSD 5.0-CURRENT i386 >Organization: Alcatel Australia Limited >Environment: System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Jan 3 05:48:39 EST 2002 root@gsmx07.alcatel.com.au:/usr/obj/3.0/cvs/src/sys/gsmx i386 >Description: /sys/dev/usb/uhci.c defines an unused static function uhci_reset(). >How-To-Repeat: Try to build GENERIC with sys/conf/kern.pre.mk 1.8 >Fix: Index: uhci.c =================================================================== RCS file: /home/CVSROOT/src/sys/dev/usb/uhci.c,v retrieving revision 1.82 diff -u -r1.82 uhci.c --- uhci.c 16 Feb 2002 00:51:26 -0000 1.82 +++ uhci.c 26 Feb 2002 21:24:37 -0000 @@ -161,7 +161,6 @@ Static LIST_HEAD(, uhci_intr_info) uhci_ii_free; Static void uhci_busreset(uhci_softc_t *); -Static void uhci_reset(uhci_softc_t *); Static usbd_status uhci_run(uhci_softc_t *, int run); Static uhci_soft_td_t *uhci_alloc_std(uhci_softc_t *); Static void uhci_free_std(uhci_softc_t *, uhci_soft_td_t *); @@ -280,8 +279,6 @@ #define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd) #define UHCISTS(sc) UREAD2(sc, UHCI_STS) -#define UHCI_RESET_TIMEOUT 100 /* ms, reset timeout */ - #define UHCI_CURFRAME(sc) (UREAD2(sc, UHCI_FRNUM) & UHCI_FRNUM_MASK) #define UHCI_INTR_ENDPT 1 @@ -1473,21 +1470,6 @@ if (UREAD2(sc, UHCI_STS) & UHCI_STS_USBINT) uhci_intr(sc); -} - -void -uhci_reset(uhci_softc_t *sc) -{ - int n; - - UHCICMD(sc, UHCI_CMD_HCRESET); - /* The reset bit goes low when the controller is done. */ - for (n = 0; n < UHCI_RESET_TIMEOUT && - (UREAD2(sc, UHCI_CMD) & UHCI_CMD_HCRESET); n++) - usb_delay_ms(&sc->sc_bus, 1); - if (n >= UHCI_RESET_TIMEOUT) - printf("%s: controller did not reset\n", - USBDEVNAME(sc->sc_bus.bdev)); } usbd_status >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message